Getting Up to Speed with Velocity
By Jim Jagielski
Hi. My name is Jim, and I'm a tool junkie. There. I've admitted it. Whether it's woodworking or application development, if there's a tool that makes my life easier, I have to have it. And as with woodworking, sometimes the best tools are those that are extremely focused, designed to do one thing and one thing alone.
Velocity is one such tool, and a subproject of the ASF Jakarta project (see "
Online Resources"). It was started in early 2001 and contains, at last count, ten contributors. The initial coders were Jason van Zyl and Jon Stevens. Velocity is designed to be a template engine, and nothing more. Some developers, especially those biased towards server-side scripting languages, will find the restrictions and limitations that Velocity imposes to be almost suffocating. But that's only because those developers are, in effect, trying to use a hammer to saw wood.
History 101
In many ways, Velocity is the next logical progression in Web application development. When Web pages made the transition from static entities to more dynamic ones, all we had available were server-side includes or CGI scripts. Unfortunately, these methods were slow, and caused undue strain on the servers using them.
Eventually, server-side scripting languages like JSP and PHP changed the way Web applications were built. Not only was this new method incredibly fast, but it also allowed a much deeper interaction with the actual HTML.