SlideShare a Scribd company logo
The road to EmberJs 2.0
Lucio Grenzi
ROME 18-19 MARCH 2016
The road to EmberJs 2.0
Who is this guy
Freelance
Front end web developer
Over 10 years of programming
experience
Open source addicted
Github.com/dogwolf
The road to EmberJs 2.0
“A framework for creating ambitous web application”
- Emberjs homepage -
Latest version: v 2.4
Date of birth: 2011
Origin: SproutCore fork
MIT License
Mantained by the Ember.Js Community
Depends on handlebar.js and jQuery
More than 15000 GitHub stars
The road to EmberJs 2.0
What is Ember.js?
 A Javascript framework
 Based on MVC pattern
 Client side
 Single Page App
 Declarative
 Two ways data binding*
The road to EmberJs 2.0
AngularJs vs EmberJs
AngularJS is a toolset for building the framework most
suited to your application development
- AngularJs homepage-
A framework for creating ambitous web application”
- Emberjs homepage -
The road to EmberJs 2.0
Philosophy on AngularJs
Web application development needs first class support for
data binding, dependency injection and testability
Use this primitives to build your own high level
abstractions specific to your particular application's needs
The road to EmberJs 2.0
Quality of a framework
1. It should be clear where code belongs and where to
find it
2. You should have to write and mantain the least code
amount of code necessary
3. Change in one area of your app should not affect
others areas
The road to EmberJs 2.0
EmberJs Philosophy
 Stability without stagnation
 Big bang releases
 App rewrites (every new release)
 Long-lived (custom) branches
