You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by David You <Da...@hds.com> on 2004/05/27 00:15:40 UTC
velocity & JSP/Tag Lib
Just did a Project with JSP/Tag Lib.
Here is my comparison.
1. Is it possible/easy to write total scriptlet free JSP code for a project?
a. People are lazy, when you can do some simple little scripts which
you only want to use once, will you write a customized tag for it? Not
really.
b. Tag don't really imbedded other tag, only imbed scriptlets.
c. Tag sometimes are more unreadable than those simple scriptlets
2. Debugging.
Debugging JSP/Tag Lib code is a pain, you really confused with the
error message, and don't know what the hack is wrong with the code.
(debugging pure JSP code is good, the pain is Tag)
3. Performance.
Talking about the bad performance!, A few logic:iterate with a few
bean:write inside to generate a simple report will make your code slower
than a snail. The Tags defeat Hotspot, Hotspot works poorly with Tags. Try a
few (for loop) and logic:iterate in your JSP and you will see the big
difference for the Hotspot JVM.
4. A lots of little simple thing you have to write customized Tags, while
you can easily accomplished it in Velocity.
5. Take a long time to remember those standard Tags' syntax.
David
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: velocity & JSP/Tag Lib
Posted by Will Glass-Husain <wg...@forio.com>.
Well...
JSP with JSTL is not so bad... (duck!). I've been writing scriptlet free
JSP's for a while now. The expression language is handy. And I understand
that JSP 2.0 (which I haven't yet used) allows you to quickly make a custom
tag out of other JSP code. (analogous to a VelociMacro). The performance
comment is interesting, I'll have to test it out.
My major complaint about JSTL is the inability to call commonly used
methods, like size().
Obviously, I'm also a big Velocity fan. But I'm not ready to totally dis
JSP.
(I'll probably regret sending this)
WILL
----- Original Message -----
From: "David You" <Da...@hds.com>
To: "'Velocity Users List'" <ve...@jakarta.apache.org>
Sent: Wednesday, May 26, 2004 3:15 PM
Subject: velocity & JSP/Tag Lib
> Just did a Project with JSP/Tag Lib.
>
> Here is my comparison.
>
> 1. Is it possible/easy to write total scriptlet free JSP code for a
project?
>
> a. People are lazy, when you can do some simple little scripts which
> you only want to use once, will you write a customized tag for it? Not
> really.
> b. Tag don't really imbedded other tag, only imbed scriptlets.
> c. Tag sometimes are more unreadable than those simple scriptlets
>
> 2. Debugging.
> Debugging JSP/Tag Lib code is a pain, you really confused with the
> error message, and don't know what the hack is wrong with the code.
> (debugging pure JSP code is good, the pain is Tag)
>
> 3. Performance.
> Talking about the bad performance!, A few logic:iterate with a few
> bean:write inside to generate a simple report will make your code slower
> than a snail. The Tags defeat Hotspot, Hotspot works poorly with Tags. Try
a
> few (for loop) and logic:iterate in your JSP and you will see the big
> difference for the Hotspot JVM.
>
> 4. A lots of little simple thing you have to write customized Tags, while
> you can easily accomplished it in Velocity.
>
> 5. Take a long time to remember those standard Tags' syntax.
>
>
>
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org