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
Ember 1.8 Beta
Search
Martin Muñoz
September 11, 2014
Programming
97
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ember 1.8 Beta
Martin Muñoz
September 11, 2014
More Decks by Martin Muñoz
See All by Martin Muñoz
Anatomy of HTMLBars Templates
mmun
8
1.4k
Other Decks in Programming
See All in Programming
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
自分的「カンファレンスの楽しみ方」
syumai
0
200
Deep dive into the select statement (GopherCon UK)
jespino
0
170
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.8k
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
AIの中の人になってみる
htkym
0
170
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
400
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
580
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
270
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
アクセシビリティから考える情報設計
high_g_engineer
0
310
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
510
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How STYLIGHT went responsive
nonsquared
100
6.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Leo the Paperboy
mayatellez
8
2.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
400
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
510
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Transcript
ember 1.8 beta and metal-views By Martin Muñoz
I work at Crowdmark still @_mmun on twitter :(
warning: the typography of this presentation will aggravate you
what’s new in ember 1.8 beta?
i don’t actually know
we’re still using Ember 1.5 at Crowdmark!
here’s what they tell me…
IE 6 and 7 are deprecated.
[applause]
what does that mean?
we still support them. please report issues.
Deprecate global access to view classes from template {{view App.PostView}}
Deprecate global access to view classes from template {{view App.PostView}}
Deprecate global access to view classes from template {{view "post"}}
Deprecate global access to view classes from template {{view "post"}}
“but I use multiple namespaces :(“ window.Blahg = Em.Namespace.create(); Blahg.PostView
= Em.View.extend(...);
np! {{view "blahg/post"}}
some big performance improvements…
Lots of string operations are now cached: - camelize/dasherize/whateverfy -
a hash lookup to tell if a path is global - a hash lookup to split
backburner’s pushUnique got a lot of love. This has a
big effect on: - Ember Data - rendering big {{each}} blocks
Thanks Stefan!
Hmm.. what else happened…
None
[ the font is called Flesh Wound ]
The metal-views rewrite entirely removes the dependency on the metamorph
package
Consequently, you will no longer see metamorph script tags
[applause]
how is that even possible?
it’s really simple!
we still use script tags!
…but they are immediately removed and replaced with two empty
TextNodes
I’ll talk more about it some day.
Today, I want to talk about bindings.
Today, I want to talk about bindings.
{{comment-list comments=model}} Specifically, how does this work?
obj from to Binding
commentListView from to Binding {{comment-list comments=model}}
commentListView from “comments” Binding {{comment-list comments=model}}
commentListView “_parentView.context.model” “comments” Binding {{comment-list comments=model}}
The job of bindings: • observe both sides of the
binding • if either side changes, schedule an update on the runloop • break ties: down always wins.
{{#each item in items}} {{name-tag name=item.name}} {{/each}} how does binding
to keywords work? how? :(
nameTagView “templateData.keywords.item.name” “name” Binding {{name-tag name=item.name}}
This doesn’t use bindings, but instead uses its own way
to resolve keywords. {{item.name}}
Ok who cares?
Well, I think its cool but…
{{#each item in items}} {{name-tag name=item.name}} {{/each}} what happens when
items changes?
Because of some complications and some others, the entire each
view much be re-rendered. So we can’t do any smart React style diffing or anything at all smarter than “actually rerender everything”.
In order for Ember to get better, we need to
improve how keywords work. It will have far reaching consequences on the composibility of components
Have you ever used _view or _view._parentView?
We can do better!
The solution we’re working on is streams.
[gasps]
It’s not done yet, and I haven’t figured out how
to explain it very well.
{{myvar}} {{#if myvar}} {{myvar}}!! {{/if}} {{x-foo value=myvar}} {{#each item
in items}} {{name-tag name=item.name}} {{item.name}} {{/each}}
{{myvar}} {{#if myvar}} {{myvar}}!! {{/if}} {{x-foo value=myvar}} {{#each item
in items}} {{name-tag name=item.name}} {{item.name}} {{/each}}
(obj2, to) Stream (obj3, to) (obj1, to) source