developerWorks: Client and Server-Side Templating with Velocity

“The manipulation and transformation of textual data in standard
presentation or exchange formats such as HTML and XML is a frequent
and often tedious activity in which every software developer
engages. A templating engine can facilitate this process by
maintaining the static portion of the output in templates, while
dynamically generating and positioning the changing portions.
Velocity is a highly functional, open source templating engine that
you can easily integrate into either client-side or server-side

“For server-side applications, when integrated with Web tier
containers compatible with Servlet 2.3+, Velocity provides a viable
alternative to JSP technology that can enforce a clean separation
of presentation logic from application business logic. In fact, the
templating language supported by Velocity is simple enough and the
resulting templates are sufficiently uncluttered that Web site
designers and stylists can learn and maintain these templates.

“In this article, we will examine Velocity’s simple templating
language, create some templates, and apply them in a standalone
client application. We’ll then integrate the template engine into
the Struts MVC framework as a view component…”

Complete Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis