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
Extinguish the Fire with Ember.js
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Peter Brown
February 12, 2014
Technology
510
6
Share
Extinguish the Fire with Ember.js
Presented to the Burlington Web application group at the Front end framework faceoff.
Peter Brown
February 12, 2014
More Decks by Peter Brown
See All by Peter Brown
History of a Thriving Codebase
beerlington
2
440
Introduction to ClassyEnum and Friends
beerlington
1
270
Lighting Up with Ember.js
beerlington
8
570
Networking Refactored
beerlington
1
110
Intro to Object Oriented Programming in Ruby
beerlington
10
1.1k
Responsible Metaprogramming in Rails
beerlington
3
800
BTVWAG Survey Results
beerlington
1
230
Behavior Driven Development
beerlington
2
940
Other Decks in Technology
See All in Technology
脳が溶けた話 / Melted Brain
keisuke69
1
1.2k
FASTでAIエージェントを作りまくろう!
yukiogawa
4
180
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
1
200
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
1
170
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
450
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
230
JSTQB Expert Levelシラバス「テストマネジメント」日本語版のご紹介
ymty
0
100
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
260
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
260
非同期・イベント駆動処理の分散トレーシングの繋げ方
ichikawaken
1
250
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
Rails Girls Zürich Keynote
gr2m
96
14k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
Design in an AI World
tapps
0
190
WCS-LA-2024
lcolladotor
0
500
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
97
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
Transcript
EXTINGUISH THE FIRE WITH EMBER.JS BTVWAG - Feb 12, 2014
Presented by Peter Brown
WEB DEVELOPER @beerlington
PROBLEMS ‣ Client side development is challenging ‣ Expectations about
how websites should work ‣ Single page applications aren’t always that ‣ Lack of conventions
HYPOTHESIS As browsers become more capable and JS enables us
to do more, the applications we build will become more ambitious and require better tools. Complexity Capability
A framework for creating ambitious web applications Write dramatically less
code Built for productivity Don't reinvent the wheel EMBER.JS
WHAT DOES EMBER LOOK LIKE?
ROUTER Maps a URL to a Route App.Router.map(function() {! this.resource('posts');!
this.resource('post', { path: '/post/:post_id' });! });!
ROUTER /posts → PostsRoute /post/123 → PostRoute App.Router.map(function() {! this.resource('posts');!
this.resource('post', { path: '/post/:post_id' });! });!
ROUTER Nested Routes App.Router.map(function() {! this.resource('post', { path: '/post/:post_id' },
function() {! this.route('edit');! this.resource('comments', function() {! this.route('new');! });! });! });!
ROUTER /post/123 → PostRoute /post/123/edit → PostEditRoute /post/123comments → CommentsRoute
/post/123/comments/new → CommentsNewRoute App.Router.map(function() {! this.resource('post', { path: '/post/:post_id' }, function() {! this.route('edit');! this.resource('comments', function() {! this.route('new');! });! });! });!
ROUTE Responsible for loading data, displaying templates and setting up
application state. App.PostRoute = Ember.Route.extend({! model: function(params) {! return this.store.find('post', params.post_id);! }! });!
CONTROLLER Acts as a proxy to the model and handles
events from the template App.PostController = Ember.ObjectController.extend({! actions: {! publishPost: function() {! this.toggleProperty('isPublished');! }! }! });!
TEMPLATE Handlebars = HTML + embedded expressions Hello, <strong>{{firstName}}</strong>!!
TEMPLATE Hello, App.ApplicationController = Ember.Controller.extend({! firstName: "Peter"! });! The PostRoute
“glues” these together
TEMPLATE Automatically bound to controller’s state {{#if isPublished}}! <span>! This
post is published!! </span>! {{else}}! <span>! This post is NOT published!! </span>! {{/if}}!
MODEL Defines schema and relationships App.Post = DS.Model.extend({! title: DS.attr('string'),!
publishedAt: DS.attr('date'),! author: DS.belongsTo('author')! });!
VIEW When you need more control, used less frequently, always
associated with a controller var view = Ember.View.create({! templateName: 'say-hello',! name: "Bob"! });!
COMPONENT Custom HTML elements, like views without controller <script type="text/x-handlebars"
id="components/blog-post">! <h1>Blog Post</h1>! <p>Lorem ipsum dolor sit amet.</p>! </script>!
DATA AND EVENT RELATIONSHIPS
DATA BINDING Route View Model Controller Template
EVENT BUBBLING View Model Controller Template Route
UPDATING DATA View Controller Template Model Route
EMBER’S ADVANTAGES
ARCHITECTURE ‣ Supports application growth via: • Organization • Eliminating
boilerplate • Sensible conventions ‣ Encapsulation • Loose coupling between components
APPLICATION SPEED ‣ 100% of HTML rendering is in browser
‣ Server is responsible for data via API Requests
OBJECT MODEL ‣ Computed properties • with and without aggregate
data ‣ Observers ‣ Bindings • two-way default, one-way for performance
MASTER-DETAIL INTERFACE
MASTER-DETAIL INTERFACE
FRIENDLY DOCUMENTATION
RAILS INFLUENCE ‣ Convention over configuration • Naming conventions (code
+ files) • If it feels painful, you’re likely doing it wrong ‣ REST architecture
EMBER’S DISADVANTAGES
LEARNING CURVE Frustration Time
SPRINKLES OF JAVASCRIPT
HANDLEBARS
EMBER DATA BETA!
WHAT’S COMING?
EMBER DATA 1.0
BUILD TOOLS ‣ Modules as first-class citizens (ES6 modules) ‣
Built-in Bower support ‣ CLI commands • $ ember server • $ ember test
HTMLBARS ‣ Performance gains ‣ Faster Rendering (comparable to React)
‣ Will build DOM instead of strings
HTMLBARS <img {{bind-attr src=imageUrl}}> Before After <img src="{{imageUrl}}">!
OTHER FUN STUFF ‣ Slimming down the codebase ‣ Removing
jQuery dependency ‣ Continued support for IE8
HONORABLE MENTION
HONORABLE MENTION
“What kind of application are you building?” Tom Dale -
Ember co-creator