The road to EmberJs 2.0
EmberJs release cycle
Six weeks release cycle
Add new features
Deprecates nasty parts of the code
Ember 2.0 only removes features that were deprecated as
of Ember 1.13
The road to EmberJs 2.0
What’s new in EmberJs 2.0
• Ember CLI
• Shift to Components
• Glimmer, the new rendering engine
• ES6 modules at the core
• One-way values by default
• Simplification of many Ember concepts:
– New attribute binding syntax
– HTML syntax (angle brackets) for Components
– More consistent scoping
– much more…
The road to EmberJs 2.0
Ember-cli
The road to EmberJs 2.0
Ember-cli support
Handlebars
HTMLBars
Emblem
LESS
Sass
Compass
Stylus
CoffeeScript
EmberScript
Minified JS & CSS
The road to EmberJs 2.0
Ember-cli (cont.)
Require Node.js and npm
Require Bower in order to keep your front-end dependencies
up-to-date
$npm install -g bower
Reccomended PhantomJs in order to use the automated test
runner
$npm install -g phantomjs-prebuilt
The road to EmberJs 2.0
Create a new project
$ember new my-app
Launch a project
$cd my-app
$ember server
Navigate to http://localhost:4200 to see the new app
The road to EmberJs 2.0
Other usefull commands
$ember build
Builds the application into the dist/ directory
$ember test
Run tests with Testem in CI mode.
$ember install <addon-name>
Installs addon-name into your project and saves it to the
package.json file
The road to EmberJs 2.0
Ember-cli addon system
Provides a way to create reusable units of code
Extend the build tool
Found all the addons at emberaddons.com
The road to EmberJs 2.0
Emberaddons
The road to EmberJs 2.0
Handlebars 2.x
A superset of the Mustache template engine
First added to EmberJ 1.9
The focus is keeping the logic out of the template
The road to EmberJs 2.0
<body>
<script type="text/x-handlebars" id="ember-template" data-template-
name="index">
</b>My videos</b><ul>
{{#each video in videos}}
<li>{{#link-to 'videos.edit' video}}{{video.title}}{{/link-to}}</li>
{{/each}}
</ul></script>
</body>
The road to EmberJs 2.0
var source = $("#ember-template").html();
var template = Handlebars.compile(source);
App.Router.map(function() {
this.resource("videos", function(){
this.route("edit", { path: "/:video_id" });
});
});
Result:
<ul>
<li><a href="/videos/1">My first video</a></li>
<li><a href="/videos/2">My second video</a></li>
<li><a href="/videos/3">My third video</a></li>
</ul>
The road to EmberJs 2.0
Glimmer
The render engine, since version 1.13
Takes advantage of the groundwork laid by HTMLBars to
dramatically improve re-rendering performance.
Compatible with the full public API of Ember 1.x
The road to EmberJs 2.0
Glimmer (cont.)
Takes advantage of the React-inspired improvements to
the Ember programming model
 Value-diffing strategy by using a virtual tree of the
dynamic areas of the DOM
 Supporting efficient re-renders of entire data structures.
 Explicit mutation (via set) when it is used
The road to EmberJs 2.0
One-Way Bindings
On Ember 1.x component properties used to be bound
two ways.
Property of a component as well as its data source are
both mutable.
{{#my-component compName=model.name }}{{/my-
component}}
<my-component compName=model.name ></my-
component>
The road to EmberJs 2.0
Explicitly a two-way binding
There is a new mut keyword to explicit the old behaviour
<my-component compName={{mut model.name}} ></my-
component>
The road to EmberJs 2.0
Manage a mutable component
Set the value of the property
this.attrs.compName.update("newcompName");
Show the actual value of the property
this.attrs.firstName.value;
The road to EmberJs 2.0
Ember-data
Library for robustly managing model data in your Ember.js
applications
Is designed to be agnostic to the underlying persistence
mechanism
Uses Promises/A+-compatible promises to manage
loading and saving records
The road to EmberJs 2.0
Getting started with Ember-data
Version >= 2.3 ember-data is a proper Ember-CLI
$ember install ember-data
Version < 2.3, add the npm package and add the
dependency via bower:
npm install ember-data@v2.2.2 --save-dev
bower install ember-data --save
The road to EmberJs 2.0
Ember-data flow
Application
Store
Adapter
Cloud
Promise (with records)
Promise (json)
find()
find()
XHR() XHR() returns
The road to EmberJs 2.0
The Store
The store is responsible for managing the lifecycle of your
models.
By loading the Ember Data library in your app, all of the
routes and controllers in will get a new store property
The road to EmberJs 2.0
The Adapter
The adapter is responsible for translating requests from
Ember-data into requests on your server.
The road to EmberJs 2.0
How it woks
// app/models/news.js
import DS from 'ember-data';
export default DS.Model.extend({
title: DS.attr('string'),
createdBy: DS.attr('string'),
createdAt: DS.attr('date'),
comments: DS.hasMany('comment')
});
// app/models/comment.js
import DS from 'ember-data';
export default DS.Model.extend({
message: DS.attr('string'),
sentAt: DS.attr('date'),
nickname: DS.attr('string'),
post: DS.belongsTo('news')
});
Retrieve multiple records
var newses = this.store.findAll('news'); // => GET /posts
var newses = this.store.peekAll('news'); // => no network request
Query for multiple records
this.store.query('news', { filter: { createdBy:'Lucio' }
}).then(function(param_1) {
});
The road to EmberJs 2.0
More intuitive attribute bindings
Ember 1.x (deprecated)
<a {{bind-attr href=url}}>Click here</a>
Ember 2.x
<a href="{{url}}">Click here</a>
The road to EmberJs 2.0
Components
Based on of the W3C Web Components specification
The specification is comprised of four smaller
specifications; templates, decorators, shadow DOM,
and custom elements.
The road to EmberJs 2.0
Ember Components vs. Ember Views
 EmberJs is a MVC .. V doesn't stand for view?

 Components are a subclass of Ember.View

 Views are generally found in the context of a controller.

 Views sit behind a template and turn input into a semantic
action in a controller or route.
The road to EmberJs 2.0
Ember Components vs. Ember Views
 EmberJs component do not have a context, they only
know about the interface that they define
 Components can be rendered into any context, making it
decoupled and reusable.
 In order to render properly a component you must supply
it with data that it's expecting
The road to EmberJs 2.0
Anatomy of an Ember Components
An Ember component consists of a Handlebars template
file and an accompanying Ember class (if needed extra
interactivity with the component).
The road to EmberJs 2.0
Generate an Ember Component
$ ember generate component multitabs
This will create three new files
 a Handlebars file for our HTML
 app/templates/components/multitabs.hbs
 a JavaScript file for our component class
app/components/multitabs.js
 a test file
tests/integration/components/multitabs-test.js
The road to EmberJs 2.0
Using the Component
Open the application template
app/templates/application.hbs
Add in the following after the h3 tag to use the component.
{{multitabs}}
The road to EmberJs 2.0
Add dynamic data
$ ember generate route application
This will generate app/routes/application.js.
Open this up and add a model property:
export default Ember.Route.extend({
model: function(){
});
});
The road to EmberJs 2.0
Add Polymer to Ember project
$ ember new PolymerProject
$ bower install polymer --save
The road to EmberJs 2.0
// Brocfile.js
...
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
...
var app = new EmberApp();
...
var polymer = pickFiles('bower_components/', {
srcDir: '',
files: [
'webcomponentsjs/webcomponents.js',
'polymer/polymer.html'
// 'polymer/polymer.js'
],
destDir: '/assets'
});
module.exports = mergeTrees([ polymer, app.toTree()]);
// Index.html
...
<script src="assets/webcomponentsjs/webcomponents.js"></script>
...
The road to EmberJs 2.0
Resources and References
https://github.com/emberjs/data
https://github.com/emberjs/rfcs/pull/15
http://ember-cli.com/
http://code.tutsplus.com/tutorials/ember-components-a-
deep-dive--net-35551
http://www.sitepoint.com/understanding-components-in-
ember-2/
The road to EmberJs 2.0
Questions?
https://www.flickr.com/photos/derek_b/3046770021/
Thanks!
ROME 18-19 MARCH 2016
l.grenzi@gmail.com
Dogwolf
lucio.grenzi
All pictures belong
to their respective authors

More Related Content

What's hot

Spring Basics
Spring BasicsSpring Basics
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
Anil Kumar
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorial
Sanjoy Kumer Deb
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
John Lewis
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.js
Ben Combee
 
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIsCustom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
Akhil Mittal
 
Yapi.js, An Adaptive Streaming Web Player
Yapi.js, An Adaptive Streaming Web PlayerYapi.js, An Adaptive Streaming Web Player
Yapi.js, An Adaptive Streaming Web Player
Jesse (Chien Chen) Chen
 
How to Build a Java client for SugarCRM
How to Build a Java client for SugarCRMHow to Build a Java client for SugarCRM
How to Build a Java client for SugarCRM
Antonio Musarra
 
Built to Last
Built to LastBuilt to Last
Built to Last
Dan Lynch
 
Html servlet example
Html   servlet exampleHtml   servlet example
Html servlet example
rvpprash
 
Introduce native html5 streaming player
Introduce native html5 streaming playerIntroduce native html5 streaming player
Introduce native html5 streaming player
Jesse (Chien Chen) Chen
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)
Jesse (Chien Chen) Chen
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)
Chitrank Dixit
 
Spring WebApplication development
Spring WebApplication developmentSpring WebApplication development
Spring WebApplication development
ThirupathiReddy Vajjala
 
Modular applications with montage components
Modular applications with montage componentsModular applications with montage components
Modular applications with montage components
Benoit Marchant
 
Symfony3 w duecie z Vue.js
Symfony3 w duecie z Vue.jsSymfony3 w duecie z Vue.js
Symfony3 w duecie z Vue.js
X-Coding IT Studio
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
Dzmitry Naskou
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
Joshua Long
 
REST Architecture with use case and example
REST Architecture with use case and exampleREST Architecture with use case and example
REST Architecture with use case and example
Shailesh singh
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 

What's hot (20)

Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
108 advancedjava
108 advancedjava108 advancedjava
108 advancedjava
 
Spring tutorial
Spring tutorialSpring tutorial
Spring tutorial
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
JavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.jsJavaScript on HP webOS: Enyo and Node.js
JavaScript on HP webOS: Enyo and Node.js
 
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIsCustom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs
 
Yapi.js, An Adaptive Streaming Web Player
Yapi.js, An Adaptive Streaming Web PlayerYapi.js, An Adaptive Streaming Web Player
Yapi.js, An Adaptive Streaming Web Player
 
How to Build a Java client for SugarCRM
How to Build a Java client for SugarCRMHow to Build a Java client for SugarCRM
How to Build a Java client for SugarCRM
 
Built to Last
Built to LastBuilt to Last
Built to Last
 
Html servlet example
Html   servlet exampleHtml   servlet example
Html servlet example
 
Introduce native html5 streaming player
Introduce native html5 streaming playerIntroduce native html5 streaming player
Introduce native html5 streaming player
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)
 
