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

Client side vs server side rendering is pretty straight forward for us. Anything that is static, like the homepage, pricing, about is rendered server side. These pages don't change that often. Almost anything that is dynamic is client side. I would say 80% of the rendering is client side. Although the server does all the JSON handling and template rendering (handlebar pre-compiled templates).

Initially we had inline handlebar.js views wrapped around script tags. Now we precompile all templates into JS objects (http://handlebarsjs.com/precompilation.html). These templates are compressed and Gziped into one file and downloaded on page load. We will have two sets of templates now (common views used across the site and application specific views like account profile).

Blog post coming soon :)



Were there any issues with swapping out Backbone's built in templating for handlebarjs?


Backbone does not have built in templates. Underscore templates are very basic for our needs.


He mean't to say "No problems!" :)




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

Search: