5 ms·
Can you share your reasons for switching from Node.js to Rails?
by BarkMore 16y ago
Can you share your reasons for switching from Node.js to Rails?
- railsjedi 16y agoLibrary support mainly. Node.js is awesome, but the ecosystem is still very very early. Libraries are almost always alpha quality and don't have the level of polish you'll find in Ruby libraries that have been around a couple years. If you need something specific in Node, 9 times out of 10, you have to implement it yourself. I imagine in a couple years, it will catch up with Ruby. For example: the MongoDB libraries for Node gave us many problems. I won't go into the specifics as that would take a while, but switching to Ruby mongo driver along with the Mongoid ORM resulted in a huge increase in code readability and is much more reliable I think. Also being able to use amazing Ruby libraries like devise/omniauth are a big win I think. Similar with Jammit, Barista, Rspec, the list goes on. Here's our current Gemfile: https://gist.github.com/68f0326a9480266d462e https://gist.github.com/68f0326a9480266d462e. Some of these libraries have Node.js equivalents, but they are all very early stage. That said, most of our code is UI side anyways. For that I'm using coffeescript / jquery / backbone.js. We'll probably reintroduce some small, focused Node.js server components in the future for the most highly accessed http requests as we start to ramp up the traffic.
- bodhi 16y ago> Library support mainly. Node.js is awesome, but the ecosystem is still very very early. Fascinating, I remember 2-3 years back people were saying exactly the same thing, but replacing Node.js with Rails and Ruby with Python. The more things change, the more they stay the same!
- zhyder 16y agoEven 2-3 years ago, Ruby+Rails were better than Python+Django/etc in terms of an ecosystem for webapps. Python had a better ecosystem than Ruby outside of webapps. I suspect this is still true though the gaps have narrowed a lot.
- Pewpewarrows 16y agoYou might try and convince yourself of that, but it was never true. Django has always nurtured a better ecosystem for webapps since its inception due to its nature of packaging smaller parts of a whole as "apps". See a modern website aggregating these apps here: http://djangoplugables.com/ http://djangoplugables.com/ Forgive me if I'm wrong, but this just doesn't exist for Rails. Sure you might find the random open source'd library or plugin, but that's about the extent of re-usable code you're going to have. For the Django developer, in minutes you can have a website with a blog, tagging system, voting, contact form, traditional registration system, social authentication, openid logins, avatars, user profiles, friends/followers, on-site messaging, full-site search, and all ready for e-commerce. And that's just the tip of the iceberg. Any of those parts are autonomous and interchangeable. Sure it'll take a bit longer to actually configure the apps how you'd like, display them in your desired format, and connect them up according to your business logic, but who's really going to complain about that after getting all of the above for free? Hell, for half of my clients I barely have to write a single custom line of code; their entire site request can be broken down into reusable Django apps that already exist and I've worked with before. It's the pinnacle of Don't Repeat Yourself. If that's not the ideal ecosystem for webapps then I don't know what is.
- steveklabnik 16y ago> Forgive me if I'm wrong, but this just doesn't exist for Rails. Snarky answer: "Yeah, it's called GitHub." Real answer: I'm not sure what you're suggesting. All of these things are available as a Ruby gem, either directly or as Rack middleware.
- gommm 16y agoI've been a rails developer since the beginning and this has been true on rails as far back as Rails 1.0.. Now we use github and gems on gemcutter, before that there was the list of plugins http://agilewebdevelopment.com.. http://agilewebdevelopment.com... Now http://djangoplugables.com/ http://djangoplugables.com/ is rather well organized and we don't really have a good centralized place to find them outside of github, but they exists and it's quick painless to use them...
- paulbjensen 16y agoThanks for the details, very useful stuff. I work at a large company and we're toying with the idea of building our next project, a JSON API, using Node and MongoDB. Did you do any integration testing for scrabbly?