Tom Locke has been carefully piecing together a new plugin for Rails called Hobo, which aims to make Rails development even faster. It includes the notion of tag libraries for Rails, which enable you to add JSP-style tags to your Rails applications. So for instance you can do:
<def tag="time"><%= Time.now %></def> <p>The time is <time/></p>
Where the <def> tag defines a new tag called time, which of course contains some ERb code; that definition creates a <time/> tag available to your templates, which directly after the tag definition. (The taglib can be put into a separate file, of course.) Tags support parameters, embedding of existing tags inside new tag definitions, etc. (see http://hobotek.net/blog/2006/11/10/guide-to-dryml/ for a quick guide). As Tom points out, this makes it possible to put all of the view code into the views, as you can define whole-page tags: no need to specify the layout in the controller any more.
Hobo also includes some extensions to ActiveRecord, and a more effective base controller you extend with your own controllers. It's not ready for installation yet, but I'm itching to give it a try.
Comments
Value of Hobo is more than speed
It seems that I am the lowest of the low in ruby developers eyes, a 'designer' and the reason for this conflict is that, not being a ruby developer, I keep breaking the application through the style sheet or when man-handling the views. After seeing Tom's presentation at the Skills Matter RoR exchange (http://skillsmatter.com/menu/356) I realised that Hobo has the potential to solve two big problems when developing RoR apps, neither of which are the key reason why Tom says you should consider Hobo (speed of development)
1) Clear separation of function, behaviour and presentation
2) Clarity of the views
The separation means that I can focus on design knowing that I am unlikely to affect the behaviour of functionality of the application, and the clarity of the dryml views massively improves their 'readability' and maintainability.
Th final key win is that we can extent the tags in the way you describe which takes towards a DSL, something our clients can immediately understand.
We will also be keeping a very close eye on this project and will be considering implementing this in our version 2 product this summer.
totally unrelated
just to let you know - lj allows you to use cuts to cut anything you don't want on your main journal page. it seems your blog thingy doesn't show these cuts or something, cause no one else saw what they didn't wnt to. the cut worked, but i deleted it anyway in case some other poor sap subscribes to me somewhere. if you look at www.peskyproductions.com you can see what the entry looked like UNLESS you clicked on the cut link
Plus the cut doesn't work in
Plus the cut doesn't work in the RSS feed, which is how I access your blog. If you view it through LiveJournal it works, but not if you read the raw RSS.