DEV Community

loading...
Cover image for David Vs. Goliath(Node.js/Express.js vs Ruby on Rails)

David Vs. Goliath(Node.js/Express.js vs Ruby on Rails)

Curtis Laurence Chadwell
・2 min read

This particular post is more of an opinion piece just an fyi, and didn't feel like coding tonight. Over the weekend I had the chance to finally work with Node.js and Express.js...because I found it necessary for me to gain exposure ,and to be able have my own opinion of the two. As a developer its good to have these perspective to know how to integrate these backend frameworks with your frontend frameworks like React, and Vuejs.

Alt Text

What do Node.js/Express.js and Rails have in common? They are both Model, View, Controller(MVC) frameworks that make it easy to develop a organized backend for a full-scale web application. I will not go into breaking down the two in depth, otherwise you all would be reading a dissertation. Express.js uses JavaScript ,and Rails uses Ruby(Wooohooo). You can integrate any database you want with these(..but never use SQLite for a production application).

Now what is the difference between the two?

Rails
Rails is a very heavy framework given the amount of files it produces, but is a lot of fun to work with in my opinion when you are learning the MVC concept. Though slow at times, it comes with a lot for you to work with without needing to customize your eco-system too much. This is part of the reason you'll see a lot of startups using Ruby on Rails. Plus if Ruby is your first language outside of JavaScript, its probably very easy to understand syntax-wise with it being a high-level language(Very human readable). But the main thing to take away for this is Rails is fun ,but heavy

Node.js/Express.js
Express.js on the other hand is the the skinny boy out of the two frameworks, but you can build out the heck of this framework for what you need your project to be. Minimal amount of files....but robust by design. Its very fast to start up, but you will need to be more creative, because you can end up writing more lines of code versus how much you would with Rails, hence why Express.js is way more flexible in how you want to customize it. You'll see bigger companies using Express.Js/Node.Js, because they need something designed for literally everything which is fine.

I will not provide an opinion on what type of project you should use these for because they can both be used as a reliable backend framework and it comes down to preference. Whenever you are exploring the two for a upcoming big project, just just keep the brief points I mentioned in mind.

Discussion (4)

Collapse
_shirish profile image
Shirish • Edited

Dude .. just curious -- who is Daniel ?

Collapse
curchadw profile image
Curtis Laurence Chadwell Author

Good catch, lol. I can't believe I botched that name, sorry.

Collapse
jla profile image
Librebits

Haha... Daniel ?

Collapse
curchadw profile image
Forem Open with the Forem app