Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Rails or Nodejs
7 points by eibrahim 1470 days ago | hide | past | web | 15 comments | favorite
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?

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.

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.

I've gone that route in the past, and truth is it's painful to run rails on windows (albeit not impossible). The main issue I ran into was that some gems (libraries) rely on native extensions that are not available on Windows.

HOWEVER, there's still a way which works pretty well, which involves running rails from a Virtual Machine (e.g. Ubuntu) to which to ssh into, while coding from windows. Take a look at http://tinyurl.com/b8w4exm (using vagrant might be easier than this tutorial).

I might add that for learning, Windows is pretty good (now... it was not used to be this way, haha) - though the problem you mentioned consists and it is better to switch to Linux after a while (when you need those gems).

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).

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

Take a look at snap (http://snapframework.com/) as well. I'm working on a small project with it, and I'm really enjoying the type system after getting over the initial hump. Also, it has great concurrency performance characteristics (http://snapframework.com/blog/2010/11/17/snap-0.3-benchmarks), though that wasn't much of a factor in me deciding to try it.

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.

Try both. Build something simple like a todo list in both, see which you prefer and then use that.


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

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.

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.

What do you think the 'j' in node.js stands for?

that's one j I don't mind. I actually love javascript but that is very different than java & jvm


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact