In this presentation, we bring a fresh perspective and suggest new was to think about developing with Ember Components. There is an emphasis on encapsulation over re-use as the main principle when working with components.
We then contrast the "widgets" and "domain specific" components. While both inherit from Ember.Component, and while they technically have the same capabilities, thinking of them as different "styles" of components helps us change our mindset when working with them.
Widgets are common, smaller building blocks, which usually access the DOM, while they abstract it by creating higher level concepts like a "selection" instead of a click. Widgets provide reuses and consistency. By the other hand, domain specific components are often not re-used, they avoid touching the DOM, and it is common for them to ask for their own data. Domain specific components provide separation of concerns, let us divide and conquer and speak the language of your business.
This presentation is based on real life examples of an app in production. We also look at Tyrion, the component library developed at Practice Fusion.
While this presentation was done in November of last year, and a lot has changed around components, the content is still relevant on the eve of Ember 2.0. Even more than before, these principles are important to consider when developing your next component.
NOTE: This talk by Miguel Madero was filmed back in November, at the San Francisco Ember.js Meetup. We misplaced certain assets, but discovered them again months later. Apologies for the delay and thank you to Miguel and Ember.js SF for bearing with us.
Additional Resources from ProTech: