Learn note from the start of the zero (Day67)--cocoa Touch design mode and application MVC mode

Source: Internet
Author: User

original articles, welcome reprint. Reprint Please specify: Dongsheng's blog  

MVC(Model-view-controller, the Model-View-Controller) mode is one of the very old design patterns that first appeared inSmalltalklanguage. Today, many computer languages and architectures use theMVCmode.

MVC Mode Overview

The MVC pattern is a composite design pattern, "Viewer" (Observer) mode, "policy" (Strategy) mode and "Composition" (Composite) mode and other components. MVCmode is determined by3component, which3the functions of the section are as follows.

  • model

  • view

  • Controller . Receives a user request and updates the model on request. In addition, the controller updates the selected view as a response to the user's request. The controller is the medium of the view and the model, can reduce the coupling degree of the view and the model, make the view and the model's responsibility more clear, thus improves the development efficiency.

      

corresponding to the "content" and "form" in philosophy, In the MVC model, the pattern is "content", which stores the data required by the view, the view is "form", is the external representation, and the controller is their medium.

Cocoatouch in the MVC Mode

we're talking about generic.MVCmode, andCocoaand theCocoa Touchin the frameworkMVCPatterns and traditionalMVCmode is slightly different, the former model and view can not make any communication, all communication is done through the controller,.

in theCocoa Touchframework ofUIKitFramework,Uiviewcontrolleris the root class for all controllers, such asUitableviewcontroller,Uitabbarcontrollerand theUinavigationcontroller. UIViewis the root class for views and controls.

Welcome to follow Dongsheng Sina Weibo@tony_Dongsheng.
Learn about the latest technical articles, books, tutorials and information on the public platform of the smart Jie classroom
?
More ProductsIOS,Cocos, mobile Design course please pay attention to the official website of Chi Jie Classroom:http://www.zhijieketang.com
Smart-Jie Classroom Forum Website:http://51work6.com/forum.php

Learn note from the start of the zero (Day67)--cocoa Touch design mode and application MVC mode

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.