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