Geir added his perspective, and believe me his view is both wide and
knowledgable. :-)
> 1) JSP/struts is not comparable to Velocity. Struts is a rich webapp
> development framework, and Velocity is a template engine.
My group has been working with Struts for a short while, and we have a
diagram drawn up to convey this important message so folks don't compare
Apples to Oranges.
Strut Actions are CONTROLLERs which make business MODEL objects available
via the AppContext Layer to JSP's which are used to build the VIEW.
Struts-Taglibs are helpful tools for the JSP's to make view building
somewhat easier, your mileage may vary, but in the end the VIEW means 'JSP'.
In contrast - Velocity is a template language/engine. Nothing more. It does
NOT have a controller component. It does NOT obtain Model/Biz Objects
directly. It does help a Designer build views based on objects available to
them in the Context.
In two words - Velocity templates are IMHO "fabulously easy" to use for
building Views.
Geir lists appropriate comparisons:
> Struts/JSP - Turbine/Velocity
> Struts/JSP - Turbine/JSP (yes, it does JSP)
> Struts/JSP - Turbine/WebMacro
> Struts/JSP - Melati/Velocity
> Struts/JSP - Melati/WebMacro
> Struts/JSP - Maverick/Velocity
> Struts/JSP - Luxor/Velocity
Another way to phrase this: "Struts as the Controller is normally paired
with JSP and Struts Taglibs to produce the View; whereas other Controllers
(ex. Turbine, Melati, Maverick, Luxor) can be used with various View tools
(ex. JSP, Velocity, WebMacro, XSLT, etc.)
I say normally, because I've personally run a version of the Struts example
app tweaked by Geir that uses Velocity instead of JSP. It's remarkably
easier IMHO to understand the views.
My personal opinion is that Struts has a lot of good ideas and is a solid
controller. However, I personally feel that if it supported the OPTION to
use different View components like Velocity, that this would be a BIG plus.
:-)
I encourage folks to check out the .war file
(http://jakarta.apache.org/builds/jakarta-velocity/contrib/struts/) which is
the standard Struts example app - but using Velocity instead of JSP.
Cheers,
Tim Colson