Home > front end > Exploration can be developed independently and lateral extension of the front-end modular solution
Exploration can be developed independently and lateral extension of the front-end modular solution
Time:12-12
about the front-end modular - when it comes to the front modular, you can think of is the CMD, amd, umd front-end modular standard, these belong to file level of modularization ; - or you will think of component encapsulation, NPM packet encapsulation and so on, these are component level of modularization ; - or you can think of to divide the page into many independent blocks, each block is a module, these are view level of modularization ; - today to explore yes business function level front modular ,
Business function level front-end module in the background familiar developers eyes, we usually say "user module", "order module", "comments module" is from the business functions such as Angle of view to divide, as the function of the front end bearing more and more thick, it's not just simple rendering a view, it often contains a lot of business logic and state, so more and more in the front end of the project have appeared in the model, the controller, the concepts of states, if the front stays at a file, modular component level, then the whole project will become difficult to maintain and expand, Business module should be a high cohesion and low coupling of the overall package
See a lot of popular front-end engineering structure, tend to be like this:
As you can see, in the models (store) in this area, or have a functional division in accordance with the business module, but... Is limited to models, from the view, simply a model module what is the point? Such modular complete? Can the independent development? Flexible plug? Can scale out?