Is FreeMarker Another Velocity? Or Just Use JSP?

My team is currently exploring Freemarker as a web view and template language. "Jsp is overkill for what we need", "no code snippets in view code", "it supports tag libraries", "the macros are powerful" were all listed as top benefits. In addition, there is some interest in developing tests that validate the output of views.

I'm scratching my head on this one. Another template language? I used Velocity in my last project and even dropped some hints in this blog on using Velocity with Eclipse. Velocity is good for creating email templates, but I would never recommend using it as a front end for a website.

So why will Freemarker be better? Why do I want to prevent developers from using snippets? Can't I just implement development standards instead of using a template language to enforce good programming techniques? What's so bad about just using a standard like JSP? And will Freemarker be around in three years or will it be superseded by the next latest and greatest template language?

3 comments:

  1. I completely agree; I recently worked with "clean" jsp 's and I see nothing wrong with them compared to freemarker or similar.
    Unless you use scriptlets a lot, of course!

    ReplyDelete
  2. Jive software switched from using JSP to FreeMarker. You can read about their reasons and experience here and here.

    ReplyDelete
  3. I was reasonably satisfied with JSP and on the lookout for the perfect templating language until I discovered Apache Wicket.

    Now I firmly believe that the bandwagon had been going in the wrong direction all these years. IMHO using pure Java code is the logical way to build a complex user interface instead of learning yet another templating language or diving into tag soup.

    With Wicket the "separation of concerns" is perfect as well with pure HTML used for layout.

    You may be interested in reading this blog post about why I switched from JSPs to Wicket.

    ReplyDelete

Comments on this blog are moderated and we do not accept comments that have links to other websites.

Share

About Isaac Sacolick

Isaac Sacolick is President of StarCIO, a technology leadership company that guides organizations on building digital transformation core competencies. He is the author of Digital Trailblazer and the Amazon bestseller Driving Digital and speaks about agile planning, devops, data science, product management, and other digital transformation best practices. Sacolick is a recognized top social CIO, a digital transformation influencer, and has over 900 articles published at InfoWorld, CIO.com, his blog Social, Agile, and Transformation, and other sites. You can find him sharing new insights @NYIke on Twitter, his Driving Digital Standup YouTube channel, or during the Coffee with Digital Trailblazers.