Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CanJS

sporto
April 11, 2013

 CanJS

An overview of CanJS and comparison with Backbone, Angular and Ember

sporto

April 11, 2013
Tweet

More Decks by sporto

Other Decks in Programming

Transcript

  1. can.Model var Library = can.Model({ findAll: ‘GET /libraries’, create: 'POST

    /libraries', update: 'PUT /libraries/{id}', destroy: 'DELETE /libraries/{id}' }, {});
  2. EJS <% libs.forEach(function(el, ix) { %> <li><%= el.name %></li> <%

    }) %> <% if (state.isEditing) { %> <button>Save</button> <% } %>
  3. can.Control var Control = can.Control({ init: function (ele, options) {

    … } }); var control = new Control('#main’, {});
  4. EMBER “We frequently receive feedback from new developers about how

    frustrating it can be to get started with Ember” Yehuda Katz & Tom Dale http://emberjs.com/blog/2013/03/21/making-ember-easier.html
  5. SIZE KB (MIN) Ember + jQuery + Handlebars Angular CanJS

    + Zepto Backbone + _ + Zepto + Mustache 61 57 80 269
  6. With #canjs you can do 80% of what you can

    possibly need with 20% the learning curve of the others. Sebastian Porto ‏@sebasporto
  7. THE REALLY IMPORTANT STUFF Backbone CanJS Angular Ember Easy to

    learn ˒ ˒ Great docs ˒ ˒ ˒ Observable Models ˒ ˒ ˒ ˒ Routing ˒ ˒ ˒ ˒ Views with live bindings ˒ ˒ ˒ Two way bindings ˒ ˒ Avoid unnecessary boilerplate ˒ ˒ ˒