Rails Vs. Node

I’m starting to get into Node.js development, as of late. I’ve started two projects so far and generally like the framework, though the all-js-all-the-time seems a little weird to me still. However, the thing I’ve noticed is that there is a huge productivity gap between Node and what I’m used to in Rails. Yes, being new is part of it, but I don’t think that’s the only thing.

Rails really does make a shocking amount of decisions for you. Like… a lot, a lot. Folder structure, db schema conventions, where your configuration goes. The list goes on, but suffice to say, that there is a lot I’ve taken for granted over the past few years of Rails development.

I think my pros and cons list for Node over Rails looks something like this, right now.

  • Node is fast.
  • If you just want an API, you can be up and running in less than an hour
  • MongoDB/Mongoose seems to be the default db, so prototyping is quick
  • NPM is very useful
  • For advanced projects, you’ll spend a lot of time making boiler plate decisions
  • There are potentially dozens of competing solutions to every problem
  • You’re on the hook for building everything yourself (including things like CSRF protection)

Overall, I think both Rails and Node have their place, and I’m sure as I get used to Node, I’ll appreciate it more. For now though, I really have to give the Rails core team much more credit for covering so many bases automatically.