Starting to believe in the power of HAML/Jade
I've long fought against the use of HTML abstraction language like HAML and more recently Jade, however I think I'm starting to give in. In my new pet project at nodrew.com I've decided to throw away some long held beliefs and try a few new things. In this I am trying Node.js, Express.js, Mongo, Backbone.js, Jade and Stylus. My goal thus far has been to build a site the generates itself from your other social network feeds, using Javascript to provide most of the templating and processing.
On the client side, I'm using Backbone's (Underscore's) template system for simplicity. However, on the server side I decided to go with Jade. The main reason behind this, beside trying something new, is because of the simple fact, that this site has very few pages generated by the server side and the markup is very limited. This made it a very good target to test out this sort of system. In doing this, I have inadvertently opened myself to a whole new ideal though; markup should be abstracted, because it forces it to be compiled, which in turn enforces that the markup is correct.
More to the point, it allows me to treat the markup as source code, which makes me less self-conscious about the outputted HTML tabbing. In truth, this shouldn't be a concern, as who isn't looking at source code through an inspector these days anyway, regardless, it is something I spend too much time concerning myself with. I'm starting to enjoy the fact that the HTML itself is simply a byproduct of code, as opposed to the code itself.
While the syntax itself has been a little difficult to get used to, several years of working with YAML has made the idea of space delimited languages second nature. I'm still not 100% sold on this for heavy markup sites, however I'm finally intrigued by the idea.
I'll have to try this on another larger product to find out for sure.










