You should not use Ember Bootstrap

A bit of history

One year and six month ago, I started working on a suite of EmberJS components for forms.
The idea I had behind this was a simplified simple_form for ember.

The project got a bit of visibility, and some people suggested to merge it with an other library, built by Jiri Zajpt.
It was an excellent idea at the time, so we went on.

Today, this ember-bootstrap still exists, with no less than 587 stars on github.

The original division is still visible, as the library is still divided in two parts: “views” and “forms”.

Now, in 2013

Back then, the library was built around views only, as this was the main component of a emberjs app.
Ember has changed drastically now. Not only in terms of DSL, but in terms of global vision too.

Most of the Ember Bootstrap components don’t fit the ember vision anymore.
And, while the library is still usable, it makes writing applications with it complicated, as it requires thinking with two different visions.

Here is a simple example using the modal component.
The same problem happens to basically all components though.

Ember Bootstrap implements a modal component, accessible in javascript. You could add a modal like this:

  heading: "Sample modal pane",
  message: "Sample message...",
  primary: "OK",
  secondary: "Cancel"

There’s no real controller inside the created modal. You can only manage it through the object you’re creating.
And, most of all, you can only create a modal from the actions of your controller.

In a recent project, I’ve been implementing the following advice.
Opening a modal always happens when clicking on a link. So I just have to do, in my views:

<a href="" {{action 'OpenModal' 'project/edit' this}}>{{title}}</a>

Which will open my modal, assign it the content of the template project/edit, and assign this as the model inside my modal.
Except for the lack of a route, my modal now behaves like any other ember view. It has a template, a controller and a model.
I can then extend my modal from my modal, not from the javascript code which implements it.

For the future

While I’m still the principal maintainer of the Ember Bootstrap library, in my recent projects, I haven’t been using Ember Bootstrap, at all, while the decision was up to me.

The library has been continuously updated by a handful of awesome contributors.
Unfortunately, what would be required here is a much more profound refactoring of the entire library.
Which, I’m afraid, is not happening in the near future.

I wouldn’t recommand using Ember Bootstrap as it is right now.
If you’re interested to work on it though, feel free to start a draft of the ways things could be improved.