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

Pros:

- Clean, nice HAML-like syntax. Expect less typing and easier reading.

- Extensible. It's extremly easy to provide your own filters, doctypes.

- Extremely cool ability to hook the compiler and manipulate the result tree. See CSRF example — it's just awesome.

- Command-line tool to compile templates. A must for static mock-ups.

- High quality code. I'd really wish I could write code as pretty as that.

Cons:

- No template inheritance. And no fragment inclusion (unless you write your own filter or extend the compiler to support some "jade:include" attribute).

- Parsing and rendering is synchronous. So expect Node to block while doing jade.render().

- Filters are synchronous, too. So are iterators (therefore, forget your idea to write model, which lazily fetches data from DB on demand).

- No client-side support. Not like this is important, but this would be neat, considering it's JS after all.

Jade is awesome, but synchronous code in asynchronous world somehow feels wrong.



Correction: I was wrong on lack of client-side support - it should work, except for IE, which don't support getters.




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

Search: