Tuesday, March 16, 2004

My article on Velocity

My article on Velocity was recently published in the JavaRanch Journal. I am slightly paranoid about my writing as I think everything I write sucks. Perhaps it says something that I continue to write articles anyway.

I've written an article for next month's Journal already. Usually I wait until the last possible moment but for some reason I felt inspired and the article came pouring out of me in just a few hours. It took longer to test all the code and make sure it worked perfectly than it did to write the article.

Anyway, I decided I like Velocity a lot. Back in the Dark Ages before JSP was invented, we were all struggling to find ways to make servlets less than horrible. My staff and I were working on a project called the Cendant Global Referral Network (CGRN) and we needed a way to get the HTML out of our servlets. We developed a methodology very similar to Velocity. Our goals were pretty simple:

  • get the HTML out of the servlets
  • make the HTML editable in a cool HTML editor
  • have the HTML work in a browser without having to go through Java
  • make it so simple that you could explain it to a web designer with no Java experience in less than 1 hour
Velocity does all these things and with an extremely limited language there is little temptation to break MVC and put your code in scriptlets.

No comments: