SlideShare a Scribd company logo
1 of 30
Introduction to Ember.js
Ember Dallas - 18 Aug 2014
Jeremy Brown - notmessenger.com
What is Ember.js?
( besides awesome! )
Ember is…
• A framework for creating ambitious web applications
• Built for productivity
• Opinionated
• Sometimes perceived as difficult to learn
(Not to scale)
Core Concepts
• Models
• Routes
• Templates
• Views
• Controllers
• Components
Models
• An object that stores persistent state
• Templates are responsible for displaying the model to the
user by turning it into HTML
• In many applications, models are loaded via an HTTP
JSON API, although Ember is agnostic to the backend
that you choose
Routes
• URL representations of your application’s objects, telling
the template which model it should display (such as a url
of /cars renders a collection of cars)
• Queries the model and makes it available in the controller
and templates
• As the templates or models being shown to the user
change, Ember automatically keeps the URL in the
browser's address bar up-to-date
Routes
• This means that, at any point, users are able to share the
URL of your app. When someone clicks the link, they
reliably see the same content as the original user.
• Can also…
…set properties in Controllers
…execute events and actions
…connect a particular template to a particular controller
Templates
• The HTML (user interface) of your application
• Each template is backed by a model, accessed via the
controller, and the template automatically updates itself if the
model changes
• Written in the Handlebars templating language
• So they can include things such as…
…other templates
…usual logic such as if and else
Templates
…loops
…formatting helpers
…expressions, like {{firstName}}, which take information from
the template's model and put it into HTML
…outlets, which are placeholders in a template that routers can
plug other templates into. You can put outlets into your template
using the {{outlet}} helper.
…components, custom HTML elements that you can use to
clean up repetitive templates or create reusable controls.
Views
• Represent the visual parts of your application that the user can see
in the browser
• Associated with a controller, a handlebars template and a route
• Handle events or custom interactions that are impossible to manage
from templates
• didInsertElement hook where can interact with jQuery very easily
• Become extremely useful when you need to build reusable views,
such as modals, popovers, date-pickers and autocomplete fields
Controllers
• Objects that store application state
• Have a model set on them by a route
• Act as bridge between the model and the view or
template
• A template can retrieve properties from both the model
and a controller
• Are auto-generated if not explicitly defined
Components
• A completely isolated View that has no access to the
surrounding context
• A great way to build reusable components for your
applications
http://www.smashingmagazine.com/wp-content/uploads/2013/09/ember-sketch.png
About Controllers
Controllers
• Allow you to decorate your models with display logic
• In general, your models will have properties that are
saved to the server, while controllers will have properties
that your app does not need to save to the server
• When a template references a property, the property
value on the controller is returned if it exists, otherwise
the model assigned to the controller is looked at next
Controllers
• There are three different types of controllers:
• Controller
• Value store
• ObjectController
• Represents a single model
• ArrayController
• Represents an array of models
Controllers
• If you don't specifically define a controller for a route,
Ember will automatically make one for you based on the
return value of the route's model hook
• If it returns an object (such as a single record), an
ObjectController will be generated
• If it returns an array, an ArrayController will be generated
• If it does not return anything, an instance of
Ember.Controller will be generated
Naming Conventions
Naming Conventions
• When your application boots, Ember will look for these
objects:
• App.ApplicationRoute
• App.ApplicationController
• the application template
Naming Conventions
• If your user navigates to /favorites, Ember will look for
these objects:
• App.FavoritesRoute
• App.FavoritesController
• the favorites template
Organizing an
Ember application
Single file
Multiple files and directories
Multiple files and directories
• Requires being built into single application file
• Can be done with variety of tools, such as Brunch,
Mimosa, Grunt or Broccoli
• Strongly recommend Ember CLI
Live Code Examples
http://samhuri.net/f/ember-structure.png
Take Aways
• Architecture in Ember applications is dictated by routes
and templates
• Controllers are like decorators for your models; routes are
more like traditional controllers for your application
• Think long and hard before putting actions on controllers.
Should instead put them on the lowest shareable route.
Resources
• emberjs.com/guides
• emberjs.com/guides/cookbook
• discuss.emberjs.com
• github.com/emberjs/ember-inspector
Sources
• emberjs.com
• smashingmagazine.com/2013/11/07/an-in-depth-
introduction-to-ember-js/
• http://samhuri.net/f/ember-structure.png

