So now with a new project coming up with just the right requirements to justify a fat-client direction, I decided to turn to Ember again. It's been almost a year since my last Ember project, so I was excited to get to use all the new features I've been reading about, having kept up with the official blog.
Unfortunately, one major change since last year has quite suddenly and violently changed my opinion about Ember: the adoption of Ember CLI.
What's wrong with Ember CLI?
But let's say I were to put that aside and go ahead and use Ember CLI. My attempts to get up and running, happily developing my app with Ember using its newfangled CLI, have been fraught with difficulties. These are difficulties which, for the most part, I eventually overcame, but which nonetheless were nonexistent before. The dependency management system choked on conflicts almost out of the box. Debugging third party libraries I found to be difficult due to the mysterious workings of the build system. So now if I want to develop an Ember app, something I've done before while suffering basically no sweat from the "problems" Ember CLI is supposedly solving for me, I have to deal with these extra levels of complexity. Great.
And let me talk about the package management for a moment. Ember CLI seems to have three different package managers: NPM, Bower, and if that weren't enough, Ember's very own add-on system. To be fair, the last one from what I can tell is basically just built on Bower, but it does has its own command for installing packages which you sometimes must use.
Setting up my Ember CLI app with support for SASS and CoffeeScript, plus ember-validations and ember-forms, required using all three of these package managers along the way. That's right. I had to run npm install, bower install, and ember install to get all the pieces I needed. The reason for any of them being different from the other was essentially a mystery. I was tempted to dig in deeper and figure it all out, but I'm here to develop an application, not suddenly drop everything and learn not one but three new package managers I never needed before.
After getting that all set up, I then began to wonder what it would take to start hooking this into a Rails back-end. Maybe manage two repositories? Have the output of Ember CLI's build output drop into the proper directory in the Rails app? Serve the Ember app build completely separately, like on S3, perhaps with its own deploy script? Oh, I could just use ember-cli-rails. Cool, another layer of complexity I never had to consider before using Ember CLI to develop with Ember.
If you don't like it, just don't use it!
Well, yes. Sort of.
The problem is, Ember CLI has, for whatever reason, been so wholeheartedly embraced by the community that to go without it is to condemn your Ember app to a life as a second class citizen in the Ember ecosystem. Want to use a useful Ember add-on such as ember-forms without Ember CLI? Good luck. Like most other useful products of the Ember community these days, it's developed with the expectation that it will be installed with Ember CLI, creating a barrier to entry otherwise. There's no information I could find on how to do such a thing, and I really don't feel like reverse engineering Ember CLI just so I can start to be productive.
That's the most egregious sin of Ember CLI. Besides the crazy scope creep it introduces, the confusing package management, the mysterious build pipeline, and the requirement for additional integration to work with your back-end framework of choice, Ember CLI implicitly forces itself upon you. It presents itself as all-or-nothing.
Gone are the days when you could easily use Ember as the front-end component of a larger stack with its own (overridable) opinions on package management and asset build pipelining. If you want to build a modern Ember app, you better prepare to learn NPM, Bower, Ember's own add-on system, and how to integrate it with whatever back-end you choose. Which is particularly sad given the already negative public perception about Ember's learning curve. And here I thought the point of Ember CLI was to make it easier to get started.
To that end, I face the bittersweet prospect of choosing a new framework to fill my front-end needs. Right now I'm looking at React. I added react-rails to my Gemfile, added //= require react to my application.js file for the Rails asset pipeline, and now I'm off and running creating components in component.js.jsx.coffee files. And now I'm productive and much happier than I was wrestling with Ember CLI yesterday.