Skip to content

Instantly share code, notes, and snippets.

@alexspeller
alexspeller / libraries.md
Last active August 29, 2015 14:04
Javascript Components and Ember

Javascript components and Ember

Often when using Ember, it's tempting to integrate external javascript components. Sometimes this is trivial and easy, but often it can be both difficult and counterproductive. Here I will try to explain the pros, cons and reasoning behind them.

When it makes sense: self-contained components.

When using external components, you have to decide whether the external component has responsibility for managing the DOM or ember does. If the responsibility can be handed off entirely to the external component, it can be a good choice. For example, imagine a calendar popup component that is a jquery plugin, triggered with this imaginary api:

var calendar = $(someElement).calendar({