当前位置:网站首页>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
边栏推荐
- Leetcode face T10 (1-9) array, ByteDance interview sharing
- Vsocde has cli every time it is opened js
- How to run oddish successfully from 0?
- Summary of some experiences in the process of R & D platform splitting
- Start from scratch - Web Host - 01
- Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved
- leetcode2311. 小于等于 K 的最长二进制子序列(中等,周赛)
- leetcode2305. Fair distribution of biscuits (medium, weekly, shaped pressure DP)
- Comparative analysis of MVC, MVP and MVVM, source code analysis
- 2022安全员-C证考试题及模拟考试
猜你喜欢
WebGPU(一):基本概念
Comparative analysis of MVC, MVP and MVVM, source code analysis
【OpenCV】-5种图像滤波的综合示例
Pat a-1165 block reversing (25 points)
[learn C and fly] 3day Chapter 2 program in C language (exercise 2.3 calculate piecewise functions)
A quick understanding of digital electricity
JPM 2021 most popular paper released (with download)
[liuyubobobo play with leetcode algorithm interview] [00] Course Overview
[question] - why is optical flow not good for static scenes
CoordinatorLayout + TabLayout + ViewPager2(里面再嵌套一个RecyclerView),RecyclerView的滑动冲突解决
随机推荐
【带你学c带你飞】1day 第2章 (练习2.2 求华氏温度 100°F 对应的摄氏温度
Sword finger offer 47 Maximum value of gifts
超图iServer rest服务之feature查询
Logging only errors to the console Set system property ‘log4j2. debug‘ to sh
Vsocde has cli every time it is opened js
[learn C and fly] 2day Chapter 8 pointer (practice 8.1 password unlocking)
es面试题
What is the principle of bone conduction earphones and who is suitable for bone conduction earphones
Start from scratch - Web Host - 01
[deep learning] Infomap face clustering facecluster
flutter 中间一个元素,最右边一个元素
JS slow animation
Feature query of hypergraph iserver rest Service
Infix expression to suffix expression (computer) code
剑指 Offer 31. 栈的压入、弹出序列
The basic steps of using information theory to deal with scientific problems are
Software development life cycle -- waterfall model
花一个星期时间呕心沥血整理出高频软件测试/自动化测试面试题和答案
Leetcode face T10 (1-9) array, ByteDance interview sharing
Es interview questions