Choice of backend


#1

Hi all,

So recently I got one of those moments of doubt. I used to use Ruby on Rails for my backends back in the days when I was using Backbone. The last year I have been using node.js though and its been good and fun.

However, I’m starting to miss the structure provided by a Rails application, I guess to some extend thats also one of the reasons I love Ember.js. It’s just easier to develop and maintain a good coding quality, structure and so on.

But then I start wondering if its just some fairytale fantasy of mine, and in reality it won’t make a difference. I just can’t make up my mind! Is performance an issue? Is development time better? Hosting? Deployments?

I would like to ask if any of you have dealt with this topic lately. What was your choice and why?


#2

I use rails because it’s really easy for me to create apps in it - the ecosystem is huge and mature, and it’s stable and reliable.

I haven’t really tried node for backend stuff much - mainly because NPM makes me want to stab myself in the eye with a fork every time I use it. But realistically you can build a backend with anything and it’s probably going to be fine - it’s really down to personal preference when you’re talking about the major players.


#3

Backend of choice, for me, is Django+Rest framework. (Using uwsgi/nginx rproxy).

Mostly the same reasons you like ruby+rails for: robust ecosystem, clean and efficient coding paradigms, wide range of stable, mature modules allowing interaction with the world, several quality ORMs. I actually have much respect for ruby+rails, I consider rails and django to be on par, I just happened to learn Python first.

Also, we use Ember for powerful administration/editing… etc, but users are presented ordinary Django templates on the front end.

Hosting does not matter (manage the server ourselves). Packaging tools and virtualenv sandboxes make for robust deployment.

node.js is a clear no to me. Too young, changing too fast. A lot of packages are abandoned within a couple of months. The whole JS environment is still in the process of reinventing the wheel and breaks stuff often. We deal with JS on the browser side because we have to. But give us PyQT in the browser and we are done with JS today.


#4

Thanks for your answers @alexspeller and @spectras.

I think I’ll switch back to rails when version 5 is released :smile:


#5

Rails-api gem is a good choice also, you don’t have to wait for rails 5. :smile:

I built an example app based on a tutorial: https://github.com/szines/bookstore-api You can find the implementation steps in readme.

There is a connected frontend as well: https://github.com/szines/bookstore-client


#6

If you’re already using Node.js as a backend, Hapi.js might help provide the structure you’re after … http://hapijs.com/