layui's module refers to the asynchronous module loading method based on the internal implementation of layui.js. It does not follow AMD, but defines a set of more lightweight module specifications; and this method has been improved after After a lot of practice, it has become the core module loading engine of layui.
layui is a front-end UI framework written using its own module specifications. It follows the writing and organizational form of native HTML/CSS/JS. The threshold is extremely low. Ready to use.
layui provides a wealth of built-in modules, all of which can be loaded on demand through a modular approach, including: layer, layDate, layPage, laytpl, table, form, upload, element, tree, layeditor, rate , carousel, flow, util, code, etc.
The layui module is based on the asynchronous module loading method implemented internally in layui.js. It does not follow AMD, but defines a set of more lightweight module specifications; and this method has undergone a lot of development After practice, it has become the core module loading engine of layui.
layui is minimalist on the outside, yet full on the inside. It is light in size and rich in components. Every detail from the core code to the API has been carefully crafted, making it very suitable for rapid interface development. layui is compatible with all browsers currently used by humans (except IE6/7), and can be used as a quick development solution for PC-side backend systems and front-end interfaces.
In fact, layui is more oriented to back-end developers, so in terms of organizational form, it resolutely adopts the AMD-like module management method that uses the browser as the host a few years ago, but it is not limited to It has its own pattern that is more lightweight and simpler than CommonJS.
layui is defined as "classic modularity". It does not deliberately emphasize the concept of "module" itself, but intentionally avoids the mainstream solutions of the current JS community and tries to interpret efficiency in the simplest way possible! Its so-called classic lies in its obsession with returning to nature. It organizes modules in a way that is generally recognized by current browsers!
layui believes that this lightweight organization method can still fill many scenarios other than WebPack. Therefore, it insists on using classic modularity, which allows people to avoid the complex configuration of tools and return to the original HTML/CSS/JavaScript itself!
But layui is not a module loader like RequireJS, but a UI solution. The difference from BootStrap is that layui combines its own understanding of classic modularization.
For more technical articles related to Layui, please visit: Layui Framework Tutorial!
The above is the detailed content of What does layui's module mean?. For more information, please follow other related articles on the PHP Chinese website!