Spring WebApplication development
Spring WebApplication developmentSpring WebApplication development
Spring WebApplication development
 
Modular applications with montage components
Modular applications with montage componentsModular applications with montage components
Modular applications with montage components
 
Symfony3 w duecie z Vue.js
Symfony3 w duecie z Vue.jsSymfony3 w duecie z Vue.js
Symfony3 w duecie z Vue.js
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
REST Architecture with use case and example
REST Architecture with use case and exampleREST Architecture with use case and example
REST Architecture with use case and example
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
 

Viewers also liked

What are they_wearing
What are they_wearingWhat are they_wearing
What are they_wearing
Mil Milena
 
Brasil
BrasilBrasil
Brasil
guest6bd422
 
I saloni vinheta
I saloni vinhetaI saloni vinheta
I saloni vinheta
Patricia Melo
 
Imprimir pan
Imprimir panImprimir pan
Imprimir pan
Susana Beltran
 
Amistad e inocencia
Amistad e inocenciaAmistad e inocencia
Amistad e inocencia
Emilio Gil (unjubilado)
 
Articul Media: Производительность - неотъемлемая составляющая качества проекта
Articul Media: Производительность - неотъемлемая составляющая качества проектаArticul Media: Производительность - неотъемлемая составляющая качества проекта
Articul Media: Производительность - неотъемлемая составляющая качества проектаArticul Media
 
