Ember.js
Why opinions matter
Alex navasardyan
@twokul
brian cardarella
@bCARDARELLA
hire us!
Web Framework
history
- takes its roots from SproutCore
- developed by Tom Dale & Yehuda Katz
- has been through several rewrites
- SproutCore 1.0
- Amber
- Ember
- router
- runloop
- recently reached 1.0 and has a stable release process
how is it better than hadoop?
Backbone.js & ANgular.js
concepts
conventions
templates
router
route
COMponents
controller
model
Classes and Instances
SuperHero = Ember.Object.extend({firstName: '',lastName: ''});var ironMan = SuperHero.create({firstName: 'Tony',lastName: 'Stark'});console.log(ironMan.get('firstName')); // Tonyconsole.log(ironMan.get('lastName')); // Stark
computed properties
SuperHero = Ember.Object.extend({firstName: '',lastName: '',fullName: function() {return this.get('firstName') + ' ' + this.get('lastName');}.property('firstName', 'lastName')});var ironMan = SuperHero.create({firstName: 'Tony',lastName: 'Stark'});console.log(ironMan.get('lastName')); // Tony Stark
observers
SuperHero = Ember.Object.extend({firstName: '',lastName: '',lastNameChanged: function() {console.log('lastNameChanged fired!');}.observes('lastName')});var ironMan = SuperHero.create({firstName: 'Tony',lastName: 'Stark'});ironMan.set('lastName', 'Shark'); // lastNameChanged fired!
bindings
wanna learn more?
emberwatch
EMBEr 101
EMBERwatch
Ember.js
By twokul
Ember.js
- 1,521