Jakarta Velocity Tools 1.0 Released
Nathan Bubna writes "Jakarta Velocity Tools is a newly released project from the Apache Software Foundation. It provides servlets and tools for rapid, clean, MVC web development with Velocity, tools for using Velocity
with the Jakarta Struts framework, and a set of generic tools to help with any Velocity project."
Yes, I use Velocity as the central tempating engine for our in-house application server. What I really like about Velocity is that it forces seperation of presentation from code by completely disallowing arbitrary code inside of the template. You can still do everything you need to do with helper classes, which promotes great reusability and clean code.
In my opinion Velocity is the best Java-based templating system and the second-best over all (next to Zope's near perfect PageTemplates system).
I messed with Velocity but found it to be somewhat of a pain in the butt. I much prefer FreeMarker. Similar features to Velocity, just easier to use. Oh and the documentation kicks ass, which is one area I found lacking in velocity.
And no, I am not a freemarker developer, just a happy user.
If you haven't used JSTL I strongly suggest that you give them a look as well. Very simple to use, very extensive and really make JSP alot faster to develop and maintain.
Absolutely!
I'm leading a team of developers using Velocity for a large e-Business application, with many modules. It's a beauty to use, and our solution has won a few awards last year. We use a custom framework (not Struts, not VelocityServlet) to choose templates to load, since our app is designed to be highly customizable for each of our customers (medium or large business, including government). We also keep the locale in the session, and load the appropriate localized Velocity template if available. Let's just say this app is quite large. We now have well over a thousand Velocity templates, built up over the last few years.
Unfortunately I'm not at liberty to identify the application or the company here, because the company is actually very much a Microsoft shop, and it's been a major political issue that I've had our team move our application away from Microsoft solutions (it used to be VB/ASP). But it's performed well and never let us down (although the 1.3 release of Velocity was quite buggy and we had to revert to 1.2 until 1.3.1 came out).
I would wholeheartedly recommend Velocity. I had our team start using it because we ran into a huge mess with ASP (which I knew would repeat with JSP). Enforcing code separation between your view and your model is important, and Velocity does it beautifully. It avoids having a lot of unnecessary (and unmaintainable) cruft mixed in with your HTML.
If you need more specific information, we can discuss it by email. I'll be happy to help you in any way that I can.
You can accomplish anything you set your mind to. The impossible just takes a little longer.
Sun did the Petstore example with J2ee, MS ported it to .NET and showed a huge performance spike...
The reason for the performance "boost" was that Microsoft didn't use EJB data caching in the Java version they tested against. So every request sent a query straight to the database. They did use a database caching system for thier implementation, however, and so the performance was much higher. Certianly not apples and oranges, but what do you expect from Microsoft.
Since people are talking here about the separation of presentation and logic code, I'd simply like to throw in another toolkit which achieves this wonderfully: Janx (demo here).
While total separation is not the goal, the fact that after only a couple of hours of me explaining the basics of flow control and context to purely HTML/Interface folks they were able to take full control of the user interface development and maintenance of an active online magazine.
Mod me as a troll if you will, but I've yet to find a toolset as simple as Janx (powerful too, though it does need some updating).