Cloud Kiosk for Microsoft Cloud Services 0316
Cloud Kiosk for Microsoft Cloud Services 0316Cloud Kiosk for Microsoft Cloud Services 0316
Cloud Kiosk for Microsoft Cloud Services 0316
Gilbert Louis
 
Profili professionali della funzione risorse umane: l’attività di certificazi...
Profili professionali della funzione risorse umane: l’attività di certificazi...Profili professionali della funzione risorse umane: l’attività di certificazi...
Profili professionali della funzione risorse umane: l’attività di certificazi...
UNI - Ente Italiano di Normazione
 
Penn Valley Church Announcements 3 20-16
Penn Valley Church Announcements 3 20-16Penn Valley Church Announcements 3 20-16
Penn Valley Church Announcements 3 20-16
PennValleyChurch
 
Why technology
Why technologyWhy technology
Why technology
Natalia Arsand
 
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
UNI - Ente Italiano di Normazione
 
Escocia
EscociaEscocia
Nyttestyring i felten
Nyttestyring i felten Nyttestyring i felten
Nyttestyring i felten
Marit Rossnes
 

Viewers also liked (15)

What are they_wearing
What are they_wearingWhat are they_wearing
What are they_wearing
 
Brasil
BrasilBrasil
Brasil
 
I saloni vinheta
I saloni vinhetaI saloni vinheta
I saloni vinheta
 
Imprimir pan
Imprimir panImprimir pan
Imprimir pan
 
Amistad e inocencia
Amistad e inocenciaAmistad e inocencia
Amistad e inocencia
 
Articul Media: Производительность - неотъемлемая составляющая качества проекта
Articul Media: Производительность - неотъемлемая составляющая качества проектаArticul Media: Производительность - неотъемлемая составляющая качества проекта
Articul Media: Производительность - неотъемлемая составляющая качества проекта
 
Cloud Kiosk for Microsoft Cloud Services 0316
Cloud Kiosk for Microsoft Cloud Services 0316Cloud Kiosk for Microsoft Cloud Services 0316
Cloud Kiosk for Microsoft Cloud Services 0316
 
Presentation1
Presentation1Presentation1
Presentation1
 
Profili professionali della funzione risorse umane: l’attività di certificazi...
Profili professionali della funzione risorse umane: l’attività di certificazi...Profili professionali della funzione risorse umane: l’attività di certificazi...
Profili professionali della funzione risorse umane: l’attività di certificazi...
 
Penn Valley Church Announcements 3 20-16
Penn Valley Church Announcements 3 20-16Penn Valley Church Announcements 3 20-16
Penn Valley Church Announcements 3 20-16
 
Why technology
Why technologyWhy technology
Why technology
 
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
HR in outsourcing una via per far crescere la cultura HR insieme all’organizz...
 
Escocia
EscociaEscocia
Escocia
 
Presentation1
Presentation1Presentation1
Presentation1
 
Nyttestyring i felten
Nyttestyring i felten Nyttestyring i felten
Nyttestyring i felten
 

Similar to Full slidescr16

