
|
|
|||
Client and server-side templating with VelocityBy Sing Li2004-06-13
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 applications. 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. Tutorial Pages: » Client and server-side templating with Velocity » Basic template engine operation » Velocity contexts » Velocity as a standalone parser » Velocity vs. JSP technology on the server » Deploying Velocity with Tomcat 5 » Interoperating with the Struts framework » Conclusions » Resources First published by IBM developerWorks |
||||
| About the NetVisits, Inc Network | Write For Us | Advertise Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy. |
Visit other NetVisits, Inc. sites: |