15. Runtastic <3 <3 <3 Ember.js
Angular.js Ember.js
✓ popular (#4 github.com)
✓ popular (#22 github.com)
✓ easy to learn
␡ easy to learn
␡ convention over configuration
␡ url-support
␡ nested UIs
␡ minimizes DOM-updates
␡ data-store
✓ convention over configuration
Dienstag, 08. Oktober 13
✓ url-support
✓ nested UIs
✓ minimizes DOM-updates
✓ data-store
16. TRUTH
“
JS-Frontend development is not trivial.
Anybody expecting to build a functional app
in 5 minutes is batshit insane and should
gtfo and die in a fire.
Dienstag, 08. Oktober 13
”
19. INTEGRATION
Easy:
Use the built in rootElement-property on Ember.Application
1 App = Ember.Application.create({
2
rootElement: '#ember-app'
3 });
http://emberjs.jsbin.com/iVUCIRo/1
Protip:You can have multiple Ember apps on one page.
-> Prevent Ember from changing URL by extending the default Router.
1 App.Router = Ember.Router.extend({
2
location: 'none'
3 });
Dienstag, 08. Oktober 13
21. COMPONENTS
Components can be shared across applications.
Components can be used to wrap 3rd party libraries (e.g. d3)
Components can be used outside of a big Ember application.
1 jsFrameworks = [
2
'Backbone', 'Marionette', 'Knockout', 'Batman',
3
'React', 'Flight', 'Angular', 'Ember'];
4
5 RT.SearchFieldComponent.create({ arrayToSearch: jsFrameworks })
6
.appendTo('#component');
http://emberjs.jsbin.com/ezApeGe/6
Protip:Write now, use now and later in a single page app.
-> Components can be nested! Composition FTW!
Dienstag, 08. Oktober 13