Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to Ember.js
Search
Paulius Norkus
October 23, 2013
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Ember.js
Paulius Norkus
October 23, 2013
More Decks by Paulius Norkus
See All by Paulius Norkus
ASP.NET vNext
pauliusnorkus
1
81
MonoGame
pauliusnorkus
0
350
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
4.6k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
新卒PdEのリアル
ryu1013
1
500
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
PL/pgSQLはなぜ「ふつうのSQL」より遅いのか
tameguro
0
110
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
700
XHTMLが残したもの
yosuke_furukawa
PRO
2
810
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
250
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
180
Are APIs Still Relevant in the AI Era?
soyuka
0
250
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
610
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
430
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
280
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Marketing to machines
jonoalderson
1
5.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
810
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Transcript
Introduction to Ember.js Paulius Norkus AdDuplex
What is Ember.js • A framework for creating ambitious web
applications • Based on MVC • Auto-Updating DOM • Conventions over configuration • Dependencies: • jQuery • Handelbars.js
Core Concepts • Classes and Instances • Computed Properties •
Bindings • Observers • Templates
Classes and Instances 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.say(thing + ", sir!"); } }); var soldier = App.Soldier.create({ name: "Ryan" }); soldier.say("Yes"); // alerts "Ryan says: Yes, sir!"
Computed Properties App.Person = Ember.Object.extend({ firstName: null, lastName: null, fullName:
function (){ return this.get("firstName") + " " + this.get("lastName"); }.property("firstName", "lastName") }); var person = App.Person.create({ firstName: "Paulius", lastName: "Norkus" }); person.get("fullName"); // "Paulius Norkus"
Bindings App.wife = Ember.Object.create({ householdIncome: 80000 }); App.husband = Ember.Object.create({
houseboldIncomeBinding: "App.wife.householdIncome" }); App.husband.get("householdIncome"); // 80000 //Someone get raise. App.husband.set("householdIncome", 90000); App.wife.get("householdIncome"); // 90000
Observers App.Person = Ember.Object.extend({ firstName: null, lastName: null, fullName: function
() { return this.get("firstName") + " " + this.get("lastName"); }.property("firstName", "lastName"), fullNameDidChange: function () { alert("Changed!"); }.observes("fullName") }); var person = App.Person.create({ firstName: "Paulius", lastName: "Norkus" }); person.set("firstName", "Jonas"); // alerts "Changed!"
Templates <script type="text/x-handlebars" id="posts"> <h1>{{categoryName}}</h1> <h2>Posts:</h2> <ul> {{#each post in
posts}} <li>{{post.title}}</li> {{else}} <p>No posts yet.</p> {{/each}} </ul> </script> Uses Handelbars.js templates with Ember.js helpers
Demo
Who is using Ember.js?
Resources • http://www.emberjs.com • http://discuss.emberjs.com • http://emberwatch.com/ • http://github.com/discourse/discourse •
IRC #emberjs
Thank You
We’re hiring! http://AdDuplex.com/Jobs