Intro to EmberJS
Intro to EmberJSIntro to EmberJS
Intro to EmberJS
Billy Onjea
 
Ember presentation
Ember presentationEmber presentation
Ember presentation
Daniel N
 
Delivering with ember.js
Delivering with ember.jsDelivering with ember.js
Delivering with ember.js
Andrei Sebastian Cîmpean
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
Visual Engineering
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 
Ember CLI & Ember Tooling
Ember CLI & Ember ToolingEmber CLI & Ember Tooling
Ember CLI & Ember Tooling
Mark Provan
 
Meteor
MeteorMeteor
One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"
testflyjets
 
NodeJS @ ACS
NodeJS @ ACSNodeJS @ ACS
NodeJS @ ACS
Mauro Parra-Miranda
 
TorqueBox
TorqueBoxTorqueBox
TorqueBox
bobmcwhirter
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
Rich Helton
 
Create an application with ember
Create an application with ember Create an application with ember
Create an application with ember
Chandra Sekar
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
Diacode
 
Javascript Frameworks for Well Architected, Immersive Web Apps
Javascript Frameworks for Well Architected, Immersive Web AppsJavascript Frameworks for Well Architected, Immersive Web Apps
Javascript Frameworks for Well Architected, Immersive Web Apps
dnelson-cs
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
Brady Cheng
 
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
CodeCamp Iasi 10 March 2012 -   Gabriel Enea - ASP.NET Web APICodeCamp Iasi 10 March 2012 -   Gabriel Enea - ASP.NET Web API
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
Codecamp Romania
 
Ember,js: Hipster Hamster Framework
Ember,js: Hipster Hamster FrameworkEmber,js: Hipster Hamster Framework
Ember,js: Hipster Hamster Framework
Billy Shih
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
Sapna Upreti
 
Workshop 17: EmberJS parte II
Workshop 17: EmberJS parte IIWorkshop 17: EmberJS parte II
Workshop 17: EmberJS parte II
Visual Engineering
 
Elefrant [ng-Poznan]
Elefrant [ng-Poznan]Elefrant [ng-Poznan]
Elefrant [ng-Poznan]
Marcos Latorre
 

Similar to Full slidescr16 (20)

Intro to EmberJS
Intro to EmberJSIntro to EmberJS
Intro to EmberJS
 
Ember presentation
Ember presentationEmber presentation
Ember presentation
 
Delivering with ember.js
Delivering with ember.jsDelivering with ember.js
Delivering with ember.js
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Ember CLI & Ember Tooling
Ember CLI & Ember ToolingEmber CLI & Ember Tooling
Ember CLI & Ember Tooling
 
Meteor
MeteorMeteor
Meteor
 
One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"
 
NodeJS @ ACS
NodeJS @ ACSNodeJS @ ACS
NodeJS @ ACS
 
TorqueBox
TorqueBoxTorqueBox
TorqueBox
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
 
Create an application with ember
Create an application with ember Create an application with ember
Create an application with ember
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 
Javascript Frameworks for Well Architected, Immersive Web Apps
Javascript Frameworks for Well Architected, Immersive Web AppsJavascript Frameworks for Well Architected, Immersive Web Apps
Javascript Frameworks for Well Architected, Immersive Web Apps
 
RoR guide_p1
RoR guide_p1RoR guide_p1
RoR guide_p1
 
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
CodeCamp Iasi 10 March 2012 -   Gabriel Enea - ASP.NET Web APICodeCamp Iasi 10 March 2012 -   Gabriel Enea - ASP.NET Web API
CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API
 
Ember,js: Hipster Hamster Framework
Ember,js: Hipster Hamster FrameworkEmber,js: Hipster Hamster Framework
Ember,js: Hipster Hamster Framework
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Workshop 17: EmberJS parte II
Workshop 17: EmberJS parte IIWorkshop 17: EmberJS parte II
Workshop 17: EmberJS parte II
 
Elefrant [ng-Poznan]
Elefrant [ng-Poznan]Elefrant [ng-Poznan]
Elefrant [ng-Poznan]
 

More from Lucio Grenzi

How to use Postgresql in order to handle Prometheus metrics storage
How to use Postgresql in order to handle Prometheus metrics storageHow to use Postgresql in order to handle Prometheus metrics storage
How to use Postgresql in order to handle Prometheus metrics storage
Lucio Grenzi
 
