SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
Production Ember
Building production ember apps
whoami
twitter: @jason_madsen
github: knomedia
Why?
Why?
http://emberjs.com/guides/
Topics
Requirements
Parts
Request Flow
Handlebars Templates
Ember Build Tools
Ember Requirements
jQuery
Handlebars
Ember
Ember’s MVC ...Parts
Same letters, diïŹ€erent responsibilities
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Initial request
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Convert url to route
and route to url
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Get appropriate model
and pass to controller
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Represent the data
being persisted
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Represent the data
as it is displayed
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Display the controller
data
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Handle low level
events on
template
Ember’s MVC ...Parts
Router
Route
ControllerModel Template
ViewEmber-data (or?)
Server
Initial request
Convention
Configuration
aka “prescriptive”
Naming conventions = Ember building boiler plate objects
Handlebars Templates
inline vs pre-compiled
<script	
  id="entry-­‐template"	
  type="text/x-­‐handlebars-­‐template">
	
  	
  template	
  content
</script>
Precompiled Templates
Smaller runtime required
no browser compile (faster)
Precompiled Templates
... will significantly speed up boot time, as compilation is
the most expensive part of Handlebars.
Pre-Compile Options
Manually
Build Tool
Manual Pre-Compile
Manual Pre-Compile
https://github.com/gabrielgrant/node-ember-precompile
npm	
  install	
  -­‐g	
  ember-­‐precompile
ember-­‐precompile	
  template...	
  [-­‐f	
  OUTPUT_FILE]
Ember Build Tools*
ember-rails
ember-tools
ember-app-kit
*totally not an exhaustive list, just the ones I’ve used
ember-tools
file organization for sanity
scaïŹ€olding for learning
precompile templates
build to single file for deploy
generators
commonjs modules
ember-tools
npm	
  install	
  -­‐g	
  ember-­‐tools
ember	
  create	
  my-­‐app
cd	
  my-­‐app
ember	
  generate	
  -­‐-­‐scaffold	
  person	
  name:string	
  age:number
ember	
  build
open	
  index.html
#	
  visit	
  #/people
ember-tools
ember	
  watch
ember-tools generators
https://github.com/rpflorence/ember-tools#generator-examples
ember-tools
Includes it’s own pre-compiler
ember	
  precompile	
  -­‐d	
  src	
  -­‐f	
  output.js
Wrap Up
Use a build system
Precompile templates
Use Ember Handlebars runtime only
Concat (minify?) your js
http://emberjs.com/guides/

Weitere Àhnliche Inhalte

Was ist angesagt?

Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large apps
Enrico Teotti
 
AMT: Getting Started
AMT: Getting StartedAMT: Getting Started
AMT: Getting Started
jimmyblanchard
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
Xiaochun Shen
 

Was ist angesagt? (20)

Rails Engine :: modularize you app
Rails Engine :: modularize you appRails Engine :: modularize you app
Rails Engine :: modularize you app
 
RoR 101: Session 5
RoR 101: Session 5RoR 101: Session 5
RoR 101: Session 5
 
Web application with mule
Web application with muleWeb application with mule
Web application with mule
 
Ember CLI & Ember Tooling
Ember CLI & Ember ToolingEmber CLI & Ember Tooling
Ember CLI & Ember Tooling
 
Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012Backbonification for dummies - Arrrrug 10/1/2012
Backbonification for dummies - Arrrrug 10/1/2012
 
RoR 101: Session 3
RoR 101: Session 3RoR 101: Session 3
RoR 101: Session 3
 
Active Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WayActive Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy Way
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applications
 
Namespace less engine
Namespace less engineNamespace less engine
Namespace less engine
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
 
Rails Engines as a way to Micro services
Rails Engines as a way to Micro servicesRails Engines as a way to Micro services
Rails Engines as a way to Micro services
 
Rails Engine Patterns
Rails Engine PatternsRails Engine Patterns
Rails Engine Patterns
 
Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large apps
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webservice
 
Rails Engines
Rails EnginesRails Engines
Rails Engines
 
Introduction to ember js
Introduction to ember jsIntroduction to ember js
Introduction to ember js
 
AMT: Getting Started
AMT: Getting StartedAMT: Getting Started
AMT: Getting Started
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
 

Ähnlich wie Production ember getting started

Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
Rishu Mehra
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
SoftServe
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1
Gaurav Arora
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
urs_tush
 
ASP.NET MVC From The Ground Up
ASP.NET MVC From The Ground UpASP.NET MVC From The Ground Up
ASP.NET MVC From The Ground Up
Kevin Griffin
 

Ähnlich wie Production ember getting started (20)

Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
 
Ember.js 101 - JSChannel NCR
Ember.js 101 - JSChannel NCREmber.js 101 - JSChannel NCR
Ember.js 101 - JSChannel NCR
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
SoftServe - "ASP.NET MVC яĐș ĐœĐ°ŃŃ‚ŃƒĐżĐœĐžĐč ĐșŃ€ĐŸĐș у Ń€ĐŸĐ·ĐČотĐșу Ń‚Đ”Ń…ĐœĐŸĐ»ĐŸĐłŃ–Ń— Ń€ĐŸĐ·Ń€ĐŸĐ±ĐșĐž Web...
 
ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1ASPNet MVC series for beginers part 1
ASPNet MVC series for beginers part 1
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
 
Model View Madness
Model View MadnessModel View Madness
Model View Madness
 
Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
 
Introduction and Starting ASP.NET MVC
Introduction and Starting ASP.NET MVCIntroduction and Starting ASP.NET MVC
Introduction and Starting ASP.NET MVC
 
RoR 101: Session 4
RoR 101: Session 4RoR 101: Session 4
RoR 101: Session 4
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVC Introduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
 
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetMVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - Indiandotnet
 
L10 Web Programming
L10 Web ProgrammingL10 Web Programming
L10 Web Programming
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
MVC 6 Introduction
MVC 6 IntroductionMVC 6 Introduction
MVC 6 Introduction
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
 
ASP.NET MVC From The Ground Up
ASP.NET MVC From The Ground UpASP.NET MVC From The Ground Up
ASP.NET MVC From The Ground Up
 
A4 from rad to mvc
A4 from rad to mvcA4 from rad to mvc
A4 from rad to mvc
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂŒrzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Production ember getting started