16 Mar '13, 1pm

Backbone.js Templates Without Logic or Interpolation

March 16, 2013 joelq backbone backbone.js backbone template Backbone.js Templates Without Logic or Interpolation Traditional Backbone.js templates typically interpolate a few values and have a little basic logic, but even the simplest of these templates knows too much. It is the view’s responsibility to manage logic, events, and the relationship with models while the template should simply manage the HTML markup. Enter the static template. It does not contain any logic or even interpolated values. In fact, a static template does not contain any executable code at all, it is just markup. A static template and its view might look like this: # app/assets/templates/profile_details.jst.ejs <div class="status"></div> <div class="name"></div> <div class="age"></div> # app/assets/javascripts/views/profile_details.coffee class MyApp.Views.ProfileDetails extends Backbone.View classN...

Full article: http://robots.thoughtbot.com/post/45495314926/backbone-js...

Tweets

Custom boards at home without etching

Custom boards at home without etching

hackaday.com 17 Mar '13, 6pm

PC board houses are getting more accessable and less expensive all the time. Some of us are even getting very, very good a...