Hacker News new | ask | show | jobs
by TheBrockEllis 4384 days ago
As a new comer to Ember, I am quite confused as to the necessity of the Rails portion of the tutorial. I read through the intro and the first chapter and all I could gather was that it was for the "back end". I really wish there was a great, up-to-date tutorial that was back-end agnostic so that newbies don't have to possibly learn two new frameworks at once.
1 comments

Totally agreed. I went glassy eyed at "First create new rvm gemset to sandbox our gems:"

If you are a RoR person, I'm sure this tutorial is just great. But for the rest of us...

That's a valid complaint. I wrote it with a Rails backend because that's a pretty popular backend choice for Ember, and they work together well.

Perhaps I can just extract out the Ember portion -- It should still be applicable regardless of the backend.

Do you even /need/ a backend though?

It would be much simpler if you keep it entirely client side, using something like Pretender (https://github.com/trek/pretender).

To persist data you'll want a backend. That's a fairly important piece of any application which is why I included it in the tutorial. You could ignore the Rails parts of the tutorial and create your own backend.
Persist across clients, maybe, but it's also possible to use localStorage to persist data on a single client.
You could also use something like Firebase as a datastore that could persist across multiple clients but also be implemented in javascript.
Maybe stub out the backend with an Express app? Express seems simple enough that even if you're not familiar with it, you can still understand what it's trying to do.
And you'd keep most of the code in javascript so new comers wouldn't get "culture shock" by having to learn completely new syntax. +1
Would you consider Parse/Firebase?
What's funny about that is that step is completely unnecessary. At least, I have never had to create a gemset and I have had up to 20 different Ruby applications on my machine at a time. Bundler solved this problem.
It's pretty tough to make a tutorial for literally everyone. Heck, some people use CoffeeScript and some use JavaScript, and any of them might be upset if your tutorial uses the other.

If someone wrote a plain Ember tutorial that just assumed the backend API already existed, just as many people might make the complaint "if you already have a backend, I'm sure this tutorial is just great, but for the rest of us..."