Building serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platformBuilding serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platform
Lucio Grenzi
 
Patroni: PostgreSQL HA in the cloud
Patroni: PostgreSQL HA in the cloudPatroni: PostgreSQL HA in the cloud
Patroni: PostgreSQL HA in the cloud
Lucio Grenzi
 
Postgrest: the REST API for PostgreSQL databases
Postgrest: the REST API for PostgreSQL databasesPostgrest: the REST API for PostgreSQL databases
Postgrest: the REST API for PostgreSQL databases
Lucio Grenzi
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile application
Lucio Grenzi
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & Postgresql
Lucio Grenzi
 
Jenkins djangovillage
Jenkins djangovillageJenkins djangovillage
Jenkins djangovillage
Lucio Grenzi
 
Geodjango and HTML 5
Geodjango and HTML 5Geodjango and HTML 5
Geodjango and HTML 5
Lucio Grenzi
 
PLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web sidePLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web side
Lucio Grenzi
 
Pg tap
Pg tapPg tap
Pg tap
Lucio Grenzi
 
Geodjango
GeodjangoGeodjango
Geodjango
Lucio Grenzi
 
Yui app-framework
Yui app-frameworkYui app-framework
Yui app-framework
Lucio Grenzi
 
node.js e Postgresql
node.js e Postgresqlnode.js e Postgresql
node.js e Postgresql
Lucio Grenzi
 

More from Lucio Grenzi (13)

How to use Postgresql in order to handle Prometheus metrics storage
How to use Postgresql in order to handle Prometheus metrics storageHow to use Postgresql in order to handle Prometheus metrics storage
How to use Postgresql in order to handle Prometheus metrics storage
 
Building serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platformBuilding serverless application on the Apache Openwhisk platform
Building serverless application on the Apache Openwhisk platform
 
Patroni: PostgreSQL HA in the cloud
Patroni: PostgreSQL HA in the cloudPatroni: PostgreSQL HA in the cloud
Patroni: PostgreSQL HA in the cloud
 
Postgrest: the REST API for PostgreSQL databases
Postgrest: the REST API for PostgreSQL databasesPostgrest: the REST API for PostgreSQL databases
Postgrest: the REST API for PostgreSQL databases
 
Use Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile applicationUse Ionic Framework to develop mobile application
Use Ionic Framework to develop mobile application
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & Postgresql
 
Jenkins djangovillage
Jenkins djangovillageJenkins djangovillage
Jenkins djangovillage
 
Geodjango and HTML 5
Geodjango and HTML 5Geodjango and HTML 5
Geodjango and HTML 5
 
PLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web sidePLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web side
 
Pg tap
Pg tapPg tap
Pg tap
 
Geodjango
GeodjangoGeodjango
Geodjango
 
Yui app-framework
Yui app-frameworkYui app-framework
Yui app-framework
 
node.js e Postgresql
node.js e Postgresqlnode.js e Postgresql
node.js e Postgresql
 

Recently uploaded

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

