for many common DOM events and triggers events on the appropriate Ember View. ▪Event names roughly match DOM event names. ▪Views can optionally have an `eventManager` Thursday, September 19, 13
optional arguments, and listeners will receive them ▪Ember.Evented#has lets you check to see if there are any listeners for an event name. Thursday, September 19, 13
`target` ▪ Sometimes, Ember sets a controller’s `target` is set to another controller ▪ {{render}} sets rendered controller to the template’s `controller` ▪ {{each}} with an itemController, itemController instances `targets` are set to the parent 39 Thursday, September 19, 13
machines are a proven way to reduce complexity in apps ▪ External components send actions to a state machine without knowing what state it is in – the current state will handle it ▪ Similar win as polymorphism – very decoupled Thursday, September 19, 13
Hierarchical state machines allow better modeling of common event handling ▪ Actions start at the current route and flow up to parent routes until a route handles it ▪ The router provides a natural hierarchy Thursday, September 19, 13
an object the ability to trigger an action. (Use ViewTargetActionSupport for views.) ▪ Mixin Ember.ActionHandler to give an object the ability to be a target. Thursday, September 19, 13