More Related Content

What's hot

Catalyst 1 Introduction
Catalyst 1   IntroductionCatalyst 1   Introduction
Catalyst 1 IntroductionAran Deltac
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation Arumugam P
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantNitin Sawant
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCEmad Alashi
 
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazingMortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazingTom Walker
 
Resistance is futile: Start writing accessible websites now!
Resistance is futile: Start writing accessible websites now!Resistance is futile: Start writing accessible websites now!
Resistance is futile: Start writing accessible websites now!Vegard Haugstvedt
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER ArchitectureAhmed Lotfy
 
WebMate: A Tool for Testing Web 2.0 Applications
WebMate: A Tool for Testing Web 2.0 ApplicationsWebMate: A Tool for Testing Web 2.0 Applications
WebMate: A Tool for Testing Web 2.0 ApplicationsAnwarrChaudary
 
Information Architecture & UI Design
Information Architecture & UI DesignInformation Architecture & UI Design
Information Architecture & UI DesignIvano Malavolta
 
Introducing asp.net core mvc web application
Introducing asp.net core mvc web applicationIntroducing asp.net core mvc web application
Introducing asp.net core mvc web applicationJoy Sarker
 

What's hot (17)

Catalyst 1 Introduction
Catalyst 1   IntroductionCatalyst 1   Introduction
Catalyst 1 Introduction
 
Angular js
Angular jsAngular js
Angular js
 
Codeigniter simple explanation
Codeigniter simple explanation Codeigniter simple explanation
Codeigniter simple explanation
 
MVC Training Part 1
MVC Training Part 1MVC Training Part 1
MVC Training Part 1
 
ASP .net MVC
ASP .net MVCASP .net MVC
ASP .net MVC
 
Angular js
Angular jsAngular js
Angular js
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin SawantAsp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin Sawant
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazingMortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
 
Resistance is futile: Start writing accessible websites now!
Resistance is futile: Start writing accessible websites now!Resistance is futile: Start writing accessible websites now!
Resistance is futile: Start writing accessible websites now!
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER Architecture
 
Mashcat 2017
Mashcat 2017Mashcat 2017
Mashcat 2017
 
WebMate: A Tool for Testing Web 2.0 Applications
WebMate: A Tool for Testing Web 2.0 ApplicationsWebMate: A Tool for Testing Web 2.0 Applications
WebMate: A Tool for Testing Web 2.0 Applications
 
Information Architecture & UI Design
Information Architecture & UI DesignInformation Architecture & UI Design
Information Architecture & UI Design
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Mvc
MvcMvc
Mvc
 
Introducing asp.net core mvc web application
Introducing asp.net core mvc web applicationIntroducing asp.net core mvc web application
Introducing asp.net core mvc web application
 

Viewers also liked

An introduction to Ember.js
An introduction to Ember.jsAn introduction to Ember.js
An introduction to Ember.jscodeofficer
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.jsJay Phelps
 
The road to Ember.js 2.0
The road to Ember.js 2.0The road to Ember.js 2.0
The road to Ember.js 2.0Codemotion
 
a model for a muslim youth in the story of Yusuf AS
a model for a muslim youth in the story of Yusuf ASa model for a muslim youth in the story of Yusuf AS
a model for a muslim youth in the story of Yusuf ASAfif Suaidi
 
SXSW Interactive 2013 : ce que vous avez manqué
SXSW Interactive 2013 : ce que vous avez manquéSXSW Interactive 2013 : ce que vous avez manqué
SXSW Interactive 2013 : ce que vous avez manquéEmmanuel Fraysse
 
Hanki ja työllistä! -itseopiskelumateriaali
Hanki ja työllistä! -itseopiskelumateriaaliHanki ja työllistä! -itseopiskelumateriaali
Hanki ja työllistä! -itseopiskelumateriaaliTHL
 
The netflix way of life
The netflix way of lifeThe netflix way of life
The netflix way of lifeDaniel Halpern
 
Azure storage queues czy azure service bus, oto jest pytanie
Azure storage queues czy azure service bus, oto jest pytanieAzure storage queues czy azure service bus, oto jest pytanie
Azure storage queues czy azure service bus, oto jest pytanieMarcin Hoppe
 
Master mx 73a edicion
Master mx 73a edicionMaster mx 73a edicion
Master mx 73a edicionMaster Mx
 
