Episode 153 · November 21, 2016
Why might you want to use Ember as a frontend for your Rails app
What's up guys? Welcome to the series on how to use Ember with Ruby on Rails, and this is taught by a friend of mine, Jeffrey, who runs Ember school and ember screencasts, now he does a similar thing to GoRails, he just focuses on Ember, and because I didn't plan on covering Ember myself in GoRails, I figured, why not? We can have him teach a series on how to set up ember, why you might want to use it, and how to use it with the Rails API, and we'll go through all of that in a series, and he'll teach you how to do that, and so this is going to be a really good introduction for using ember with rails. Without further ado, I will leave it to him.
Or, you could do a front-end framework. So why ember, specifically? Ember works really well for people that have been using rails for a while. It shares a lot of the same philosophy, one of which is convention over configuration. So in ember, there's a default. There's a really smart, well thought out default, but if you're in one of the five percent of people who that default doesn't work for, there are other ways to go about it, you can still configure it, but for most of the people, you don't have to think about the silly things. Ember and rails, they integrate together easily. ActiveModel serializer is the most common integration, but there's a lot of work being done on JSON APIs as well. Then there's the add on ecosystem on ember, which matches rails gem ecosystem, so you want some functionality, well you just grab an add on someone's built to be able to do that, and so far, ember iss the one with the most solid addon ecosystem, the others are trying to hack something together, I hear there's good stuff happening on webpack, but ember's addon story is the most solid so far, and because of the convention over configuration, and the addons, and the easy integration with rails, that means you're going to be productive really quickly, weather you're setting up an app yourself, or you're joining an existing team. At this point, you're going to be asking: What are the downsides? Well there are a couple. The first is that more powere means that there's more to learn, so if you're someone who prefers Sinatra over Rails because there's less API surface area, then you may try doing React. It's much smaller, and it does way less for you. The apps that you're going to be able to build easily are more simple, but there's less to learn. So you will be up and running quicker, and the second thing is that ember does want your entire page. It doesn't necessarily have to have your entire app, althought it does want that too, but whatever page you stick it in, it's going to want to take over that, and you should let it. There are some things coming that will make sticking in little bits of ember into your app easier. Look for the glimmer two rendering engine soon, but for now, ember does want your entire page. Now, I'm not going to tell you more about why you should use ember in a series. If you want to know more, I wrote an article with the codeschool blog called: Seven reasons to use ember, and I also created a talk, called: "Embering on the shoulders of Giants" and those two links will be in the shownotes, so if you're not convinced and want to know more, then go ahead and click on those links. If you are convinced, and you want to set up your first ember app, then join me in the next video.
Transcript written by Miguel
Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.