Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSP vs FreeMarker [closed]

Does JSP provide more flexibility then FreeMarker or is it other way around? My back-end involves Servlets. Which one is used under what circumstances?

like image 960
rl99 Avatar asked Apr 05 '11 23:04

rl99


People also ask

Is FreeMarker open source?

License. Apache FreeMarker is Free software, licensed under the Apache License, Version 2.0.

What is FreeMarker?

Apache FreeMarker is a free Java-based template engine, originally focusing on dynamic web page generation with MVC software architecture. However, it is a general purpose template engine, with no dependency on servlets or HTTP or HTML, and is thus often used for generating source code, configuration files or e-mails.

Who uses FreeMarker?

Who uses Apache FreeMarker? 46 companies reportedly use Apache FreeMarker in their tech stacks, including CarGurus, Betfair, and Sodep.

Is FreeMarker a programming language?

Although FreeMarker has some programming capabilities, it is not a full-blown programming language like PHP. Instead, Java programs prepare the data to be displayed (like issue SQL queries), and FreeMarker just generates textual pages that display the prepared data using templates.


1 Answers

JSP is going to let you do more things in the view layer, so you might say that makes it more flexible. Things you probably shouldn't be doing though, which one could argue as a benefit for FreeMarker. It would afford you more control over what the view layer can do and force a better separation of concerns.

There's not really any right answer here. You can technically accomplish just about anything with either for your UI. Without more details about your project it's hard to make a recommendation. About the only thing I can say is that you should probably use the MVC pattern. It can be accomplished with either.

like image 97
WhiteFang34 Avatar answered Oct 14 '22 01:10

WhiteFang34