Rails and Ember both are opinionated frameworks. These opinions are based around conventions that make us extremely productive. As Rails developers we know this first hand. When learning Rails, you may have found yourself struggling to learn something...
In any server rendered framework, page reloads clear state. Your app might have sections that contain a lot of AJAX, but for the most part you start with a fresh state every time a user clicks a link. Not so with a client-side framework.
In Rails, the Router maps URLs directly to a controller action. We have a file in Rails called routes.rb that contains these mappings and determines our URL structure (HTTP Method, whether they are nested, parameters, etc).
Ember works a little bit...
Controllers in Rails and controllers in Ember have quite a few differences. In Rails, controllers are responsible for fetching data from your models. As a Rails developer, you’ve probably heard the phrase “fat models skinny controllers.” This mantra...
Models in Rails and models in Ember look pretty similar. The major difference is that models in Ember typically hold attribute information, relationship information, and a few computed properties. In Rails models often contain more logic.
In Rails, controllers have the responsibility of fetching data with optional parameters defined from the URL. In Ember, this same responsibility falls to the route.
ember-cli is the command line interface for Ember. It handles running a development server, tests, build tooling, generators and more.
You’re used to something similar with the CLI provided by Rails, so many of the commands will be familiar.
When things go wrong in an application, you need ways to debug the problem. Ember comes with a few tools that work like their Rails counterparts, and one additional tool that’s very powerful.
When defining routes in Rails, related resources are almost always grouped together by nesting them.
resources :artist do
resources :albums do
When defining your routes in Ember, there is one very important thing to keep in mind. You should only nest your routes if your UI is nested.
Ember makes heavy use of promises through the RSVP.js library, so it...
While there are some similarities to Rails, there a few differences to keep in mind when performing CRUD operations in Ember.
Let’s compare creating, updating and deleting a user in both frameworks.
Ruby/Rails introduced many of us to great refactoring patterns; most of which have been around much longer than the language itself. Refactoring code in Ember can be daunting if you’ve never done it before, but you’ll find that many of these patterns still apply.
It’s common for Rails developers new to Ember to get a little bit stuck when it comes time to deploy their applications. Because your application is split into two separate repositories (it is, right?) it can be hard to determine the best way to deploy them so that they work together.