Modular(the Seajs)
just touching the children's shoes may be a lot of confusion, analogy: What is a module? The purpose of the module is to do what? And then I thought, how did Madeleine achieve modularity?
Do not worry, bloggers are carrying these three questions to write this article.
One, what is modularity?
in the front-end development field, a module can be a JS module, or it can be a CSS module, or Template and other modules. In Sea.js, we focus on the JS module (other types of modules can be converted to JS modules):The module is a piece of JavaScript code with a unified basic writing format. Between the modules through the basic interaction rules, can refer to each other, work together (how to write and the interaction rules is the SEAJS of the CMD specification, I will put in the third question together summary).
Two, what is the purpose of modularity?
Objective: The goal of Modularization is to support large-scale program development, to deal with the assembly of decentralized code, and to make the code run correctly, even if it contains the modular code that the author does not expect to appear, and can be executed correctly.
Three, how to achieve modularity?
It would have been a long, long time ago. All right! From the COMMONJS, click here, this blog is very good to say. Write it tomorrow.
The Seajs of Modularization