Rapid Prototyping with Haml/Sass + Compass, StaticMatic
Update: WOW - Large Posterous formatting leak, very dangerous...give us a minute to lock it down.
Update II: Fixed...kinda. Can't upload an image I wanted too at the moment. Later.
Well, I was going to write a post all about this - but Jerome already covered all the bases I was planning to. Allow me to quote his workflow:
My Prototyping Workflow >
1. Code one full page with no regards to modularizing the integration > any further than StaticMatic already does for you;
2. Once a full page is coded, modularize the code just enough so that > the next pages won’t require as much code. More on this in a future post;
3. Create another page;
4. Further modularize with the new elements in play. Using mixins and > helpers == modularization;
5. Repeat step 3 & 4 until everything is integrated;
6. Add in the javascript for more interactions in your prototype (it’s > worth it, big time);
7. Deploy/commit your prototype.
http://jgn.heroku.com/2010/02/28/rapid-prototyping-with-haml-sass-and-ruby/
Exactly. Honestly - the time saved building things with this stack is unbelievable. You will be kicking yourself once you try this on just how much time you were wasting before. I was recently able to grind out the entire functional front-end for a web application, with styling and js interaction in about a 2 weeks. Seriously - jump over to Jerome's post and follow his advice to get started. You won't look back.
I'll just address a couple common objections quickly:
But Haml sux cause it depends on whitespace. Terrible to debug...
That seems understandable - but in my experience, this has a lot more to do with the editor you are using. Haml throws very specific errors - e.g.
StaticMatic::TemplateError in /src/pages/program.haml
Indenting at the beginning of the document is illegal.
1: %h2
2: Create Performance Program
You know where it is - all you need is a good editor that properly illuminates indenting and spaces. I use and recommend SublimeText2 with a good Haml/Sass bundle.
Isn't adding Haml just another layer to interpret?
Sure, but you don't have to serve up Haml in production. What we are doing is interpreting the Haml/Sass when we push builds into the respective Html/Css.
It sucks writing content in Haml because of the indenting.
Yeah -> don't do that. Chris Eppstein has the definitive post on this. Haml is a tempting language. I strongly recommend using a filter like :markdown for content.
Got other question? Go ahead and shoot away. I'll try to answer whatever I can. Trust me - this will save you time as a front-end dev/designer.
I'm grateful for everyone who has worked on these meta-languages and frameworks. They make me love my work even more!
-Adc
