November 16, 2004
This Week...
... I don't anticipate much in the way of blogging as I'm busy teaching a class about Java Servlets and JSPs.
In some of my spare time I have been dabbling with Ruby on Rails, which I can already say from experience allows a quick and dirty web app to be created very quickly. I'm yet to be convinced about anything more complex yet but I have, as I say, only dabbled so far.
One curious coincidence though, is the similarity in syntax between dynamic content of Rails rhtml files and JSP page syntax. Not sure if that's a good thing...
Posted to Rails by Keith PittyThe big difference between rhtml and jsp is that Ruby is a suitable templating language — much unlike Java. To have managable JSP files, you're in the world of hurt known as building your own tag libraries.
The expressiveness and readability of Ruby invites you to use much of the core language right there in the rhtml. And when ever you start to smell the dreaded scriptlet-overload smell, you pull out logic into helpers (think tag libraries without any of the pain -- they're just simple methods).
Logic in views are not by definition bad. Business logic in views are pretty bad, but loops and conditions necessary to build the view is not.
Also, I'd much rather like the term "quick and clean" -- unless you have some specific charges for dirtiness ;)
Posted by: David Heinemeier Hansson at November 17, 2004 2:52 AMDavid, Thanks for your comment. I've obviously much still to learn about Ruby and Rails.
However, I would assert that building manageable JSPs without building your own tag libraries has been possible since the advent of JSTL.
Posted by: Keith Pitty at November 17, 2004 4:49 PM
