Three frame modes

Source: Internet
Author: User

Complex software needs to have a clear architecture, code code. MVC is one of the most common software frameworks, and then it derives the MVP and MVVM.

One: MVC

M---> View: User interface

V---> Controllers (Controller): Business logic

C---> Model: Data Preservation

Simple communication mode

Interactive mode

More flexible mode (V-C-M-C-V)

The MVC pattern is essentially a structured pattern, and the structural pattern is actually forbidden and relatively fixed compared to the behavior pattern. MVC as a centralized controller

Two: MVP

MVP mode renamed Controller to presenter, while changing the direction of communication

1. The communication between the parts is bidirectional.

2.view is not associated with the model, and is passed through presenter.

3.view is very thin, does not deploy any business logic, presenter is very thick

Three: MVVM

The MVVM pattern renamed presenter to ViewModel, which is basically exactly the same as the MVP model.

The only difference is the two-way binding: The change of view is automatically reflected in the ViewModel, and vice versa. (Auto response vs can communicate)

Add

Frame mode: MVC,MVP,MVVM,MTV, etc.

FRAME: Angular,react,ssh,ssi, etc.

Design mode: Factory mode, policy mode, etc.

Reference from: http://www.ruanyifeng.com/blog/2015/02/mvcmvp_mvvm.html

Three frame modes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.