State of the View

After a brief discussion with Obie regarding Rails views, he suggested that I have a look at HAML. I did, and it is now my primary source for using as a templating system in Rails.

YAML and HTML but oddly enough, it really works. I was adamant to not use it, no matter how many people told me to take a look at it. Rightly so, it is a travesty to HTML views, but its a helpful, time-saving travesty.

My dream is to create a Flex-view-like language that uses XML like so:

<mx:DataGrid id="entries" width="{reader.width-15}" dataProvider="{httpRSS.result.rss.channel.item}" cellPress="{body.htmlText=httpRSS.result.rss.channel.item[entries.selectedIndex].description}">
<mx:columns>
<mx:Array>
<mx:DataGridColumn columnName="title" headerText="Title" />
<mx:DataGridColumn columnName="pubDate" headerText="Date" />
</mx:Array>
</mx:columns>
</mx:DataGrid>

It is hard for a lot of people on the web to agree with, as they’ve spent the last 4 years being shoved that “views and content are seperate”, but there is a lot of logic in the above code which I enjoy.

I am curious to know what other people think of the state of HTML, HAML, and other view systems, and what they’d like to see.

1 Response to “State of the View”


  1. Gravatar Icon 1 Chris

    I find myself using Liquid more and more. I did try HAML a couple times and it just hurts to get into that flow.

    The Rails core team are changing how template engines run in Rails, so we should see a lot of performance gains soon. If I remember correctly, they’re making it to where plugin template engines have pre-compiled support just like ERB.

    Should be interesting to see how that helps us.

Comments are currently closed.