`

CommonJS简介[翻译]

阅读更多
来源:http://www.commonjs.org/

CommonJS

JavaScript is a powerful object oriented language with some of the fastest dynamic language interpreters around. The official JavaScript specification defines APIs for some objects that are useful for building browser-based applications. However, the spec does not define a standard library that is useful for building a broader range of applications.
The CommonJS API will fill that gap by defining APIs that handle many common application needs, ultimately providing a standard library as rich as those of Python, Ruby and Java. The intention is that an application developer will be able to write an application using the CommonJS APIs and then run that application across different JavaScript interpreters and host environments. With CommonJS-compliant systems, you can use JavaScript to write:
  • Server-side JavaScript applications
  • Command line tools
  • Desktop GUI-based applications
  • Hybrid applications (Titanium, Adobe AIR)


CommonJS

Javascript是一款功能强大的面向对象的语言,同时围绕着它,产生了一些最快的动态语言解释器。官方的JavaScript文档定义了基于浏览器构建应用的有用的对象。然而,官方文档中并没有定义一个标准的类库,用以构建更为广泛的应用。

CommonJS的API将会填补这一空白,通过定义这些API满足通用应用的调用需求,最终会提供类似于Python、Ruby和Java一样丰富的标准类库。目的旨在使应用的开发者可以使用CommonJS的API编写应用程序,同时编写的程序可以再不同的JavaScript的解释器和不同的主机环境中运行。使用兼容CommonJS的系统,你可以用JavaScript写出以下应用:
  • 服务器端的JavaScript应用
  • 命令行工具
  • 桌面的图形化界面应用
  • 混合应用(Titanium, Adobe AIR)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics