Click here to Skip to main content
15,919,749 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am going to develop a project which will have cloud and local servers, RS232 and Socket communication. It is a multi-page web application. i am planning to use node.js. Can some one suggest which one is best fit for my application. Java or node.js. The thing is I know java well.
Posted

C#
"It is used for front-end app"

Well, this is horribly wrong.
C#
"Node.js is primarily used to build network programs such as web servers, making it similar to PHP. The biggest difference between PHP and Node.js is that PHP is a blocking language, where commands execute only after the previous command has completed, while Node.js is a non-blocking language where commands execute in parallel, and use callbacks to signal completion."
https://en.wikipedia.org/wiki/Node.js[^]
node.js is a non-blocking, single threaded (event loop), low level I/O JS(V8) interpreter. The advantage of node.js is that it is based on libuv, which is written in ANSI C and therefore can be compiled on nearly any platform without the need of a VM-Layer unlike Java (Bytecode) and .Net (IL) it compiles to native code and runs much faster, is more memory and cpu efficient (it has in general smaller footprint).
So, if you write a micro service(buzzword alert!) go with node.

The only good reason to use java is, that it is better supported and wider spread, for now. And, there is much more mature java software out there you can rely on - especially for money. So in terms of development speed, Java and .Net are still a good choice if you don't pay the bill for the development stack nor the infrastructure.

For me it is more a decision between development speed (especially for you) and operating costs.

One more nice thing to mention: Node.js has the benefit of using the same language server and client side, ideally this is called isomorphic JS - look it up on Google. While JAVA or .Net are dispensable, at least client side, JS is needed anyway. And, don't forget, it is chosen to be the way to go by various companies (including Microsoft). Currently many companies are heavily investing on node.js like IBM who recently bought Strongloop, or ebay, airbnb, linkedin, wallmart, who are shifting their platforms to node.

But be warned: Node.js, better to say server side js, is nothing like what you might know from ordinary web development.

regards, me.
 
Share this answer
 
Node.js[^] is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. It is used for front-end app. To develop server and cloud, you can use Hadoop[^], which is implemented in Java. Thus, you have to use both java and Node.js to develop your project.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900