velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jian chen <>
Subject Re: Velocity vs JSP vs FreeMarker
Date Thu, 07 Apr 2005 03:35:57 GMT
Hi, All,

I have quite some experience with JSP and Velocity. To say it short, I
think Velocity is THE way to go. Reasons below:

1) Velocity syntax is very easy to recognize in any html template.
Other templating systems like FreeMarker, makes it really hard to see
what is the artificial html and what is the real one.

2) Speed-wise, who cares if JSP is some millisecond faster or not.
Given any reasonable machine, Velocity is good enough.

3) Velocity is WAY much simpler than the JSP mess. To be honest, I
don't like Sun's approach to make things unnecessarily complicated,
such as the JSP tag lib crap.

To a java developer who never does Web development, Velocity is a lot
easier to pick up, while you need to read a lot in order to master the
JSP intricacies (again due to the fact Sun introduced lot of features
in JSP which only make developers clueless, JSF, JSTL, etc.)

4) Velocity engine itself also provides a very small footprint I think
compared to the full-blown JSP engine with all the "fancy" features
that might get used once in a blue moon.

5) There are much more benefits using Velocity than JSP which I don't
need to list here.

Overall, Velocity is small, simple and efficient. That is what I like it best.


On Apr 6, 2005 8:26 AM, Edmund Urbani <> wrote:
> Ryan Lea wrote:
> > Just wondering if anyone has used/tried/investigated all 3 of these as
> > views (from MVC) and has any opinions on them??
> >
> > As a bit of a site note as well, has anyone used them with WebWork??
> >
> > cheers
> >
> > Ryan Lea
> > Web Developer
> >
> I have got experience with JSP and Velocity (never used FreeMarker or WebWork).
> I started with JSP a few years back, then I switched to Velocity and
> right now I am considering to go back to JSP for a new project.
> Both allow developers to stick to MVC and create nice, clean, maintainable pages.
> Both allow developers to mess around.
> Velocity does have a nice syntax for simple things like iterations, ifs, sets
> and you can define macros, which can be very useful to let templates share
> things. You need no Java code to do this, it's all built-in. You can not
> include Java Code in your templates (that may be considered both - a good and
> a bad thing). Velocity does unexpected things with null values, or rather it does
> not do anything with them besides writing to the log.
> In comparison JSPs are faster (once they have been compiled) and they will always
> be, because they do not rely on reflection/bean mechanisms. To me, the fact
> that JSP is compiled to Java classes is its biggest advantage over templating engines
> like Velocity, and the reason why I am considering switching back to it.
> Compiling does inform you about many sorts of errors you can make EARLY (build-time
> vs run-time). Also, because JSPs do get translated to Java Code, I can use all kinds
> of Java development tools on them. Eg. I can take a look at the call hierarchie
> of one of my methods and see which JSPs use that method (that advantage can be
> eliminated by using <jsp:bean /> tags instead of simply calling get-methods).
> Well, now that I have said that much in favor of JSP, I can already feel the wrath
> of the velocity community upon me - just kidding ;)
> I hope that someone will speak in favor of Velocity on this list though!
> Cheers
>   Edmund
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message