MVC Design Patterns in Android development

Source: Internet
Author: User

An understanding of MVC design patterns in Android development

1. Layered Understanding in Android:
(1). In the development of Android software, the developers of the application are mainly using the Android application framework layer packaged API for rapid development.
(2). In the Android framework of the four levels, the lower layer for the upper level of service, the upper layer requires lower support, the upper layer needs to call the lower service.
(3). This layered approach brings great stability, flexibility and scalability, allowing developers of different tiers to focus on specific layers of development in accordance with specifications.
(4). Android's official recommendation application is developed using MVC design patterns.
2. The understanding of MVC in Android:
(1). View layer: The general use of XML file interface description, when used 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 control layer usually falls on the shoulders of many acitvity, this phrase also implies do not write code in acitivity, to through activity delivery model business Logic layer processing, Another reason for this is that the response time of Acitivity in Android is 5s, and if time-consuming operations are put here, the program is easily recycled.
(3). Model: The operation of the database, the operation of the network, etc. should be processed in the model, of course, business computing and other operations must be placed on the layer. The general overview of
is as follows:
model is the processing, operation, access to the data.
View is the data that is displayed. The
activity plays an organizational role in the middle.

MVC Design Patterns in Android development

Related Article

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.