Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Ember.js
Search
Paulius Norkus
October 23, 2013
Programming
190
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
80
MonoGame
pauliusnorkus
0
340
Other Decks in Programming
See All in Programming
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
370
Vite+ Unified Toolchain for the Web
naokihaba
0
730
Contextとはなにか
chiroruxx
1
390
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
580
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
240
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
270
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
120
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
100
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
840
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
250
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
RailsConf 2023
tenderlove
30
1.5k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
360
Google's AI Overviews - The New Search
badams
0
1.1k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
170
A Soul's Torment
seathinner
6
3k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Agile that works and the tools we love
rasmusluckow
331
22k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
500
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