Hacker News new | ask | show | jobs
by csallen 4228 days ago
Interesting post. I've been using Ember on lots of projects for about a year and a half now, and I think it's great. What this post really hits on, however, is the fact that Ember has quite a high learning curve.

After many years of developing SPAs using plain JS/jQuery, the benefits that a framework like Ember could provide were immediately clear to me. As a result, I was willing to push through this curve and subsequently reap the many rewards. For someone like the OP, however, who doesn't seem to have built many ambitious SPAs and for whom building a traditional server-driven web app is an option, I can understand why dealing with Ember's learning curve just doesn't seem worth it.

For those seriously interested in trying Ember, I would advise you not to make the mistake of confusing Ember's somewhat steep learning curve with the quality of the framework itself.

Thoughts:

> 1. Silent Errors.

These can definitely be annoying and difficult to debug, especially if you're newish to Ember.

> 2. Deep linking - unreliable.

This is probably because you're not handling your route setup properly. I ran into lots of issues with this when I was learning Ember, and although the guides do a better job explaining how this works nowadays, I do agree with you that it'd be nice if there were more real-world coding examples on the web.

It's important to be aware that the "model" hook in your routes isn't always called. When you use the {{#link-to}} helper in your templates or the `transitionTo` method in your routes, you pass in the model directly and the model hook is skipped. However when navigating directly to the URL, the route's model hook is called and is expected to resolve the model using the params from the URL.

There are also a few common gotchas that involve dealing with nested routes, but I'd have to look at your code to see what exactly is causing your routing issues.

> 3. Few libraries

If you're using Ember Data (which hasn't hit 1.0 yet), I could see pagination being somewhat of a pain in the ass. Still, I'm using Ember Data on a couple of large projects right now, and I was able to get pagination working fine in a couple of days.

If you're not using Ember Data, pagination shouldn't be harder with Ember than it is with plain JS+jQuery.

> 4. Few code examples / resources

I agree with you here. There are some good open source Ember apps that you can learn from, but definitely not enough simple code examples online. This is one of the reasons that the learning curve is so high.

> 5. Slower development

Learning something new is almost always going to be slower than going with what you know. This is especially true of Ember, which the team very accurately bills as "a framework for creating ambitious web applications" (emphasis theirs). Ember is often overkill for a lot of the apps that people need to build. However, if you're building something ambitious, Ember will save you time and headache in the long run. And once you get familiar with it, you'll be pretty speedy.

> 6. Added layers and complexity

I think your diagram comparing a Rails+Ember stack to a Rails+jQuery stack is totally misleading. You've simply taken everything in Ember and squished it into "Javascript/jQuery". If you're writing a very simple front-end app or a complex app composed of terrible jQuery spaghetti code then yeah, I guess it's an accurate diagram. But if your front-end app is actually complex and well-written, then you're going to have to spend a considerable amount of time implementing some form of glue to handing routing, templating, model state, etc on the front-end. Ember does that for you.

> 7. It restricted our design

Ember shouldn't limit your design. It seems more likely to me that you guys were new and unsure of how to use Ember to accomplish a specific goal. That said, it'd be great to hear what kinds of snags you ran into, as these would probably make for some good code examples.

> 8. JavaScript

Ember is for developing applications in JavaScript. If you don't like writing JavaScript-heavy apps, Ember is not for you. And that's okay. It's very often the case that traditional server-centric applications are more than good enough for the task at hand. But when the situation calls for building a modern and ambitious single-page application, you're stuck with JavaScript whether you like it or not, and I believe Ember is a great way to go.