velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewan Makepeace <ewan_makepe...@yahoo.com>
Subject Re: FW: Velocity vs. JSP
Date Thu, 15 Mar 2001 08:29:55 GMT
I did some webapp development in 1996, when MS ASP had just come out
and was not widely used - at least not in Jakarta (Indonesia) where I
was and still am. I was initially bowled over by the power and
simplicity of being able to embed VBScript right there in my web pages,
loop over groups of tags and access databases, all with a few lines of
embedded code. (Before the anti-MS crowd get going, just try and think
what the alternatives were back then!)
However as the project grew the drawbacks became more apparent - code
mixed with HTML was visually ugly and hard to understand. Changes to,
say, the database structure entailed modifications to dozens of web
pages, and debugging support was almost non existent.
VB6 gave us support for web classes (like Servlets mixed with custom
JSP tags) which had huge potential bud were rather unreliable and buggy
in their first version. Meanwhile I had moved on to other things.
Now I am back in Web Development, but using Java. JSP has arrived, late
to the party, and with many of the same drawbacks as ASP. To it's
credit it is compliled which catches many otherwise hard to spot
errors, and speeds performance, but as far as I know I cannot force a
compile at the same time as my App - I have to start Tomcat, access the
page and see if it compiles....
Velocity certainly avoids the ugly compile time messages of JSP - but
then it is not compiled at all. I confess I have been moving more and
more of my display code out of templates and into Java using a display
object model similar to ECS to hide the tags and a lot of the
formatting, with great results. This is OK at present as I am doing the
whole project with no page designers to interface with. The No 1
advantage? If I modify a class and recompile the project, the compiler
notifies me of any broken methods, even in the display code. That is
worth a lot.
For me, one of the biggest potential benefits of Velocity over JSP,
that was skimmed over by Jon, is the way the tags are visible in the
WYSIWYG tools like Frontpage (or even Word or Excel these days - have
you seen how good the 'save as HTML' is in Office 2000?) My potential
audiance here is not page designers - I believe if they can learn
ColdFusion they can cope with JSP, but users themselves. A user can lay
out a report, form or document complete with colors, styles, font sizes
and fomatting, and type Velocity tags wherever the dynamic data should
appear, with almost zero training. Only a line or two needs adding
before the page can be used as a Velocity template and because the tags
appear inline, the data ends up formatted with the chosen font and
style just as the tags were.

rgds
Ewan

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Mime
View raw message