Live data from Hacker News

Why we moved from NodeJS to Ruby on Rails

blog.targeterapp.com

41–50 of 166 posts

Re: Why we moved from NodeJS to Ruby on Rails

#41
I could write a similar post, having used Node on a couple of projects before nodding to reality and switching back to Rails for a larger project.

For a "typical" web project, Rails simply has a ton of mature libraries that don't exist in Node, or are very early days. Sure, there might be a basic data mapper, but does it have support for testing? Automatic counter caching? Workaround on StackOverflow for a hundred things the framework doesn't cover by default?

Rails versus NodeJS isn't apples-to-oranges. Rails is an opinionated framework for web development, Node is a low-level evented framework. This is important because right now, Node has no Rails equivalent. It has Express as the equivalent of Ruby's Sinatra, but for a higher-level web framework, there are several possibilities and none of them the outright leader. This is the situation Python found itself in circa 2006, before Django became the de facto standard for web apps, and (speaking as a mostly-outsider) its seems to me the Python community is better for it. I truly hope a high-level framework establishes itself as the clear standard for Node development, presumably one which embraces the benefits of dual-side JavaScript.

Re: Why we moved from NodeJS to Ruby on Rails

#42
post #38

Earlier quoted context omitted.

First thing is that NodeJS is not a JS engine, V8 is. Second, http://notinventedhe.re/on/2011-7-26 . That is from http://nodejs.org/community/ which makes the terms quite right, i'd say.

Node is V8 and a standard lib. Node is not an abstraction around http (which is what RoR is).

"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications."

From nodejs.org

Re: Why we moved from NodeJS to Ruby on Rails

#43
post #37

The author seems to be confused about what Node.js is. > NodeJS is a very young framework, and packages around it are very immature. Node.js is not a framework. It is a JavaScript engine and standard library. Node is comparable to the MRI.

A standard library is nothing but the default framework built into the runtime system.

I don't see what you mean, the author is comparing Node.js to RoR so what you are referring to as a "framework", is not the same thing as the author. He is referring to a framework for writing web applications. Node is a "framework" for writing JavaScript applications that are compiled by V8 and executed on a *nix or Windows machine.

Re: Why we moved from NodeJS to Ruby on Rails

#44
post #42

Earlier quoted context omitted.

Node is V8 and a standard lib. Node is not an abstraction around http (which is what RoR is).

"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications." From nodejs.org

Right, and "fast, scalable network applications" !== "http abstraction layer". Node doesn't even come with an http abstraction, it comes with the standard request/response objects that nearly every standard lib ships with.

Re: Why we moved from NodeJS to Ruby on Rails

#46

I could write a similar post, having used Node on a couple of projects before nodding to reality and switching back to Rails for a larger project. For a "typical" web project, Rails simply has a ton of mature libraries that don't exist in Node, or are very early days. Sure, there might be a basic data mapper, but does it have support for testing? Automatic counter caching? Workaround on StackOverflow for a hundred th…

There is a project coming up - railwayjs. I hope it changes the way people use nodejs!

Re: Why we moved from NodeJS to Ruby on Rails

#47
post #32

Basically they switched for... personal opinion. That's all I can really gleam from the post. You can do it all in Node JS, they just didn't want to. Screw all the frameworks, I am working with bare-metal Node and loving every minute.

definitely agree with this. I can understand why 37signals use RoR, because they built it and know it inside out. But for a newcomer diving into rails now is difficult because the ecosystem is so huge it's hard to navigate, and everything is so integrated and you usually end up bundling a ton of thin that you don't need. With node everything is modularized, it is much more easier to understand what's happening under the hood, and streams are freakin awesome.

Re: Why we moved from NodeJS to Ruby on Rails

#48
post #24

Does anyone know 1 major consumer-facing site that was able to scale with Rails? I know Twitter kind of had to move away from Rails due to scalability issues. GameBattles.com also had to back away from Rails after their uptime dropped to 80%. I am not trying to tarnish Rails, I am just curious to learn about some success stories involving Rails at very large scale.

Github, Airbnb, Groupon. Three reasons people think Rails doesn't "scale": (1) Earlier versions were adopted by applications with anomalous scaling requirements. So, the project had to "learn to scale" on its feet in a very short amount of time. There were predictable hiccups. Or, put even more simply: it's a young framework that got adopted quicker than people expected. (2) There's an expectation that web platforms…

Thanks, very interesting. Good to know Rails can get there.

Re: Why we moved from NodeJS to Ruby on Rails

#49
I really do think that, as time wears on, we will see more of these incidents of people switching from Node to another, more familiar development environment. It seems to me that a lot of people started using Node simply because of the amount of hype that surrounded it, and many of these decisions were not as well researched as they should've been.

Reading through this gentleman's blog post, it seems that, originally, Node was chosen for just one reason – he wanted to develop the entire application in JavaScript. Other than this, it does not seem that he took the time to research the Node development environment before deciding to develop his application in it.

With respect to the author of this post, the testing environment and the ease of developing a CRUD web application are things that should have been looked into before a single line of code intended for production had been written.

In addition to this, as several other commentators have already noted, Node is not directly comparable to Rails. Node is basically an event framework and standard library that bolts onto JavaScript. Node would be more comparable to something like Python's Twisted or Ruby's EventMachine. The author was probably using one of the frameworks available in Node such as Express.js, Railway.js, or Geddy.

Re: Why we moved from NodeJS to Ruby on Rails

#50

I wonder what testing functionality, specifically, they see missing in the Node ecosystem...

I'm writing a server in Node and to date I'm still trying to figure out how to control the main loop from Node. I want to write tests like this: 1. register some timers and create some sockets 2. send some stuff over the sockets 3. wait until the socket handlers received some data which cause the handlers to unregister the sockets and timers 4. at this point, the main event loop has ended. go to next test and setup a…

There's also mocha: http://visionmedia.github.com/mocha/

Which has very similar syntax to RSpec.

Post reply on HN