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
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Ember.js
Paulius Norkus
October 23, 2013
Transcript
13 slides
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
More Decks by Paulius Norkus
See All by Paulius Norkus
ASP.NET vNext
pauliusnorkus
1
82
MonoGame
pauliusnorkus
0
350
Other Decks in Programming
See All in Programming
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
600
protojson における文字化けの扱い
kazuki1023
0
390
GraphQL の onError と Nullability のこれから
quramy
0
210
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
120
Spec-driven Development with AI
simas
PRO
0
2.3k
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
270
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
11k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
850
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
310
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
380
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
520
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
Claude Code のすすめ
schroneko
67
230k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
WCS-LA-2024
lcolladotor
0
990