preface
Now we have implemented modular development, the introduction of a module, that is, the introduction of a file can be used globally, in the process of project writing, we can not write all the files into a file, so the file split
What is modularity
- The code or file is packaged into a module according to certain rules, and modules are independent of each other
- The internal data and methods of each module are private, allowing only exposed data that is intended to be used externally
What problem was solved
- Improved code reuse, better maintenance
- It can be loaded on demand and each module is independent
- Avoid space mutual pollution, naming conflict, the formation of isolation