Node.js gives JavaScript coders easy access to tonnes of open source
code packages. JavaScript with new tools and enhancements is flooding
the horizon at a breakneck pace. Node.js, an open source runtime system
invented in 2009 by Ryan Dahl is extending that reach to the server
side. Node.js is becoming popular with coders everywhere and is being
used to create APIs and building a new matrix of interoperability across
the Internet. Joyent has been the chief sponsor of Node.js from the
beginning. |
According to www.infoworld.com, Node.js is not a JavaScript framework; several authors have written excellent frameworks specifically for Node.js, like Express.js, Restify.js, and Hapi.js. It is finding its way into Web applications, operating systems wrappers, microcontrollers and robots because Node.js is a stripped-down, highly customizable server engine, a proto-server. It will not do anything out of the box until you set it up. This proto-server is accept ready and responds to requests, some of which may initiate other requests to some other part of the system.
Node.js ships with workhorse connectors and libraries like HTTP, SSL, compression, file system access, and raw TCP and UDP. JavaScript is a great language for wiring these connectors. You can snap connectors onto the event loop easily. This lets you create a simple, dynamic Web server in just a few lines of JavaScript. Node.js is a runtime system that makes it easy to build a network or other event-driven application servers and here are six things you need to know about it:
• JSON has won: JSON (JavaScript Object Notation) is a practical, compound, wildly popular data exchange format. It enables JavaScript developers to construct APIs fast and foster interoperability. JSON's stark simplicity can be expressed in just five railroad parse diagrams, notably without the self-conscious preening of XML and the SOAP, XSD, WS-*, RELAX-NG. JSON and JavaScript have reinforced each other's importance. In the early days of the Web, dynamic data in the browser had to be manipulated, filtered, and operated by reasonably comprehensible non-plugin language like JavaScript. Regardless of its original network-presentable format, data needed to be marshaled into a JavaScript object.
• JavaScript is everywhere: JavaScript is a quirky, object-oriented, C-like language. It is used for developing applications in the browser with a new framework. With Node.js, JavaScript has spilled over to the server. Implementation teams have driven JavaScript interpreters forward, so that Google's V8 engine is fast enough to reside at the core of Node.js. JavaScript has the internal capability to handle the event loop mechanism in a straightforward way. Other languages are used by their own evented systems. Python has Twisted and Ruby have EventMachine. JavaScript also runs across many OS environments to support them in the browser. This, along with the libuv library sees to it that Node.js has a broad footprint. But the biggest force for JavaScript’s migration is the programmers, who have to do less mental context-switching between a Web browser and the server. There are efforts to unify the environments between client and the server so that code can run well in either location, further simplifying the model and increasing productivity.
• Sharing is encouraged: The ethos of the Node.js community is sharing. It is easy to share library code packages, technically, culturally, procedurally, and legally. The Node Package Manager is included with Node.js and has grown to a repository of nearly 50,000 packages, making it likely that another developer has already packaged up a solution to your problem. Node.js' namespace philosophy is essentially the absence of letting any author publish under an unused module name in the shared public repository. Sharing code under the MIT open source license is recommended in the community making it a cross-pollination of code relatively worry-free from an intellectual property perspective. Also, the community is engaged in binding interesting C libraries like computer vision and the Tesseract open source optical character library.
• Node Package Manager works broadly: Node Package Manager is the root of almost all deployment systems for Node.js and underlies the many PaaS providers making it somewhat easy to move smaller applications between providers. Its simple, dependable package management makes the Node ecosystem grow well.
• Batteries not included' minimalism: Node.js applications and core are broken down into small modules that are composed and shared. Each package and tool can be scoped tightly and crafted to be manageable. The low-barrier, carefree nature of creating a module encourages experimentation in the community and experimentation in the package population. When executed well, each package typically handles one task
• Instrumentation: Node.js is well instrumented for production usage. There are tools to help bring an application to full production readiness and performance. As with any maturing technology, there are areas where more documentation, tools, and best practices could be helpful. But Node.js prior to the release has a strong ground.
No comments:
Post a Comment