当前位置:网站首页>MVVM and MVC
MVVM and MVC
2022-07-02 02:30:00 【Mo Xiong】
One 、 In the early mvc
Early pages usually consist of multiple PHP,jsp Document composition , This kind of code is difficult to maintain , So it extends mvc Development patterns and frameworks , The front-end presentation is in the form of a template , Typical frameworks such as spring etc. , This division structure has clear responsibilities , Code is easy to maintain , But here it is. mvc Limited to the back end , There's a certain separation between the front and rear ends , The front end has only completed the development view layer
shortcoming
1 The efficiency of front-end page development is not high
2 Unclear front and rear responsibilities
Two 、 front end mvc
With ajax The development of , The front end has been further developed , The front-end class libraries have also begun to develop, the most famous of which is jq, So the front end mvc With it
Similar to the back end , have view,controller,model,mvc The pattern is a single binding , namely model Bound to the view, When we use js Code update model when ,view It will automatically update
model Responsible for data storage , Synchronize with back-end data
controller Responsible for business logic , According to the user behavior model Data modification
view Responsible for view display , take model Visualize the data in
shortcoming : Forced layering , A small function must go through such a process , Not flexible
3、 ... and 、mvvm Appearance
The three development modes can be said to represent web The process of field development , All to solve the problem of layering , solve model and view The coupling problem of
边栏推荐
- [deep learning] Infomap face clustering facecluster
- How to batch add background and transition effects to videos?
- What style of Bluetooth headset is easy to use? High quality Bluetooth headset ranking
- Deployment practice and problem solving of dash application development environment based on jupyter Lab
- LFM signal denoising, time-frequency analysis, filtering
- OpenCASCADE7.6编译
- leetcode2310. The one digit number is the sum of integers of K (medium, weekly)
- golang---锁
- Cesium dynamic diffusion point effect
- Which brand of sports headset is better? Bluetooth headset suitable for sports
猜你喜欢
leetcode2310. 个位数字为 K 的整数之和(中等,周赛)
Which brand of running headphones is good? How many professional running headphones are recommended
Infix expression to suffix expression (computer) code
Design and implementation of key value storage engine based on LSM tree
[opencv] - comprehensive examples of five image filters
How to solve MySQL master-slave delay problem
How to build and use redis environment
The wave of layoffs in big factories continues, but I, who was born in both non undergraduate schools, turned against the wind and entered Alibaba
[pit] how to understand "parameter fishing"
If you want to rewind the video picture, what simple methods can you use?
随机推荐
2022 low voltage electrician test question simulation test question bank simulation test platform operation
leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)
Calculation (computer) code of suffix expression
Realize the code scanning function of a custom layout
What kind of good and cost-effective Bluetooth sports headset to buy
Sword finger offer 31 Stack push in and pop-up sequence
How to build and use redis environment
Which brand of running headphones is good? How many professional running headphones are recommended
pytest 测试框架
What is the MySQL column to row function
golang---锁
Ar Augmented Reality applicable scenarios
Types of exhibition items available in the multimedia interactive exhibition hall
No programming code technology! Four step easy flower store applet
MySQL constraints and multi table query example analysis
A quick understanding of digital electricity
Vsocde has cli every time it is opened js
Leetcode face T10 (1-9) array, ByteDance interview sharing
SQL server calculates the daily average and annual average of the whole province
leetcode373. Find and minimum k-pair numbers (medium)