Life Thunder Dog---node. js---3commonJs and Nodejs

Source: Internet
Author: User

JavaScript is a powerful object-oriented language, and it has many fast and efficient interpreters. The official JavaScript standard defines the API for building browser-based applications. However, it is not set in a standard library for a wider range of applications.

The CommonJS API fills this gap by defining APIs that are used by many common applications, primarily non-browser applications . Its ultimate goal is to provide a library of standards like Python,Ruby and Java . In this way, developers can write applications using the CommonJS API , which can then be run in different JavaScript interpreters and different host environments. In a system compatible with CommonJS , you can develop a practical JavaScript Program:

Server-side JavaScript Applications

Command-line tools

Graphical interface Applications

Hybrid applications (e.g.,Titanium or Adobe AIR)

the relationship between NodeJS and CommonJS

CommonJS is a specification,NodeJS is the implementation of this specification. CommonJS is an evolving norm and the plan will include the following parts:

Modules

Binary Strings and Buffers

Charset Encodings

Binary, buffered, and textual input and output (IO) streams

System process arguments, environment, and streams

File System Interface

Socket streams

Unit test assertions, running, and reporting

Web Server Gateway Interface, JSGI

Local and remote packages and package management

Customized progress for each sub-specification please see the official website for instructions:http://commonjs.org/specs/

CommonJS has many implementations, many of which are famous, such as:Apache CouchDB and node. js and so on. But most of these projects only implement Part of the CommonJS specification. Specific project and implementation section see the official website for instructions:http://commonjs.org/impl/

Don't underestimate it as a background app.JavaScript,Palmof theWebOSDevelopment plan mentioned in theCommonJSand its extendedJS API, and almost all of the platforms, including the smartphone platform and the computer platform, began to introduceWebtechnology: for exampleS60in theWRT,IPhonein theWebwidget,Androidon the platformWebwidget, there areFirefoxdirectly withXMLand theCSSused for InterfaceJavascriptcontrol logic, evenGoogleof theChromeOSis directly a browser operating system. I make a technical bet: Dynamic language and static language mixed programming will be very popular (e.g.Androidand thePalmwebosThe introduction of twoSDK,QTuntilQtscript).

Life Thunder Dog---node. js---3commonJs and Nodejs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.