Re:Picplum Tech Stack - Backbone, Async Uploads, Prints API
by lyime on Wednesday May 30, 2012 @03:16PM
(#4044344)
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 :)
Re:Picplum Tech Stack - Backbone, Async Uploads, Prints API
by voltagex_ on Wednesday May 30, 2012 @06:53PM
(#4045306)
Were there any issues with swapping out Backbone's built in templating for handlebarjs?
Perhaps not related to backbone but how are you encoding the different "views" in your single page application? Does the client download all of the templates upfront or how does that work? Also does the client know which template to render for a given api call or is that passed down from the server as well?
I'd be very interested in reading a blog post demonstrating how you strung all of this together! Pretty cool!
Thanks!