A Real world Comparision
Front End Developer, Zoho Corp
Ember and Vue
Love building Browser Extension
// Ember
fullName: computed('firstName', 'lastName', function() {
return `${this.firstName} ${this.lastName}`;
})
// Vue
computed: {
fullName() {
return `${this.firstName} ${this.lastName}`;
}
}
// Ember
nameChanged: observer('fullName', function() {
this.processName();
}),
// Vue
watch: {
fullName() {
this.processName();
}
}
<MyMagicalComponent />
Name: {{name}}
<div v-if="canShow"> ... </div>
<div @click="doSomething()"> ... </div>
<div v-for="item in items" :key="item.id"> ... </div>
<MyMagicalComponent />
Name: {{name}}
{{#if canShow}} <div> ... </div> {{/if}}
<div {{action this.doSomething}}> ... </div>
{{#each items as |item|}}
<div> ... </div>
{{/each}}
// Ember
export default class Focus extends Modifier {
didInsert(element) {
element.focus();
}
}
// Vue
Vue.directive('focus', {
inserted: function (el) {
el.focus()
}
})
(Class Component blueprint)
by Robert Wagner (Ship Shape)
(insert real link)
(insert real link)
https://octane-guides-preview.emberjs.com/release/getting-started/quick-start/
Slides: http://bit.ly/ember-vue