learn Node.js vs Ruby on Rails


Short Answer: Learn JavaScript first because all web devs need JavaScript, but not all web devs need Ruby on Rails. Once you know JavaScript, feel free to test them both out and see what you like better.
What you choose is not as important as how you learn. Here are two articles that talk more about HOW to learn: What new programmers need to learn 
Longer Answer: Both can be good options.
Reasons to learn JavaScript/Node.js:
And also "An overview of JavaScript" Why You Should Learn Javascript , which talks about the language and who's a good fit for it.
- Node.js IS JavaScript
Learning Node.js feels more natural because Node.js IS JavaScript. Learning JS helps you learn Node, and learning Node.js helps you learn JavaScript because they are the same thing, just being used differently. It's not hard to learn Node if you know JS.
- Every Web Dev Needs JavaScript
   Unless you work in a huge company where you strictly do backend only then you will practically NEED to know JavaScript. Also if you change from Ruby to Python, or any other backend language, JavaScript carries over because all the backend languages use JavaScript. This is not the case for Ruby/Rails. So even if you learn Node and then decide to use something else, you still have that JavaScript knowledge that will be extremely handy. With learning Rails the carryover isn't as high.
- Real Time Apps Are Cool. You'll build chat apps or anything "real-time" super easily with Node.js
- Tons of Job Openings
   There's an insane amount of JavaScript Jobs. Look at the difference in any city between JavaScript openings and Ruby openings. If you're looking for a job, focusing on JavaScript is highly recommended. It may not be Node, but Node.js and Front end are pretty similar and the carryover is high. Strictly Node VS Rails, Rails currently has more jobs, but Node.js is catching up. Unless you live in a Tech hub like Dallas, LA, SF, Seattle, NYC etc... You might struggle to find a job in either Node.js OR Rails.
- Be on The Bleeding Edge/Startups
   As someone mentioned, Node.js is where Rails was 5 years ago. Node.js is smoking hot right now. Many startups are using it because it's sexy and new, and a few bigger more adventurous companies are giving Node.js a try. It may not be that Node.js is "better" it's just that people are trying new things, and Node.js is the bleeding edge new thing right now. The benefit of using the "new thing" is that you won't feel like your playing "catch up". It's just a different kind of risk. Do you want to risk working with older technology when everyone is moving towards something new, or risk working with something new and unproven?
Reasons NOT to learn JavaScript/Node.js
  - NONE. Every Web Dev Needs JavaScript.
   Node.js is optional, but JavaScript is (practically) mandatory.
  - Node.js is a little harder to learn.
    There are not nearly as many resources to learn Node.js as there are to learn Ruby and Ruby on Rails. BUT, the important part is learning HOW to learn. If you understand this you can learn any technology The main point here is to break down everything into the smallest chunks you can. Don't learn "Express.js" or "Rails". Learn how "GET requests" work in Express/Rails, play with that all by itself, then learn "Jade" or "ERB" all by itself.. ONE THING AT A TIME.
  - Node itself doesn't have a lot of job openings, even though the number is increasing.
- Node.js is still new-ish
    Node.js is still new and not as "proven" as Rails is. If you're looking for something concrete that will be guaranteed to get you and your startup running, then Ruby on Rails may be a safer bet. (JS is proven, but Node isn't... as much)
Reasons to Learn Ruby on Rails:
  - More mature
    Ruby on Rails is safer because there are already lots of developers using it, there are more resources for learning rails, Ruby has been out since the 1990's, there are more jobs in Rails (compared to strictly Node), and people have been using Ruby on Rails to build their companies large and small for a while now. You know what you are getting when you work with Ruby on Rails, both the good and the bad.
  - Does a lot for you
    This is both good and bad. Good if you just want to build the product and get on with life. This makes developing a new product or features a lot faster than if you were to use something that is not Rails. It's bad if you want to learn how things work on a deeper level.
  - Easier to learn, Opinionated, & Structured
  already said this, but there are more resources to learn Ruby on Rails because it's more mature. Rails is also very structured. There is ONE way to do things, and everyone does them that way. Rails is much more organized than Node and therefore easier to get the hang of.
- Ruby is Beautiful, and easy on the eyes
JavaScript can be a nightmare to look at, and even worse when you get into "callback hell" let alone trying to comprehend the heavy use of anonymous/callback functions, and closures. JavaScript is built on those, and its difficult to read that stuff.
Ruby on the other hand is really easy to read, and that's part of the draw of Ruby/Rails. Although I wouldn't say this is a strong reason to use Ruby, it's more of a perk.
Reasons NOT to learn Ruby on Rails:
  - Too Magical
    This is my only real problem with Ruby on Rails. If you're still LEARNING how to program in general, Ruby on Rails just does way too much for you. It makes it so much easier to build apps that you almost don't even need to know what you're doing to build apps. You have to force yourself to dig deeper to really learn what's going on under the hood. I built several full-scale working prototypes doing all the CRUD operations, and I barely knew how HTML forms worked.
  - Slow. Ruby/Rails is slower than other languages, but this won't even be a problem until your company/product is successful, and this is made up for with the speed of development.
Conclusion:
Ruby on Rails is a great language/framework if you just want to build that product quickly. In almost all other cases I'd suggest starting with JavaScript, easing your way into Node.js because it's less to learn, and if you're not happy with that, give Ruby and Rails a try.

No comments:

Post a Comment

Genuine websites to earn money.

If you are interested in PTC sites then this article is for you. I have personally tried many of the sites and found that the best thing ...