1) View layer: The general use of XML file interface description, the use of the time can be very convenient to introduce, of course, how you learn more about Android, you can think of Android can also use javascript+ HTML and so on as the view layer, of course, there is a need for the communication between Java and JavaScript, fortunately, Android provides a very convenient communication between them implementation.
2) control layer (Controller): The task of Android's control layer usually falls on the shoulders of many acitvity.
3) Model: the operation of the database, the operation of the network, etc. should be processed in the model, of course, business calculations and other operations must be placed in the layer. A logical model can be used for a variety of view models, such as a batch of statistical data you can use a histogram, pie chart to represent.
-----------------------------------------------------------------------
1. The purpose of using MVC is to separate the implementation code for M and v so that the same program can use different representations, whereas C exists to ensure the synchronization of M and V, and once m changes, V should be updated synchronously, which is exactly the same as the Observer pattern in design mode.
2.MVC Benefits: From the user's point of view, users can according to their own needs, choose their own appropriate way to browse the data. For example, for an online document, you can choose to read it as an HTML page, or you can choose to read it in PDF mode. From the developer's point of view, MVC separates the logic layer of the application from the interface, and the biggest benefit is that the interface designer can directly participate in the interface development, the programmer can focus on the logic layer. Rather than as before, designers put all the material in the hands of developers, who implement the interface. In the Eclipes tool, the development of Android in a more simple way, designers in the DroidDraw design interface, in XML storage, in the Eclipes directly open to see the designer interface.
----------------------------------------------------------------------
-model is used to encapsulate data related to the business logic of the application and how to handle the data. "Model" has the power to directly access data, such as access to a database. "Model" does not depend on "View" and "Controller", that is, the model does not care how it will be displayed or how it is manipulated. However, the changes in Model data are generally published through a refresh mechanism. To implement this mechanism, the view that is used to monitor this model must be registered in advance on this model, so that view can understand the changes that have taken place on the data model. (Comparison: Viewer mode (software design mode)).
-Views are able to achieve purposeful display of data (in theory, this is not required). There is generally no logic on the program in View. To implement the Refresh feature on the view, view needs to access the data model it monitors, so it should be registered with the data it is monitoring in advance.
-The controller acts as an organizational function between different levels to control the flow of the application. It handles the event and responds. The "event" includes the user's behavior and changes on the data Model.
MVC in Android