Full slidescr16

  • 1. The road to EmberJs 2.0 Lucio Grenzi ROME 18-19 MARCH 2016
  • 2. The road to EmberJs 2.0 Who is this guy Freelance Front end web developer Over 10 years of programming experience Open source addicted Github.com/dogwolf
  • 3. The road to EmberJs 2.0 “A framework for creating ambitous web application” - Emberjs homepage - Latest version: v 2.4 Date of birth: 2011 Origin: SproutCore fork MIT License Mantained by the Ember.Js Community Depends on handlebar.js and jQuery More than 15000 GitHub stars
  • 4. The road to EmberJs 2.0 What is Ember.js?  A Javascript framework  Based on MVC pattern  Client side  Single Page App  Declarative  Two ways data binding*
  • 5. The road to EmberJs 2.0 AngularJs vs EmberJs AngularJS is a toolset for building the framework most suited to your application development - AngularJs homepage- A framework for creating ambitous web application” - Emberjs homepage -
  • 6. The road to EmberJs 2.0 Philosophy on AngularJs Web application development needs first class support for data binding, dependency injection and testability Use this primitives to build your own high level abstractions specific to your particular application's needs
  • 7. The road to EmberJs 2.0 Quality of a framework 1. It should be clear where code belongs and where to find it 2. You should have to write and mantain the least code amount of code necessary 3. Change in one area of your app should not affect others areas
  • 8. The road to EmberJs 2.0 EmberJs Philosophy  Stability without stagnation  Big bang releases  App rewrites (every new release)  Long-lived (custom) branches
  • 9. The road to EmberJs 2.0 EmberJs release cycle Six weeks release cycle Add new features Deprecates nasty parts of the code Ember 2.0 only removes features that were deprecated as of Ember 1.13
  • 10. The road to EmberJs 2.0 What’s new in EmberJs 2.0 • Ember CLI • Shift to Components • Glimmer, the new rendering engine • ES6 modules at the core • One-way values by default • Simplification of many Ember concepts: – New attribute binding syntax – HTML syntax (angle brackets) for Components – More consistent scoping – much more…
  • 11. The road to EmberJs 2.0 Ember-cli
  • 12. The road to EmberJs 2.0 Ember-cli support Handlebars HTMLBars Emblem LESS Sass Compass Stylus CoffeeScript EmberScript Minified JS & CSS
  • 13. The road to EmberJs 2.0 Ember-cli (cont.) Require Node.js and npm Require Bower in order to keep your front-end dependencies up-to-date $npm install -g bower Reccomended PhantomJs in order to use the automated test runner $npm install -g phantomjs-prebuilt
  • 14. The road to EmberJs 2.0 Create a new project $ember new my-app Launch a project $cd my-app $ember server Navigate to http://localhost:4200 to see the new app
  • 15. The road to EmberJs 2.0 Other usefull commands $ember build Builds the application into the dist/ directory $ember test Run tests with Testem in CI mode. $ember install <addon-name> Installs addon-name into your project and saves it to the package.json file
  • 16. The road to EmberJs 2.0 Ember-cli addon system Provides a way to create reusable units of code Extend the build tool Found all the addons at emberaddons.com
  • 17. The road to EmberJs 2.0 Emberaddons
  • 18. The road to EmberJs 2.0 Handlebars 2.x A superset of the Mustache template engine First added to EmberJ 1.9 The focus is keeping the logic out of the template
  • 19. The road to EmberJs 2.0 <body> <script type="text/x-handlebars" id="ember-template" data-template- name="index"> </b>My videos</b><ul> {{#each video in videos}} <li>{{#link-to 'videos.edit' video}}{{video.title}}{{/link-to}}</li> {{/each}} </ul></script> </body>
  • 20. The road to EmberJs 2.0 var source = $("#ember-template").html(); var template = Handlebars.compile(source); App.Router.map(function() { this.resource("videos", function(){ this.route("edit", { path: "/:video_id" }); }); }); Result: <ul> <li><a href="/videos/1">My first video</a></li> <li><a href="/videos/2">My second video</a></li> <li><a href="/videos/3">My third video</a></li> </ul>
  • 21. The road to EmberJs 2.0 Glimmer The render engine, since version 1.13 Takes advantage of the groundwork laid by HTMLBars to dramatically improve re-rendering performance. Compatible with the full public API of Ember 1.x
  • 22. The road to EmberJs 2.0 Glimmer (cont.) Takes advantage of the React-inspired improvements to the Ember programming model  Value-diffing strategy by using a virtual tree of the dynamic areas of the DOM  Supporting efficient re-renders of entire data structures.  Explicit mutation (via set) when it is used
  • 23. The road to EmberJs 2.0 One-Way Bindings On Ember 1.x component properties used to be bound two ways. Property of a component as well as its data source are both mutable. {{#my-component compName=model.name }}{{/my- component}} <my-component compName=model.name ></my- component>
  • 24. The road to EmberJs 2.0 Explicitly a two-way binding There is a new mut keyword to explicit the old behaviour <my-component compName={{mut model.name}} ></my- component>
  • 25. The road to EmberJs 2.0 Manage a mutable component Set the value of the property this.attrs.compName.update("newcompName"); Show the actual value of the property this.attrs.firstName.value;
  • 26. The road to EmberJs 2.0 Ember-data Library for robustly managing model data in your Ember.js applications Is designed to be agnostic to the underlying persistence mechanism Uses Promises/A+-compatible promises to manage loading and saving records
  • 27. The road to EmberJs 2.0 Getting started with Ember-data Version >= 2.3 ember-data is a proper Ember-CLI $ember install ember-data Version < 2.3, add the npm package and add the dependency via bower: npm install ember-data@v2.2.2 --save-dev bower install ember-data --save
  • 28. The road to EmberJs 2.0 Ember-data flow Application Store Adapter Cloud Promise (with records) Promise (json) find() find() XHR() XHR() returns
  • 29. The road to EmberJs 2.0 The Store The store is responsible for managing the lifecycle of your models. By loading the Ember Data library in your app, all of the routes and controllers in will get a new store property
  • 30. The road to EmberJs 2.0 The Adapter The adapter is responsible for translating requests from Ember-data into requests on your server.
  • 31. The road to EmberJs 2.0 How it woks // app/models/news.js import DS from 'ember-data'; export default DS.Model.extend({ title: DS.attr('string'), createdBy: DS.attr('string'), createdAt: DS.attr('date'), comments: DS.hasMany('comment') }); // app/models/comment.js import DS from 'ember-data'; export default DS.Model.extend({ message: DS.attr('string'), sentAt: DS.attr('date'), nickname: DS.attr('string'), post: DS.belongsTo('news') }); Retrieve multiple records var newses = this.store.findAll('news'); // => GET /posts var newses = this.store.peekAll('news'); // => no network request Query for multiple records this.store.query('news', { filter: { createdBy:'Lucio' } }).then(function(param_1) { });
  • 32. The road to EmberJs 2.0 More intuitive attribute bindings Ember 1.x (deprecated) <a {{bind-attr href=url}}>Click here</a> Ember 2.x <a href="{{url}}">Click here</a>
  • 33. The road to EmberJs 2.0 Components Based on of the W3C Web Components specification The specification is comprised of four smaller specifications; templates, decorators, shadow DOM, and custom elements.
  • 34. The road to EmberJs 2.0 Ember Components vs. Ember Views  EmberJs is a MVC .. V doesn't stand for view?   Components are a subclass of Ember.View   Views are generally found in the context of a controller.   Views sit behind a template and turn input into a semantic action in a controller or route.
  • 35. The road to EmberJs 2.0 Ember Components vs. Ember Views  EmberJs component do not have a context, they only know about the interface that they define  Components can be rendered into any context, making it decoupled and reusable.  In order to render properly a component you must supply it with data that it's expecting
  • 36. The road to EmberJs 2.0 Anatomy of an Ember Components An Ember component consists of a Handlebars template file and an accompanying Ember class (if needed extra interactivity with the component).
  • 37. The road to EmberJs 2.0 Generate an Ember Component $ ember generate component multitabs This will create three new files  a Handlebars file for our HTML  app/templates/components/multitabs.hbs  a JavaScript file for our component class app/components/multitabs.js  a test file tests/integration/components/multitabs-test.js
  • 38. The road to EmberJs 2.0 Using the Component Open the application template app/templates/application.hbs Add in the following after the h3 tag to use the component. {{multitabs}}
  • 39. The road to EmberJs 2.0 Add dynamic data $ ember generate route application This will generate app/routes/application.js. Open this up and add a model property: export default Ember.Route.extend({ model: function(){ }); });
  • 40. The road to EmberJs 2.0 Add Polymer to Ember project $ ember new PolymerProject $ bower install polymer --save
  • 41. The road to EmberJs 2.0 // Brocfile.js ... var EmberApp = require('ember-cli/lib/broccoli/ember-app'); ... var app = new EmberApp(); ... var polymer = pickFiles('bower_components/', { srcDir: '', files: [ 'webcomponentsjs/webcomponents.js', 'polymer/polymer.html' // 'polymer/polymer.js' ], destDir: '/assets' }); module.exports = mergeTrees([ polymer, app.toTree()]); // Index.html ... <script src="assets/webcomponentsjs/webcomponents.js"></script> ...
  • 42. The road to EmberJs 2.0 Resources and References https://github.com/emberjs/data https://github.com/emberjs/rfcs/pull/15 http://ember-cli.com/ http://code.tutsplus.com/tutorials/ember-components-a- deep-dive--net-35551 http://www.sitepoint.com/understanding-components-in- ember-2/
  • 43. The road to EmberJs 2.0 Questions? https://www.flickr.com/photos/derek_b/3046770021/
  • 44. Thanks! ROME 18-19 MARCH 2016 l.grenzi@gmail.com Dogwolf lucio.grenzi All pictures belong to their respective authors