A comparison of MVC, MVP, and MVVM patterns

Source: Internet
Author: User

Preface description

In the actual combat project and study to summarize the Android Terminal Project framework

Includes MVC, MVP, MVVM, primarily for mobile Android

Directory

1. Framework Basics

2. Transverse frame model

3. Vertical structure Process

4. Code examples

1. Framework Basics

MVC Architecture

Basic notes:

1.model model, responsible for handling specific business logic

2.view view, responsible for displaying results, generally interacting directly with users

3.controller Controller, responsible for forwarding the view interface request to model processing and returning the results sequentially

Work Flow:

1. User operation in the view interface

2.view interface sends request to controller, controller notifies model processing request

After 3.model processing, the result is returned to the controller, and the controller returns the result to the view interface

4. The view interface is displayed to the user according to the results.

Special Note:

The resulting information for model is required to be returned to the view layer for processing

Communication Description:

View communication Controller,controller communication model; unidirectional communication

View can call controller, controller cannot call view, only return data

A comparison of MVC, MVP, and MVVM patterns

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.