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
EmberJS Introduction - T3CON12
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
tomdale
October 05, 2012
Technology
1.3k
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
EmberJS Introduction - T3CON12
Introduction to Ember.js, presented at the TYPO3 conference in Stuttgart, Germany.
tomdale
October 05, 2012
More Decks by tomdale
See All by tomdale
EmberConf 2019 Keynote
tomdale
1
820
EmberConf 2018 Keynote
tomdale
4
1.9k
Secrets of the DOM Virtual Machine
tomdale
1
1.1k
EmberCamp London Keynote 2016
tomdale
11
5.2k
Hella Good Ember
tomdale
7
1.3k
EmberConf 2016 Keynote
tomdale
12
2.5k
Introduction to FastBoot - Global Ember Meetup
tomdale
1
220
An Update on FastBoot
tomdale
2
1k
Progressive Enhancement is Dead, Long Live Progressive Enhancement
tomdale
1
980
Other Decks in Technology
See All in Technology
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
340
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
7
4.1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
50k
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
270
10倍の生産性を実現するAI駆動並列エージェントのすべて
kumaiu
4
860
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
140
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
490
React、まだ楽しくて草
uhyo
7
4.1k
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
510
生成 AI × MCP で切り拓く次世代 SRE!自律型運用への挑戦と開発者体験の進化
_awache
0
160
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
400
AI Testing Talks: Challenges of Applying AI in Software Testing: From Hype to Practical Use
exactpro
PRO
1
140
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
My Coaching Mixtape
mlcsv
0
140
Test your architecture with Archunit
thirion
1
2.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Docker and Python
trallard
47
3.9k
Writing Fast Ruby
sferik
630
63k
Designing Experiences People Love
moore
143
24k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
380
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
Practical Orchestrator
shlominoach
191
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The Invisible Side of Design
smashingmag
302
52k
Transcript
None
Building Ambitious Web Apps
jQuery
None
Great for manipulating pages. Not so great for building large
apps.
None
None
None
None
You can simulate an application by having the logic run
on the server, and serving a series of pages
None
500ms The problem with this is that your user interface
can only respond as fast as your server—especially bad on flaky 3G connections
Fix this by moving *all* of the logic to the
client. The client has all of the application logic and HTML templates to render in the browser.
{ name: "Christian", occupation: "Engineer" } Instead of sending HTML,
send JSON. Only request data that the client has not yet loaded. Instant response when showing data that has already been fetched.
By decoupling the user interface from the typical HTTP request/
response cycle, you can completely modify how updates are communicated to the client. WebSocket
None
Mobile Cocoa Touch Android SDK Desktop Cocoa .NET Web ?
Mobile Cocoa Touch Android SDK Desktop Cocoa .NET Web
What do client-side frameworks provide?
User Interface Data Persistence Application Architecture
User Interface HTML+CSS Data Persistence ? Application Architecture ?
User Interface HTML+CSS Data Persistence Application Architecture
User Interface View Data Persistence Model Application Architecture Controller
MVC
Enhance JavaScript
Classes Person = Ember.Object.extend({ firstName: null, lastName: null });
Mixins Speaker = Ember.Mixin.create({ hello: function() { var first =
this.get('firstName'), last = this.get('lastName'); alert(first + " " + last + ": HELLO!") } }); Person = Ember.Object.extend(Speaker); Person.create({ firstName: "Yehuda", lastName: "Katz" }).hello();
Mixins Speaker = Ember.Mixin.create({ hello: function() { var first =
this.get('firstName'), last = this.get('lastName'); alert(first + " " + last + ": HELLO!") } }); Person = Ember.Object.extend(Speaker); Person.create({ firstName: "Yehuda", lastName: "Katz" }).hello();
Mixins + super Speaker = Ember.Mixin.create({ hello: function() { var
first = this.get('firstName'), last = this.get('lastName'); return first + " " + last + ": HELLO"; } }); Dog = Ember.Object.extend(Speaker, { hello: function() { return this._super() + " THIS IS DOG"; } }); var phil = Dog.create({ firstName: "Budweiser", lastName: "Phil", hello: function() { return this._super() + " ZAAAAAAAA"; } }); alert(phil.hello());
Computed Properties Person = Ember.Object.extend({ fullName: function() { return this.get('firstName')
+ ' ' + this.get('lastName'); }.property('firstName', 'lastName') }); var yehuda = Person.create({ firstName: "Yehuda", lastName: "Katz" }); alert(yehuda.get('fullName'));
Uniform Access
“ Bertrand Meyer Uniform Access All services offered by a
module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation.
Namespaces >> Core = Ember.Namespace.create(); >> Core.Person = Ember.Person.extend(); >>
Core.Person.toString(); => Core.Person >> Core.Person.create().toString(); => <Core.Person:ember157> No more [object Object]!
Names in Conventions App.Post = DS.Model.extend({ title: DS.attr('string'), body: DS.attr('string')
}); // vs. App.Post = DS.Model.extend({ collectionURL: "/posts", singleURL: "/post", title: DS.attr('string'), body: DS.attr('string') });
Application Structure
Model View Controller
Model View Controller Router
Router •ORMs model persistent state as objects •The router models
application state as objects •Maps the browser‘s URL to app state
Router Private Blog Not Logged In Logged In Index Show
Post Edit Post
Router Private Blog Not Logged In Logged In Index Show
Post Edit Post
Router Private Blog Not Logged In Logged In Index Show
Post Edit Post /login
Router /posts Private Blog Not Logged In Logged In Index
Show Post Edit Post
Router /post/123 Private Blog Not Logged In Logged In Index
Show Post Edit Post
Advantages •Never be in an unknown state •Find errors faster
•Create a map of user actions
TypeError: Cannot call method 'showPhoto' of undefined
Entered state "notLoggedIn" Sent event "enterCredentials" Entered state "loggedIn" Entered
state "loggedIn.index" Sent event "showPost" Entered state "loggedIn.showPost" Could not respond to event "editPost" in state "loggedIn.showPost"
Why Ember?
Ember is not a throwaway weekend project or a corporate-sponsored
project. It is built by and for the Ember community, an open source project first and only.
100% Open Source Built by the Community Ember is not
a throwaway weekend project or a corporate-sponsored project. It is built by and for the Ember community, an open source project first and only.
•Manages complexity •MIT-licensed •More productive •Aggressively rolls in best practices
•Built for the long haul
As patterns solidify, we roll them in.
Sometimes we give them a little push.
Thank you. Questions? http://plus.tomdale.net http://emberjs.com