velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Townson <christopher.town...@gmail.com>
Subject a programming exercise integrating velocity with spring ... for general interest of this list
Date Wed, 11 May 2011 10:00:20 GMT
I thought some on this list might like to know about a small "glue
library" I wrote recently as a programming exercise for integrating
Velocity with Spring and released on GPL for any interested parties:

http://christophertownson.com/projects/spring-velocity/

I have often thought that the integration with Velocity currently
provided by Spring, whilst adequate, could be significantly improved
-- and this is my attempt to do so.

I had 4 main aims in this exercise:

1. Support the changes to Velocity & Velocity Tools (esp. tools) since
1.5 and 2.0 (new toolbox format, no deprecation messages etc)

2. Provide a standard, Spring-style means to utilise Spring context
support to augment velocity tools infrastructure (@ViewHelper
annotation as a component stereotype which can have a Spring @Scope
specified automatically added to Velocity context)

3. Most importantly: work nicely with ContentNegotiatingViewResolver
so that a single velocity-based Spring View can be used to generate
multiple text-based formats simply by dropping in additional templates
(+ specifying in ContentNegotiatingViewResolver's mediaTypes map)

4. Get all of the above to work transparently, out-of-the-box via
annotations, and correctly determine what sort of "context" the app is
running in (e.g. web app [access to servlet context] or plain token
replacer with/without toolbox)

Any thoughts or feedback would be most welcome ... and, of course,
feel free to use!

All the best,

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message