Node.js vs Java
Created#More Posted time:Sep 2, 2016 9:37 AM
More and more colleagues are talking about Node.js, about its asynchronous IO, event callback and uniform language for both foreground and background development. For entrepreneurs, you may have chosen Node.js for your first project as you desire to complete development in one language to save time and costs. But I was “ridiculed” when suggesting Java as the project architecture to colleagues from other project groups. They thought I was outdated by still sticking to Java. I also found that more and more front-end colleagues are tapping into back-end function development using Node.js. As a background development engineer, I feel the stress.
So leveraging the opportunity of the new project, I systematically studied the knowledge system of Node.js. This article summarizes the Node.js technologies I learnt and compares counterpart technologies of Java, in an aim to provide some decision-making reference for architects evaluating the two types of architecture. To avoid disputes, this article does not make any recommendations on architecture language, and does not make forecast on future trends.
Background of languages:
The comparison of the origination of the two languages reveals that PHDs are typically good at exploring in-depth technologies while computer technologies are not necessarily the contributions of computer professionals.
Language and SDK analysis:
In comparison, Java is object-oriented and has become even more powerful and stable after 20 years of development. Compared with Node.js, Java is a giant with a breadth of expertise in various fields. But it is just because of this that Java is much more costly to study than Node.js is. Every small technical detail of Java is worth a thick book. Java is also keeping abreast with the times by supporting asynchronous IO and event callback in its new SDKs, and Java open-source projects are also continuing to grow.
Third-party open-source framework selection:
After the language is decided, the framework selection follows. A good framework can save a lot of unnecessary duplicated efforts to easily empower the project to have powerful features. Of course, the introduction of third-party open-source frameworks also gives rise to the learning costs. Similarly, Node.js frameworks feature a low learning cost due to its short history and developers may find it easier to access more underlying source code, but some frameworks are prone to stability and compatibility issues. In addition, NPM developers vary in their development skills and there are no effective evaluation mechanisms. So you need to be cautious when selecting some modules (especially C/C++ modules). Java third-party open-source frameworks have been widely applied in a lot of enterprises and feature mature and stable performance and powerful features, as well as well-designed encapsulation and layers. After a higher learning cost, developers can enjoy a foolproof usage. In terms of Web development systems, both programming languages can find many open-source frameworks ready to be reused and introduced.
Execution engine analysis:
Node.js's asynchronous IO and event callback are its trump card, but other programming languages are also catching up on this. But Node successfully uses one language for both the front-end and back-end code, which is definitely second to none and has attracted lots of developers. But V8 engine contributes to both the success and the cause of failure. Its development is not light-packed, but Node.js is still young and developing quickly. I believe with the merge of IO.js and Node.js and more and more developers joining in Node.js, Node will become more and more stable and mature.
In comparison, Java is a giant in programming field. 20 years of development makes it mature and stable, with a sound ecological system. The flow of Android again puts this language to a pinnacle and it is always a key option in architecture selection.
1st Reply#Posted time:Mar 30, 2017 15:41 PM
What do you think about this article about Node js enterprise framework? https://www.cleveroad.com/blog/the-best-node-js-framework-for-your-project--express-js--koa-js-or-sails-js I think it's really great research
2nd Reply#Posted time:Sep 17, 2018 21:05 PM
3rd Reply#Posted time:Apr 10, 2020 20:44 PM
Sorry, the user is banned
4Floor#Posted time:Apr 15, 2020 8:11 AM
Very detail analysis comes with view point vary from language author background until language features comparison.
5Floor#Posted time:Feb 5, 2021 17:08 PM
In your opinion, which tech stack is better to use to build a function like this?
6Floor#Posted time:Jun 9, 2021 13:05 PM
7Floor#Posted time:Jun 17, 2021 19:27 PM