Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The bast thing is that all control structures such as functions, classes, conditionals, loops are just already in language you know - coffeescript. If you use coffee script after a minute or two you can learn how to write very complex coffeekup templates. Its also best suited for "more" logic in templates approach then say HAML. I would only use this an a webapp where the templates are very complex and require a lot of logic. You end up writing less code and it ends up more organized. We use modified coffee kup like template in rendering the hipmunk's UI. For example see the flight bars: http://www.hipmunk.com/flights/JFK-to-PDX#!dates=Jan15,Jan16


Makes sense, I am going to try it out.

I have found (in http://poe3.com, which uses backbone and handlebars) that as template logic gets complicated, more and more html gets moved to backbone views. And now the coffeescript classes contain a not-insignificant amount of HTML. Maybe I can avoid some of that mess.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: