DEV Community

andyreadpnw
andyreadpnw

Posted on

Migrating my Projects to NodeJS and away from Ruby on Rails

I learned my first server-side language in Ruby as I graduated software engineering school in 2020. Using Ruby on Rails to spin up each back-end for the projects I created made me appreciate how powerful and easy it was to develop. However, after I started looking for a job as a developer, I began to realize the majority of jobs were in a NodeJS. Indeed, NodeJS is by far the more popular of the two frameworks currently.

Alt Text

I will not go through a point by point pro-con analysis of both frameworks(I think this post actually does a really good job on that account), but I will explain my experience with both and why I am adopting NodeJS's Express for my upcoming projects.

Ruby on Rails always made me a little nervous when I finished a project, because it felt like there was too much "magic" going on. Building a project architecture using the MVC concepts is super easy and handles a lot of the work. Simply by writing rails g controller modelName index show create edit you can tell the controller to access data from the model. The actual connections are all behind the scenes. As for me I prefer to know exactly how my systems connects to each part which seems to fit Node well by defining each action.

Alt Text

Additionally, I really like that Node uses JavaScript as its language. When I build a project using JS in the front-end it is really easy to use the same language to build my back-end. Not to mention the community for JavaScript seems to be huge. I can usually readily find the answers I need for both Ruby and NodeJS, but it is helpful that I can talk to most of my personal contacts about a JS build in Node whereas a Ruby problem I would usually have to rely on my graduating class or a former instructor. Stack Overflow is awesome for solving problems, but I enjoy discussing a system structure in person to get their take on how they like my initial take. I should also note that Ruby does have a bit of stigma these days as a somewhat out-of-fashion language. Enterprises like that Node is more easily scale-able and fast.

Alt Text

There were a couple of instances where I was actually asked in interviews why Ruby on Rails is the framework I was taught and not a more marketable language. I explained we learned ruby because it is a programmer friendly language to interpret and I am currently learning Node which Ruby prepared me for. Ruby was instrumental in being a great playground for all of my first projects.

In Ruby on Rail's favor, it does feel more polished sometimes. You can find libraries in Ruby for everything and they are usually really well ironed-out. In contrast, I am told NodeJS can sometimes be a dumpster fire as a number of packages are incomplete or break(consulting stack overflow: "Yah that will happen sometimes").

The great thing about learning a programming language is you have all the tools to dive into the next one. I have only deployed a few projects using Node on the server-side, but I am excited to continue learning and expand my knowledge!

Top comments (0)