java - node.js关于模块的问题
PHP中文网
PHP中文网 2017-04-17 17:46:22
0
2
341

作为一个从java转过来的码农来说,我想知道node.js对于各种模块应该也有类似于java那种类的api吧!可是我却找不到,还有我想知道java的类和node.js的模块有什么区别?有什么相同点和不同点?

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
迷茫

It just so happens that I also worked in Java before (although I haven’t used it deeply, but I can talk about it and understand it)

Java platform includes:

  1. Java Programming Language

  2. Java Class file format

  3. Java Application Programming Interface (API)

  4. Virtual Machine (HotSpot, etc.)

Corresponds to the node platform:

  1. ECMAScript

  2. (none)

  3. node platform API

  4. Javascript Engine (V8)

Comparison of other concepts:

  • Java package - node module

  • Java maven - node npm

  • Java class - ES6 Class (ES5 simulation class)

迷茫

The two APIs are not at the same level and are not comparable.

  • JDK’s built-in API has thousands of classes

  • The built-in API of nodejs only has dozens of classes and functions.

nodejs only provides the most basic API, most functions require third-party libraries to implement

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template