Comederos para la Ganadería. Asi Ganadero
Comederos para la Ganadería. Asi Ganadero Comederos para la Ganadería. Asi Ganadero
Comederos para la Ganadería. Asi Ganadero Asi Ganadero
 
Meetup Processos de Desenvolvimento São Paulo - Gamestorming
Meetup Processos de Desenvolvimento São Paulo - GamestormingMeetup Processos de Desenvolvimento São Paulo - Gamestorming
Meetup Processos de Desenvolvimento São Paulo - GamestormingDan Vitoriano
 

Viewers also liked (15)

Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
 
An introduction to Ember.js
An introduction to Ember.jsAn introduction to Ember.js
An introduction to Ember.js
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.js
 
The road to Ember.js 2.0
The road to Ember.js 2.0The road to Ember.js 2.0
The road to Ember.js 2.0
 
a model for a muslim youth in the story of Yusuf AS
a model for a muslim youth in the story of Yusuf ASa model for a muslim youth in the story of Yusuf AS
a model for a muslim youth in the story of Yusuf AS
 
SXSW Interactive 2013 : ce que vous avez manqué
SXSW Interactive 2013 : ce que vous avez manquéSXSW Interactive 2013 : ce que vous avez manqué
SXSW Interactive 2013 : ce que vous avez manqué
 
Hanki ja työllistä! -itseopiskelumateriaali
Hanki ja työllistä! -itseopiskelumateriaaliHanki ja työllistä! -itseopiskelumateriaali
Hanki ja työllistä! -itseopiskelumateriaali
 
My black pencil
My black pencilMy black pencil
My black pencil
 
Kablosuz ağlar
Kablosuz ağlarKablosuz ağlar
Kablosuz ağlar
 
The netflix way of life
The netflix way of lifeThe netflix way of life
The netflix way of life
 
Azure storage queues czy azure service bus, oto jest pytanie
Azure storage queues czy azure service bus, oto jest pytanieAzure storage queues czy azure service bus, oto jest pytanie
Azure storage queues czy azure service bus, oto jest pytanie
 
Mit Guerilla Marketing zu einem verbesserten Marketing ROI
Mit Guerilla Marketing zu einem verbesserten Marketing ROIMit Guerilla Marketing zu einem verbesserten Marketing ROI
Mit Guerilla Marketing zu einem verbesserten Marketing ROI
 
Master mx 73a edicion
Master mx 73a edicionMaster mx 73a edicion
Master mx 73a edicion
 
Comederos para la Ganadería. Asi Ganadero
Comederos para la Ganadería. Asi Ganadero Comederos para la Ganadería. Asi Ganadero
Comederos para la Ganadería. Asi Ganadero
 
Meetup Processos de Desenvolvimento São Paulo - Gamestorming
Meetup Processos de Desenvolvimento São Paulo - GamestormingMeetup Processos de Desenvolvimento São Paulo - Gamestorming
Meetup Processos de Desenvolvimento São Paulo - Gamestorming
 

Similar to Getting Started with Ember.js

Similar to Getting Started with Ember.js (20)

Asp 1-mvc introduction
Asp 1-mvc introductionAsp 1-mvc introduction
Asp 1-mvc introduction
 
Ember.js: Jump Start
Ember.js: Jump Start Ember.js: Jump Start
Ember.js: Jump Start
 
Ember vs Backbone
Ember vs BackboneEmber vs Backbone
Ember vs Backbone
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
 
A Beginner's Guide to Ember
A Beginner's Guide to EmberA Beginner's Guide to Ember
A Beginner's Guide to Ember
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
Introduction to Ember.js
Introduction to Ember.jsIntroduction to Ember.js
Introduction to Ember.js
 
Angular js 1.3 basic tutorial
Angular js 1.3 basic tutorialAngular js 1.3 basic tutorial
Angular js 1.3 basic tutorial
 
Angular
AngularAngular
Angular
 
Brief Introduction to Ember
Brief Introduction to EmberBrief Introduction to Ember
Brief Introduction to Ember
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JSJavaScript MVC Frameworks: Backbone, Ember and Angular JS
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvcAsp 1a-aspnetmvc
Asp 1a-aspnetmvc
 
Aspnetmvc 1
Aspnetmvc 1Aspnetmvc 1
Aspnetmvc 1
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Show Some Spine!
Show Some Spine!Show Some Spine!
Show Some Spine!
 
