SlideShare a Scribd company logo
1 of 18
Introduction To EmberJS
Adnan Ali Arshad
26th Jan 2014
What is Ember
● Ember is JS framework.
● Created by Yehuda Katz, a member of the jQuery, Ruby on Rails
and SproutCore core teams.
● It advocates for 'convention over configuration'.
● In December 2011, the SproutCore 2.0 framework was renamed to
Ember.js, to reduce confusion between the application framework
and the widget library of SproutCore 1.0.
● Ember.js is designed to help developers build ambitiously large
web applications that are competitive with native apps.
Ember works great if
● You want to build Desktop-app-like experience in the
brwoser.
● You're dealing with moderate – high complexity in your
app.
● Ember works great for small applications too if you know
ember already.
Ember may not be a good option if:
● You are building a relatively simple app.
● You want to launch within 6 weeks time.
● And you are new to JS.
Ember vs Angular Debate
● Here are few links for viewing at home:
● https://www.quora.com/Client-side-MVC/Is-Angular-js-or-
Ember-js-the-better-choice-for-JavaScript-frameworks
● http://www.benlesh.com/2014/04/embular-part-1-comparing-em
● http://discuss.emberjs.com/t/why-i-m-leaving-ember/6361
Core Concepts
Ember's core concepts are:
● Classes and Instances
● Bindings
● Computed Properties
Classes and Instances
● Provides JS with little object orientation.
App.Person = Ember.Object.extend({
say: function(thing){
var name = this.get('name');
alert(name +' says: ' + thing);
}
});
App.soldier = App.Person.extend({
say: function(thing) {
this._super(thing + 'sir!!');
}
});
var moosa = App.soldier.create({
name: 'ryan'
});
moosa.say('Yes');
// alerts Mossa says: Yes Sir
Data Bindings:
● Binding keep things sync
App.wife = Ember.Object.create({
income: 8000
});
App.husband = Ember.Object.create({
incomeBinding: 'App.wife.income'
});
App.husband.get('income'); // it will return 8000
App.husband.set('income', 9000);
App.wife.get('income'); // it will return 9000 as well.
Computed Properties
● Combine multiple properties and make new ones while staying in sync.
Person = Ember.Object.extend({
// these will be supplied by 'create'
firstName: null;
lastName: null;
fullName:function() {
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
});
var person1 = Person.create({
firstName: 'Moosa',
lastName: 'Sadiq'
});
person1.get('fullName');
// it will give us Moosa Sadiq
Ember Componenets
Ember app is consist of:
● Templates
● Router
● Components
● Models
● Route
● Controller
Naming Conventions
● Ember.js strongly relies on naming conventions.
● If you want the page /foo in your app, you will have the
following:
– a foo template,
– a FooRoute,
– a FooController,
– and a FooView.
– Foo is a model name.
Templates
● A template, written in the Handlebars templating language,
describes the user interface of your application.
– Expressions, like {{firstName}}, which take information
from the template's model and put it into HTML.
– Outlets, which are placeholders for other templates.
– Components, create reusable controls.
Router
● The Router is just a summary of all of your routes.
● The router translates a URL into a series of nested
templates, each backed by a model.
Models
● A model is an object that stores persistent state.
Route
● A route is an object that tells the template which model it
should display.
Controller
● A controller is an object that stores application state.
● Controller is optional as Ember handles it by default.
Demo
Questions?

More Related Content

What's hot

Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir Kaufman
 
Aae jv presentation
Aae jv presentationAae jv presentation
Aae jv presentationpaininbutt
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Trung Vo Tuan
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPressCaldera Labs
 
Mobile phone future angular js
Mobile phone future angular jsMobile phone future angular js
Mobile phone future angular jsatanacy
 
Javascript REST with Jester
Javascript REST with JesterJavascript REST with Jester
Javascript REST with JesterMike Bailey
 
anugula2setupbyshubham
anugula2setupbyshubhamanugula2setupbyshubham
anugula2setupbyshubhamShubham Verma
 
AngularJS 2.0 Jumpstart
AngularJS 2.0 JumpstartAngularJS 2.0 Jumpstart
AngularJS 2.0 JumpstartFilipe Falcão
 
Ember presentation
Ember presentationEmber presentation
Ember presentationDaniel N
 
RoR 101: Session 6
RoR 101: Session 6RoR 101: Session 6
RoR 101: Session 6Rory Gianni
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumAaron Saunders
 
Going serverless with Azure
Going serverless with AzureGoing serverless with Azure
Going serverless with AzureBujdea Bogdan
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAaron Saunders
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 

What's hot (20)

AngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLIAngularJS2 / TypeScript / CLI
AngularJS2 / TypeScript / CLI
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Aae jv presentation
Aae jv presentationAae jv presentation
Aae jv presentation
 
No SQL with Kendo UI
No SQL with Kendo UI No SQL with Kendo UI
No SQL with Kendo UI
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPress
 
Miyagawanize
MiyagawanizeMiyagawanize
Miyagawanize
 
Mobile phone future angular js
Mobile phone future angular jsMobile phone future angular js
Mobile phone future angular js
 
Javascript REST with Jester
Javascript REST with JesterJavascript REST with Jester
Javascript REST with Jester
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Rails course day 6
Rails course day 6Rails course day 6
Rails course day 6
 
anugula2setupbyshubham
anugula2setupbyshubhamanugula2setupbyshubham
anugula2setupbyshubham
 
AngularJS 2.0 Jumpstart
AngularJS 2.0 JumpstartAngularJS 2.0 Jumpstart
AngularJS 2.0 Jumpstart
 
Ember presentation
Ember presentationEmber presentation
Ember presentation
 
RoR 101: Session 6
RoR 101: Session 6RoR 101: Session 6
RoR 101: Session 6
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator Titanium
 
Intro to EmberJS
Intro to EmberJSIntro to EmberJS
Intro to EmberJS
 
Going serverless with Azure
Going serverless with AzureGoing serverless with Azure
Going serverless with Azure
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 

Viewers also liked

Evaluation of final construction
Evaluation of final constructionEvaluation of final construction
Evaluation of final constructionVictoria McColl
 
Ch 7 p pt presentationca7
Ch 7 p pt presentationca7Ch 7 p pt presentationca7
Ch 7 p pt presentationca7djohnston5
 
Intro to Ember CLI
Intro to Ember CLIIntro to Ember CLI
Intro to Ember CLIJay Phelps
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.jsJay Phelps
 
18DanKreeger_NICHI_BusinessSummit
18DanKreeger_NICHI_BusinessSummit18DanKreeger_NICHI_BusinessSummit
18DanKreeger_NICHI_BusinessSummitNICHI_USA
 

Viewers also liked (6)

Evaluation of final construction
Evaluation of final constructionEvaluation of final construction
Evaluation of final construction
 
Ch 7 p pt presentationca7
Ch 7 p pt presentationca7Ch 7 p pt presentationca7
Ch 7 p pt presentationca7
 
Intro to Ember CLI
Intro to Ember CLIIntro to Ember CLI
Intro to Ember CLI
 
L10 freour
L10 freourL10 freour
L10 freour
 
Intro to Ember.js
Intro to Ember.jsIntro to Ember.js
Intro to Ember.js
 
18DanKreeger_NICHI_BusinessSummit
18DanKreeger_NICHI_BusinessSummit18DanKreeger_NICHI_BusinessSummit
18DanKreeger_NICHI_BusinessSummit
 

Similar to Introduction to ember js

Ember CLI & Ember Tooling
Ember CLI & Ember ToolingEmber CLI & Ember Tooling
Ember CLI & Ember ToolingMark Provan
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Arunangsu Sahu
 
Building Ambitious Web Apps with Ember
Building Ambitious Web Apps with EmberBuilding Ambitious Web Apps with Ember
Building Ambitious Web Apps with Embergbabiars
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications Juliana Lucena
 
Creating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsCreating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsMurray Fife
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done RightMariusz Nowak
 
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
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization developmentJohannes Weber
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014Matt Raible
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS BasicsRavi Mone
 

Similar to Introduction to ember js (20)

Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
Ember CLI & Ember Tooling
Ember CLI & Ember ToolingEmber CLI & Ember Tooling
Ember CLI & Ember Tooling
 
NodeJS @ ACS
NodeJS @ ACSNodeJS @ ACS
NodeJS @ ACS
 
AngularJs
AngularJsAngularJs
AngularJs
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
Building Ambitious Web Apps with Ember
Building Ambitious Web Apps with EmberBuilding Ambitious Web Apps with Ember
Building Ambitious Web Apps with Ember
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications
 
Angular
AngularAngular
Angular
 
Angular js
Angular jsAngular js
Angular js
 
Creating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsCreating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure Functions
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
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
 
Full slidescr16
Full slidescr16Full slidescr16
Full slidescr16
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Fame
FameFame
Fame
 
Angular In Depth
Angular In DepthAngular In Depth
Angular In Depth
 
A Story about AngularJS modularization development
A Story about AngularJS modularization developmentA Story about AngularJS modularization development
A Story about AngularJS modularization development
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 

Recently uploaded

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Introduction to ember js

  • 1. Introduction To EmberJS Adnan Ali Arshad 26th Jan 2014
  • 2. What is Ember ● Ember is JS framework. ● Created by Yehuda Katz, a member of the jQuery, Ruby on Rails and SproutCore core teams. ● It advocates for 'convention over configuration'. ● In December 2011, the SproutCore 2.0 framework was renamed to Ember.js, to reduce confusion between the application framework and the widget library of SproutCore 1.0. ● Ember.js is designed to help developers build ambitiously large web applications that are competitive with native apps.
  • 3. Ember works great if ● You want to build Desktop-app-like experience in the brwoser. ● You're dealing with moderate – high complexity in your app. ● Ember works great for small applications too if you know ember already.
  • 4. Ember may not be a good option if: ● You are building a relatively simple app. ● You want to launch within 6 weeks time. ● And you are new to JS.
  • 5. Ember vs Angular Debate ● Here are few links for viewing at home: ● https://www.quora.com/Client-side-MVC/Is-Angular-js-or- Ember-js-the-better-choice-for-JavaScript-frameworks ● http://www.benlesh.com/2014/04/embular-part-1-comparing-em ● http://discuss.emberjs.com/t/why-i-m-leaving-ember/6361
  • 6. Core Concepts Ember's core concepts are: ● Classes and Instances ● Bindings ● Computed Properties
  • 7. Classes and Instances ● Provides JS with little object orientation. App.Person = Ember.Object.extend({ say: function(thing){ var name = this.get('name'); alert(name +' says: ' + thing); } }); App.soldier = App.Person.extend({ say: function(thing) { this._super(thing + 'sir!!'); } }); var moosa = App.soldier.create({ name: 'ryan' }); moosa.say('Yes'); // alerts Mossa says: Yes Sir
  • 8. Data Bindings: ● Binding keep things sync App.wife = Ember.Object.create({ income: 8000 }); App.husband = Ember.Object.create({ incomeBinding: 'App.wife.income' }); App.husband.get('income'); // it will return 8000 App.husband.set('income', 9000); App.wife.get('income'); // it will return 9000 as well.
  • 9. Computed Properties ● Combine multiple properties and make new ones while staying in sync. Person = Ember.Object.extend({ // these will be supplied by 'create' firstName: null; lastName: null; fullName:function() { return this.get('firstName') + ' ' + this.get('lastName'); }.property('firstName', 'lastName') }); var person1 = Person.create({ firstName: 'Moosa', lastName: 'Sadiq' }); person1.get('fullName'); // it will give us Moosa Sadiq
  • 10. Ember Componenets Ember app is consist of: ● Templates ● Router ● Components ● Models ● Route ● Controller
  • 11. Naming Conventions ● Ember.js strongly relies on naming conventions. ● If you want the page /foo in your app, you will have the following: – a foo template, – a FooRoute, – a FooController, – and a FooView. – Foo is a model name.
  • 12. Templates ● A template, written in the Handlebars templating language, describes the user interface of your application. – Expressions, like {{firstName}}, which take information from the template's model and put it into HTML. – Outlets, which are placeholders for other templates. – Components, create reusable controls.
  • 13. Router ● The Router is just a summary of all of your routes. ● The router translates a URL into a series of nested templates, each backed by a model.
  • 14. Models ● A model is an object that stores persistent state.
  • 15. Route ● A route is an object that tells the template which model it should display.
  • 16. Controller ● A controller is an object that stores application state. ● Controller is optional as Ember handles it by default.
  • 17. Demo