top | item 5221108

Ask HN: Rails or Nodejs

7 points| eibrahim | 13 years ago | reply

I am an experienced web developer 10+ years and use aspnet mvc. I want a new framework for my next project - just for fun.

There are tons of awesome gems for Rails but I feel like the future is node... Which one should I go with?

15 comments

order
[+] Donito|13 years ago|reply
Asking whether to use Rails vs. Node is like asking whether you should use DirectX or XAML. Both can be used for rendering UI, but every technology has its strengths and weaknesses so the answer is "it depends".

You can either start by choosing a technology, then a project that is adapted to it. Or pick a project, and choose the framework that is best for achieving said project. Here are some thoughts about Node vs. Rails to help with your decision:

Node: - Uses Javascript (on back-end) - Asynchronous IO, great for handling high volume of requests or massive amount of simultaneous connections. - Smaller learning curve, given you're most likely already familiar with JS - Can do much more than traditional web frameworks (e.g. php/rails), like binding to a specific port, handling socket connections etc.. - It's pretty fun :)

Rails: - Uses Ruby, so there's a bit of a learning curve here - Extremely mature framework with impressive amount of existing libraries (known as gems) that plugs into it - By nature, enforces great software practices (e.g. testing) - Best adapted for creating traditional SaaS applications - It's also a lot of fun :P

Honestly, if it's for fun, just pick one and start doing a project. They're both in their respective ways fantastic.

[+] eibrahim|13 years ago|reply
This is my favorite answer... I am building a SAAS, so I think the available gems and options make me lean towards rails for this project... I will chew on it for a little... How is rails on windows? I have a macbook but I prefer working in windows.
[+] squidsoup|13 years ago|reply
You're sending mixed messages - if you want to learn something for fun, you only need to ask yourself which language you enjoy the most and pick a corresponding framework. If you want to learn something future proof, both rails and node are going to be around for a long time yet, so you can't really go wrong with either of them. Node is much more low-level than Rails - you probably want to be looking at Express if you're after a web development framework.

Whatever you do just pick _something_, and don't get lost down the rabbit hole (http://news.ycombinator.com/item?id=5197155).

[+] downrightmike|13 years ago|reply
I had started with rails in my spare time, but there are a lot of security issues that they are having to fix, more out today. I don't want to have to patch something in the middle of the night or lose everything. So I'm waiting for the next major release to see if they iron it out. In the mean time nodejs with express seems to be a decent use of the time. Get your feet wet free: https://openshift.redhat.com/app/ They're helpful and backed by aws Some of their images are a bit outdated, but there are custom images you can load from github
[+] mtdewcmu|13 years ago|reply
I think you may be comparing apples and oranges. From what I hear, node is not so good for large, complex projects. It has a specialized niche that it's very good at -- lightweight servers that need to either support large numbers of concurrent users, or they have to be very low-latency. Rails is good for general-purpose web development.
[+] excid3|13 years ago|reply
Try both. Build something simple like a todo list in both, see which you prefer and then use that.
[+] mindcrime|13 years ago|reply
Grails[1]

[1]: http://grails.org/

[+] eliot_sykes|13 years ago|reply
For the last couple of years I've been working on both Grails and Rails apps.

Grails is great when comparing it to what came before it in Java land, however, given the choice on a greenfield project, especially one I'm doing for fun, my gut instinct is to reach for Rails. One reason being Rails has noticeably quicker startup times and has less need to restart the app during development. To be clear, Grails startup time isn't terrible, but Rails is faster, and you notice it when you're working with both.

[+] eibrahim|13 years ago|reply
I am open to new technologies and learning new things but there is nothing I hate and despise more than anything with the word "java" in it.