My Experience with Spring Boot and Node.js

Anton
2 min readJul 2, 2021

Spring Boot vs Node.js has always been a topic for debate with solid arguments for each side. There are many great articles that compare the two on medium.

These articles do a great job at running the numbers and getting the facts right. However, I want to discuss the experience I had working with the two.

Throughout this article “MERN stack” is meant by Mongo, Express, React, Node.js

Popularity
By popularity, the MERN stack takes the lead. Spring Boot has about 55k stars on Github, Express has about the same, and Next.js has 70k stars. Next.js is a framework that combines React and Express into one with more features on top.

Seamless JSON Support
The whole point of the MERN stack is that it is written in JavaScript on both the front end and the back end. Additionally, a NoSQL database like MongoDB is used because JSON objects are a part of JavaScript. The ability to share information on all three parts of the application using JSON objects is what I and all MERN developers love.

With Spring Boot, your stack looks a bit like this; Spring Boot as the backend, React as the front end, and usually an SQL database.

Almost all of today’s APIs are written using the JSON format. This makes writing APIs with Spring Boot slower. Instead of writing out the JSON object, you have to use Java’s built-in ArrayList and HashMap classes. The same applies to using a NoSQL database such as Mongo.

Multithreading
Node.js is single-threaded. I found this a limitation when building certain applications such as my Remote Server Management API. Even though I wanted to write this with Express, I simply couldn’t. I needed multithreading which Node doesn’t have.

Popularity Continued…
We previously saw that the libraries and frameworks being used as part of the MERN stack are more popular. More popularity means more community support and updates.

Open-source packages are crucial for fast development. Node.js has NPM (Node Package Manager) and Java has Maven. Both languages have lots of amazing libraries out there. Although I can’t yet comment on which one is better, I found using npm more pleasant.

Final Thoughts
These are just a few of the many comparisons I can give. Overall I think that both are great. But I prefer working with the MERN stack because there is more community support and it is convenient when both your front and backend are written in the same language.

If you enjoyed this article, be sure to follow me on Github where you can also find my contact information.

--

--

Anton

Software Engineer and CS Student. Currently working on blockchain tech! See some of my work on Github.com/icepaq