当前位置:网站首页>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
边栏推荐
- Pat a-1165 block reversing (25 points)
- 剑指 Offer 42. 连续子数组的最大和
- Calculation (computer) code of suffix expression
- leetcode373. Find and minimum k-pair numbers (medium)
- 【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
- CSDN insertion directory in 1 second
- CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
- Summary of some experiences in the process of R & D platform splitting
- leetcode2312. Selling wood blocks (difficult, weekly race)
- Provincial election + noi Part IV graph theory
猜你喜欢

If you want to rewind the video picture, what simple methods can you use?

golang---锁

LeetCode刷题(十)——顺序刷题46至50

How to batch add background and transition effects to videos?
![[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)](/img/2e/8fe55393ccca6663d98c0b3dd9a146.png)
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)

How to build and use redis environment

Types of exhibition items available in the multimedia interactive exhibition hall

leetcode2310. The one digit number is the sum of integers of K (medium, weekly)

QT实现界面跳转

Pat a-1165 block reversing (25 points)
随机推荐
Logging only errors to the console Set system property ‘log4j2. debug‘ to sh
Iterative unified writing method of binary tree
2022 safety officer-c certificate examination questions and mock examination
【带你学c带你飞】2day 第8章 指针(练习8.1 密码开锁)
How to execute an SQL in MySQL
JPM 2021 most popular paper released (with download)
[learn C and fly] 1day Chapter 2 (exercise 2.2 find the temperature of Fahrenheit corresponding to 100 ° f)
SQL server calculates the daily average and annual average of the whole province
Kibana controls es
flutter 中间一个元素,最右边一个元素
Is bone conduction earphone better than traditional earphones? The sound production principle of bone conduction earphones is popular science
Which kind of sports headphones is easier to use? The most recommended sports headphones
leetcode2309. The best English letters with both upper and lower case (simple, weekly)
leetcode2312. 卖木头块(困难,周赛)
JVM面试篇
Sword finger offer 42 Maximum sum of continuous subarrays
MySQL operates the database through the CMD command line, and the image cannot be found during the real machine debugging of fluent
Sword finger offer 47 Maximum value of gifts
Ar Augmented Reality applicable scenarios
As a software testing engineer, will you choose the bank post? Laolao bank test post