Angular - New kid on the block
Knockout - Data bindings for everyone
Backbone - Gets out of your way
Ember - Components are {{ cool }}
Inheritance
Event-y-ness
DOM Bindings
Templating (of some sort)
Collections of Data
URL Routing
Fewest Line of Code
Read-ability
Tweak-ability
Be a tool, not a framework
Use POJOs where possible
Code in HTML === Bad
Keep dev console sane
var Sloth = archetype.extend({ initialize : function(name){ this.name = name; }, numOfToes : 2, nap : function(){ ... }, eat : function(food){ ... } }); var mySloth = Sloth.create("Woodford");
console.log("Hello " + mySloth.name);
var napEventId = sloth.on('nap', function(adjective){
console.log('The sloth is taking a ' + adjective + ' nap!');
});
sloth.trigger('nap', 'aggressive');
DOM.div({class:'cool_cssClass'},
"Hello ",
DOM.span({style:"font-size:3em"}, 'World')
);
css({
body: {
marginTop: "20px",
width: "100%",
p: {
color: "#BADA55"
}
}
});