Non-block form (no hash)
Block form (with hash)
Yields parameters to
the block form
(function call)
Slide 15
Slide 15 text
Non-block form (no hash)
Block form (with hash)
Yields parameters to
the block form
(function call)
Block params
(function params)
Slide 16
Slide 16 text
Closure
(vs. element)
actions
Slide 17
Slide 17 text
Element actions
(iact “string” actions)
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
Closure actions
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
Why closure actions?
• They can return values
• Enable reacting to actions sent from the controller
• Better debuggability
• They can also bubble (check out ember-route-
action-helper)
Slide 24
Slide 24 text
Component design
guidelines
Slide 25
Slide 25 text
Short & sweet non-block
form
Slide 26
Slide 26 text
Don’t assume too much
Slide 27
Slide 27 text
Allow customization
Slide 28
Slide 28 text
Data down, actions up
(Use actions)
Slide 29
Slide 29 text
Data down, actions up
(Use actions)
Don’t do that.
Slide 30
Slide 30 text
Advanced concepts
• Keep your component layers decoupled
• Find ways to prevent registering
• Replace observers with (DOM) actions