View Rendering in Java: Templates Out, Groovy Builders In
Template engines have long been the de-facto standard for rendering views in Java web development. Learn why templates are far from ideal and how Groovy builders provide a literate solution for bringing view rendering back into your code.
by Jon Dickinson
July 24, 2008
he rationale for using template engines to render views in Java web development is generally two-fold:
Templates can be created and maintained by HTML coders.
Templates are easy for HTML coders to read, as they are based on HTML formatting.
In my experience, both arguments are flawed. The first one rarely happens, and the second holds true initially but becomes seriously compromised as soon as any presentation logic is introduced. Groovy builders, a literate solution for bringing view rendering back into your code, provide a better alternative to the template engine.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!