Skip to content
9miao edited this page Sep 4, 2014 · 1 revision

CrossApp MVC Mode

MVC Design Mode Brief Intro

MVC mode does not have a very definite concept, so the design may vary in different development environment.

Object-oriented goal is to design program with low coupling and high cohesion feature, and MVC mode provides us an excellent solution. CrossApp is MVC mode based, here the MVC capital letter respectively represent: model layer (Model), view layer (View) and controller layer (Controller), these three layers perform their duties and maintain a complete application together.

In CrossApp, Model layer refers to all kinds of data prototype, business logic and algorithm; View layer, just as the name suggests, is to display UI interface to users; Controller layer is responsible for linking up Model and View layer that have less correlation. With CAView and rich UI controls, CrossApp could realize the View layer function, and finish Controller layer and realize the communication between Model and View through CAViewController and its child class.

View layer and Model layer generally are unable to communicate with each other. View layer is used to receive users’ operations and inform them to Controller which will update Model layer after it receives information. Similarly, Model layer will inform Controller after its data changes, and Controller will prompt View layer to update interface.

Clone this wiki locally