Dave,
a Struts user posted the following message yesterday. I think
it pretty nicely summarizes what makes Velocity templates attractive
to some developers.


> From: "Matt Ho" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Subject: RE: Velocity-Tools / Struts
> Date: Tue, 19 Feb 2002 18:57:02 -0800
>
> We've been using Struts/Velocity for some time now and we find it to be
> an extremely well matched combination.  One of the main advantages of
> Velocity is that the syntax is incredibly easy.  I can explain it to a
> designer who has never seen it before and expect them to be useful
> within an hour.
> 
> One of the nicest things it enforces is the separation of presentation
> layer and business logic.  It removes the desire to "fix" problems by
> just putting a small change into the JSP via scriptlets.  It also makes
> the code a _lot_ more readable which also reduces the development time.


We are working on integrating Velocity tightly with Struts. A prototype
with several simple application examples is available here:

http://husted.com/struts/resources/velstruts.zip

This contains a *.war file. Put the *.war into the webapps directory of
a Tomcat installation and restart. Then point your browser at
http://server:port/velstruts/ to see and try the examples. We are 
currently in the process of redesigning the API and putting together
documentation. I hope for a first release version in the comming weeks.
I will announce major changes on this list.

Regarding your questions:

- As you can see in the examples, JSPs and Velocity templates can be
used in the same application. No restrictions. 

- Regarding the learning curve of Velocity. The language is
really simple. Less than 10 directives. Velocity templates don't
allow Java scriptlet. If you have been relying on that feature
a lot, existing applications might need some redesign to be able
to use Velocity. Velocity really enforces a clear separation between
view and control.

- Regarding performance: Many users have reported that they
obtain about the same performance with JSP and Velocity (it really
depends on the types of templates). So, performance it not an 
argument for or against one of the two technologies. We plan to do 
some more performance tests with a first release version.


Gabe


Crazy Dave wrote:
> 
> Hi,
> 
> I'm a new JSP developer (previously been working with
> SilverStream pages).
> 
> I've been working with Tomcat 4 & Struts and find
> JSP's to be a little clumsy with the mixing of script
> code and html but I am persevering because developing
> my JSP skills is the best way to remain employable.
> 
> I read a little about templete engines
> (velocity/turbine) but don't wish to change to them
> just yet as most potential employers are sold on JSP.
> 
> I was wondering is it easy to use a combination of
> JSP/Struts with a template engine and if so are there
> benifits or should I really only pick one or the
> other.
> 
> Is there any performance issues JSP vs Templates.
> 
> Any constructive comments on these points or related
> would be appreciated.
> 
> Cheers David Cruwys ([EMAIL PROTECTED])
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to