Live data from Hacker News

Why we moved from NodeJS to Ruby on Rails

blog.targeterapp.com

71–80 of 166 posts

Re: Why we moved from NodeJS to Ruby on Rails

#71
post #53
post #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…

Actually since the app was developed at startup weekend which gives you 54 hours to make a presentable demo, I'd say testing was not the first thing on their mind.

And it's generally nowhere near 54 hours... more like 42. We nominally started at 6pm on Friday night, but teams weren't formed until 9-10pm. Pitches were demoed Sunday afternoon, and 48 hours from the start on Friday - Sunday at 6pm, it was all over. I've no clue why they SW fixates on the "54 hours" number. 42 would be far closer to the truth, but perhaps more intimidating for people?

Re: Why we moved from NodeJS to Ruby on Rails

#72
This reads like my life story. Falling in love with a new technology, trying to use it in production, only to find out that it just isn't there yet :)

Node.js will become a great option for web development, but I don't think that node, at this moment, is ready for "mainstream" use.

Re: Why we moved from NodeJS to Ruby on Rails

#73
Since our stack involved MongoDB, it only made sense to live in a JS only environment.

I've never used MongoDB; can someone explain to me why this would seem like an advantage, and/or what it has to do with MongoDB?

Is the MongoDB API simply JavaScript?

Re: Why we moved from NodeJS to Ruby on Rails

#74
The important point in posts such as these is that execution matters, not the tool you use. If the tool you decide to develop with fits, then use it. If you find out later it doesn't work, then switch. Sure, the tool you use can affect your execution, but that only means you have to understand how you want to execute before even selecting a tool.

I think it would be a big mistake to read such a post and come to the conclusion that Rails is somehow superior to node.js.

Re: Why we moved from NodeJS to Ruby on Rails

#75

Since our stack involved MongoDB, it only made sense to live in a JS only environment. I've never used MongoDB; can someone explain to me why this would seem like an advantage, and/or what it has to do with MongoDB? Is the MongoDB API simply JavaScript?

I didn't understand that either. MongoDB works very well with many other languages; just recently I was using it with Python, and the driver and API work very well. I guess since MongoDB stores data in BSON, which is the binary version of JSON, the javascript object format, the author decided that JS is closest in spirit to Mongo.

Re: Why we moved from NodeJS to Ruby on Rails

#76

Since our stack involved MongoDB, it only made sense to live in a JS only environment. I've never used MongoDB; can someone explain to me why this would seem like an advantage, and/or what it has to do with MongoDB? Is the MongoDB API simply JavaScript?

Mongodb is a json document store. I use it myself. It works very well with "node" because node of course uses javascript as its language.

Re: Why we moved from NodeJS to Ruby on Rails

#77

Since our stack involved MongoDB, it only made sense to live in a JS only environment. I've never used MongoDB; can someone explain to me why this would seem like an advantage, and/or what it has to do with MongoDB? Is the MongoDB API simply JavaScript?

Mongodb is a json document store. I use it myself. It works very well with "node" because node of course uses javascript as its language.

But wouldn't it work as equally well with any other language that has a JSON library? With Node you still need to call a function to serialize an object to a JSON string or vice versa.

Re: Why we moved from NodeJS to Ruby on Rails

#78
post #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…

It seems to me a lot of this starts with "I have a general idea, and I want to get it off the ground ASAP" and transitions to "I have a focused idea, and can now revise the project accordingly"

I see nothing wrong with that, as long as everyone involved recognizes the cost of rewriting/replacing large chunks later. If you're on a super tight schedule and don't want to write anything but JS, and you can afford to make revisions later (assuming the thing even catches on!) it strikes as pragmatic.

Re: Why we moved from NodeJS to Ruby on Rails

#79

Earlier quoted context omitted.

#3 I'm not undestanding. Are you doing async? I don't know the socket API but it should be something like this: it("should wait for socket", function(done) { socket.write("asdfadf", function(err, response) { assert.ok(response.indexOf('token') >= ); done() ); }); #4 If you need a new event loop then write the tests in another module, then simply run your test utility. `mocha` will run all tests in test/*test.js. RSpe…

>RSpec is DOG SLOW! I can run 100s of test in a couple of seconds. Can RSpec even startup in that time? Yes, of course it can. RSpec is not especially slow. Obviously the ruby interpreter can be slow, for any given rspec test you could write something faster in C or Java or Go or whatever. That's irrelevant. I'm guessing you're referring to rails tests, where the whole rails stack has to be loaded with each run of th…

Exactly. If you know how to use stubs/mocks properly, you can write blazingly fast tests. I have a test that does ~100 assertions in <1 second.

Re: Why we moved from NodeJS to Ruby on Rails

#80
post #47

Earlier quoted context omitted.

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…

Completely agree. I tried to learn rails and gave up partly for this reason. I have been using node for a while now and LOVE it! I really dont understand why people bash node.

In my experience, few people spend much time dissecting technical reasons why node sucks, and most of those people who do don't understand it.

Loads of people laugh at the people who reply to virtually every post with "I use node and LOVE it!", but that's to be expected with any case of over-ebullient advocacy.

Post reply on HN