Using MVC with Kentico 8
Using MVC with Kentico 8Using MVC with Kentico 8
Using MVC with Kentico 8
 
Ember App Kit & The Ember Resolver
Ember App Kit & The Ember ResolverEmber App Kit & The Ember Resolver
Ember App Kit & The Ember Resolver
 

Recently uploaded

Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 

Recently uploaded (20)

Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 

Getting Started with Ember.js

  • 1. Introduction to Ember.js Ember Dallas - 18 Aug 2014 Jeremy Brown - notmessenger.com
  • 2. What is Ember.js? ( besides awesome! )
  • 3. Ember is… • A framework for creating ambitious web applications • Built for productivity • Opinionated • Sometimes perceived as difficult to learn (Not to scale)
  • 5. • Models • Routes • Templates • Views • Controllers • Components
  • 6. Models • An object that stores persistent state • Templates are responsible for displaying the model to the user by turning it into HTML • In many applications, models are loaded via an HTTP JSON API, although Ember is agnostic to the backend that you choose
  • 7. Routes • URL representations of your application’s objects, telling the template which model it should display (such as a url of /cars renders a collection of cars) • Queries the model and makes it available in the controller and templates • As the templates or models being shown to the user change, Ember automatically keeps the URL in the browser's address bar up-to-date
  • 8. Routes • This means that, at any point, users are able to share the URL of your app. When someone clicks the link, they reliably see the same content as the original user. • Can also… …set properties in Controllers …execute events and actions …connect a particular template to a particular controller
  • 9. Templates • The HTML (user interface) of your application • Each template is backed by a model, accessed via the controller, and the template automatically updates itself if the model changes • Written in the Handlebars templating language • So they can include things such as… …other templates …usual logic such as if and else
  • 10. Templates …loops …formatting helpers …expressions, like {{firstName}}, which take information from the template's model and put it into HTML …outlets, which are placeholders in a template that routers can plug other templates into. You can put outlets into your template using the {{outlet}} helper. …components, custom HTML elements that you can use to clean up repetitive templates or create reusable controls.
  • 11. Views • Represent the visual parts of your application that the user can see in the browser • Associated with a controller, a handlebars template and a route • Handle events or custom interactions that are impossible to manage from templates • didInsertElement hook where can interact with jQuery very easily • Become extremely useful when you need to build reusable views, such as modals, popovers, date-pickers and autocomplete fields
  • 12. Controllers • Objects that store application state • Have a model set on them by a route • Act as bridge between the model and the view or template • A template can retrieve properties from both the model and a controller • Are auto-generated if not explicitly defined
  • 13. Components • A completely isolated View that has no access to the surrounding context • A great way to build reusable components for your applications
  • 16. Controllers • Allow you to decorate your models with display logic • In general, your models will have properties that are saved to the server, while controllers will have properties that your app does not need to save to the server • When a template references a property, the property value on the controller is returned if it exists, otherwise the model assigned to the controller is looked at next
  • 17. Controllers • There are three different types of controllers: • Controller • Value store • ObjectController • Represents a single model • ArrayController • Represents an array of models
  • 18. Controllers • If you don't specifically define a controller for a route, Ember will automatically make one for you based on the return value of the route's model hook • If it returns an object (such as a single record), an ObjectController will be generated • If it returns an array, an ArrayController will be generated • If it does not return anything, an instance of Ember.Controller will be generated
  • 20. Naming Conventions • When your application boots, Ember will look for these objects: • App.ApplicationRoute • App.ApplicationController • the application template
  • 21. Naming Conventions • If your user navigates to /favorites, Ember will look for these objects: • App.FavoritesRoute • App.FavoritesController • the favorites template
  • 24. Multiple files and directories
  • 25. Multiple files and directories • Requires being built into single application file • Can be done with variety of tools, such as Brunch, Mimosa, Grunt or Broccoli • Strongly recommend Ember CLI
  • 28. Take Aways • Architecture in Ember applications is dictated by routes and templates • Controllers are like decorators for your models; routes are more like traditional controllers for your application • Think long and hard before putting actions on controllers. Should instead put them on the lowest shareable route.
  • 29. Resources • emberjs.com/guides • emberjs.com/guides/cookbook • discuss.emberjs.com • github.com/emberjs/ember-inspector