focus on being reusable, composable, and (hopefully soon) shareable ❖ Goal: Maintain parity with Web Components specifications 3 Thursday, October 17, 13
where to look up the value of {{foo}}) ❖ Most often, this context is a controller ❖ Allows for separation of concerns: Views manage DOM elements, Controllers drive templates with data. 5 Controller foo: 123 View context: controller Template {{foo}} Thursday, October 17, 13
case can come at expense of reusability/refactorability ❖ Two controllers that want to render the same view must adhere to the same duck-type-y interface, e.g. both controllers have to define a property called foo Thursday, October 17, 13
comes in and actions fire out ❖ Pass in data explicitly, e.g. {{some-component foo=someControllerProperty}} ❖ Map component actions to controller/route actions {{some-component component-action=‘routeActionName’}} Components are way isolated Thursday, October 17, 13
easy: ❖ Just pass in different data, e.g. {{some-component foo=otherControllerProperty}} ❖ Or change action mappings, e.g. {{some-component component-action=‘otherActionName’}} ❖ No need to change controller property names to accommodate component templates Components are way reusable Thursday, October 17, 13
❖ Goal: foster an ecosystem of flexible, overridable, composable components ❖ Goal++: don’t let it dissolve into jQuery-plugin-150+ options-barely-configurable-free-for-all 14 Thursday, October 17, 13