请输入您要查询的百科知识:

 

词条 CommonJS
释义

  1. History

  2. Specifications

      Current    Proposals  

  3. Implementations

  4. See also

  5. References

  6. External links

{{Selfref|For usage in Wikipedia, see Mypage/common.js, Common.js and common.css, and Common.js.}}

CommonJS is a project with the goal to establish conventions on module ecosystem for JavaScript outside of the web browser. The primary reason of its creation was a major lack of commonly accepted form of JavaScript scripts module units which could be reusable in environments different from that provided by a conventional web browser e.g. web server or native desktop applications which run JavaScript scripts.

History

The project was started by Mozilla engineer Kevin Dangoor in January 2009 and initially named ServerJS.[1]

{{cquote|What I’m describing here is not a technical problem. It’s a matter of people getting together and making a decision to step forward and start building up something bigger and cooler together.|15px || Kevin Dangoor[1]}}

In August 2009, the project was renamed CommonJS to show the broader applicability of the APIs.[2] Specifications are created and approved in an open process. A specification is only considered final after it has been finished by multiple implementations.[3] CommonJS is not affiliated with the Ecma International group TC39 working on ECMAScript, but some members of TC39 participate in the project.[4]

In May 2013, Isaac Z. Schlueter, the author of npm, the package manager for Node.js, said CommonJS is being made obsolete by Node.js, and is avoided by the core Node.js developers.[5]

Specifications

The list of specifications includes:[6]

Current

{{columns-list|colwidth=22em|
  • Modules/1.0 (Superseded by Modules/1.1)
  • Modules/1.1
  • Modules/1.1.1
  • Packages/1.0
  • Promises/B
  • Promises/C
  • System/1.0

}}

Proposals

{{columns-list|colwidth=22em|
  • Binary/B
  • Binary/F
  • Console
  • Encodings/A
  • Filesystem/A
  • Filesystem/A/0
  • Modules/Async/A
  • Modules/Transport/B
  • Packages/1.1
  • Packages/Mappings
  • Unit Testing/1.0

}}

Implementations

{{columns-list|colwidth=22em|
  • Akshell[7]
  • Common Node[8]
  • CommonJS Compiler - a command-line tool that makes Common JS modules suitable for in-browser use[9]
  • CommonJS for PHP - a light-weight CommonJS implementation for PHP 5.3+[10]
  • CouchDB[11]
  • Flusspferd[12]
  • GPSEE[13]
  • Jetpack
  • Joyent Smart Platform[14]
  • JSBuild[15]
  • MongoDB[16]
  • Narwhal (JavaScript platform)[17]
  • Node.js[18]
  • Persevere[19]
  • PINF JavaScript Loader[20]
  • RingoJS[21]
  • SilkJS[22]
  • SproutCore[23]
  • TeaJS[24]
  • Wakanda[25]
  • XULJet[26]

}}

See also

  • Comparison of server-side JavaScript solutions
  • Document Object Model (DOM), a web browser client-side application programming interface (API) commonly available in JavaScript
  • JSGI

References

1. ^What Server Side JavaScript needs - Blue Sky On Mars
2. ^CommonJS: JavaScript Standard Library
3. ^ProposalProcess - CommonJS Spec Wiki
4. ^CommonJS: the First Year - Blue Sky On Mars
5. ^{{cite web|last1=Schlueter|first1=Isaac Z.|title=Forget CommonJS. It's dead. **We are server side JavaScript.**|url=https://github.com/joyent/node/issues/5132#issuecomment-15432598|website=GitHub|date=25 Mar 2013}}
6. ^{{cite web|url=http://commonjs.org/specs/ |title=JavaScript Standard Library |publisher=CommonJS |date= |accessdate=2012-09-21}}
7. ^Server-side JavaScript development and hosting - Akshell
8. ^[https://olegp.github.com/common-node/ olegp/common-node @ GitHub]
9. ^[https://dsheiko.github.io/cjsc/ - GitHub]
10. ^[https://github.com/DrBenton/CommonJSForPHP DrBenton/CommonJSForPHP - GitHub]
11. ^Implementations/CouchDB - CommonJS Spec Wiki
12. ^[https://flusspferd.github.com/ Flusspferd - CommonJS platform | Javascript bindings for C]
13. ^Implementations/GPSEE - CommonJS Spec Wiki
14. ^Implementations/Smart - CommonJS Spec Wiki
15. ^Homepage - JSBuild {{webarchive|url=https://web.archive.org/web/20110104112332/http://jsbuild.kodfabrik.com/ |date=2011-01-04 }}
16. ^MongoDB
17. ^Implementations/Narwhal - CommonJS Spec Wiki
18. ^Implementations/node.js - CommonJS Spec Wiki
19. ^Implementations/Persevere - CommonJS Spec Wiki
20. ^[https://github.com/pinf/loader-js pinf/loader-js - GitHub]
21. ^Implementations/RingoJS - CommonJS Spec Wiki
22. ^SilkJS WWW Site
23. ^Implementations/SproutCore - CommonJS Spec Wiki
24. ^Implementations/TeaJS - CommonJS Spec Wiki
25. ^Wakanda
26. ^xuljet - XUL JavaScript Enhanced Toolkit - Google Project Hosting

External links

  • {{Official website|www.commonjs.org}}
  • {{cite web |url= https://arstechnica.com/web/news/2009/12/commonjs-effort-sets-javascript-on-path-for-world-domination.ars |title= CommonJS effort sets JavaScript on path for world domination |publisher= Ars Technica |date= Dec 2009 |display-authors= 0 |first= Kris |last= Kowal }}
{{ECMAScript}}{{NodeJs}}{{DEFAULTSORT:Commonjs}}

1 : JavaScript

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/13 14:47:51