The power of readable metaprogramming

Oliver Steele is Chief Software Architect at Laszlo Systems and he’s digging into Ruby on Rails:

During my last vacation it took about five lazy vacation days with Ruby on Rails to implement a fairly sophisticated 40-page web application with five models, two metamodels, CRUD, cookies, image upload, and login. (I’ll write more about the application itself, if I find a few free weekends to harden it for public use.) For comparison, it took me about the same amount of time during my previous vacation to write a much simpler ten-page PHP web application that had only one model. And I already knew a little bit of PHP, whereas I was learning Ruby and Rails from scratch.

He explains how much of this productivity stems from the fact that “…Ruby is one of the rare languages with a readable embedded syntax for metaprogramming”, which in turn “…lets the library user write in a concise domain-specific language that embeds Ruby”. The unique power that gives us Associations and Validations.

I’m really glad that Oliver looked into Rails because that has in turn lead me to really dig into Lazlo. It looks pretty darn neat! I’d definitely love to see someone do a Rails backend with a Lazlo frontend.

blog comments powered by Disqus