Top JavaScript Frameworks july 2014 | Página 4

Examples of Where Node.js Should Be Used: The following are some examples of where Node.js should be used : CHAT The chat application is really the sweet-spot example for Node.js: it’s a lightweight, high traffic, data-intensive (but low processing/computation) application that runs across distributed devices. PROXY Node.js is easily employed as a server-side proxy where it can handle a large amount of simultaneous connections in a non-blocking manner. It’s especially useful for proxying different services with different response times, or collecting data from multiple source points. DATA STREAMING It is possible to process files while they’re still being uploaded, as the data comes in through a stream and we can process it in an online fashion. This could be done for real-time audio or video encoding, and proxying between different data sources. Real Time Applications: Some of the real time applications of Node.js are: It can be used as Web socket server : A typical example of this is a chat server. Fast file upload client: when there are big file to be uploaded, to make sure that they don’t block so that you can upload more than one file at a time. Advantages of Node.js: Node.js is a lightweight platform. Node.js combined with a browser, a document DB (such as MongoDB or CouchDB) and JSON offers a unified JavaScript development stack. Node allows the reuse of the same model and service interface between client-side and server-side. Disadvantages of Node.js: Npm shrink wrap and package.json were introduced a while back to set up standards, but the issue of standards is still a work in process and some issues still exist. The whole callback, event-driven, functional programming aspects of Node.js can add a learning curve burden to s erver-side programmers of other object-oriented languages. Asynchronous and event-driven code inherently adds more complexity to the code versus a synchronous code. JavaScript has more than its share of “bad parts” that might throw off engineers and newcomers.