'Using Node.js as an alternative of Spring MVC project
Hello to everyone who is viewing this question.
I am currently running a web-application server, which only does CRUD operation (using MySQL) for android and iOS mobile applications. Current server is written in Java, which is using Spring-MVC, a Spring legacy project.
I saw lots of posts describing Pros and Cons of Spring-MVC and Node.js.
In my case, I dont use Server-Template-Engines because I only do CRUD operations that mobile applications need as I wrote above.
My final question is, is it more efficient to use Node.js in my case?
Also, I happen to be entirely new to Node.js, and I am currently running my Spring-MVC by installing tomcat8 on AWS Linux.
Solution 1:[1]
I would like to clarify that Spring is a Framework and NodeJS is a JavaScript runtime. Having said that I can understand why people like to compare both. Sprint implements many features that make Java easier to use and more like NodeJS.
Spring has many libs that hide the fact that it's multi-threaded (using thread pools and the further design pattern). And not worrying about threads is one of the most powerful features for rapid development.
is it more efficient to use Node.js in my case?
I would say no. I can't say that refactoring your application as-is to NodeJS will improve your situation in any impactful way (Unless there are additional requirements).
Also, I happen to be entirely new to Node.js, and I am currently running my Spring-MVC by installing tomcat8 on AWS Linux.
The one real difference between both approaches is the deployment. As you mentioned Sprint needs to be deployed on an already running server (Tomcat or Apache) where NodeJS (HTTP server modules) approach is that the application is the server as well (more like Spring-Boot
)
I love NodeJS and will highly recommend it due to its fantastic community (NPM is full of grate modules) but if you like to continue developing in Java I think Spring-Boot
is the way to go.
Allows you can take a look at the following Nodejs frameworks to get a better idea of development env:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | 0xLogN |