Standup timer MVC mode and Project Structure Analysis
Source: Internet
Author: User
Preface I have been studying Android for a while. In order to further understand how Android applications are designed and developed, I decided to study several open-source Android applications in detail. From some open-source applications to absorb something, while accumulating the amount, while exploring Android learning and research directions. Here, I first selected the jwood standup timer project. Standup timer's project structure, project structure division, and analysis of various design patterns are not good, so how to write this blog post makes me quite a headache. I also decided to introduce the responsibilities of each package from the perspective of the project structure, and further understand the benefits of Project Division based on the MVC concept. In the SRC folder, the net. johnpwood. Android. standuptimer package corresponds to the Controller in MVC, which contains all the activities in the project. Net. johnpwood. Android. standuptimer. Dao is the data persistence layer responsible for data storage and access. Net. johnpwood. Android. standuptimer. model corresponds to the M model in MVC to process the vast majority of businesses (in standup timer, it may not be reflected because the project is small ). Net. johnpwood. Android. standuptimer. utils is a toolkit. In addition, the res folder corresponds to the view in MVC mode. About. Java and help. Java are activity classes used to demonstrate project information and help. They do not have complex business logic. In fact, about and help are displayed in configurestanduptimer by selecting a directory. When configurestanduptimer accepts the user's input request, configurestanduptimer. the Java controller transfers the request to about. java controller for processing, and finally about. java will decide to select the view to respond to the user's request. Here is about. XML. Configurestanduptimer is the initial activtiy of the project. It calls the main. the configuration of some pre-meeting Information received by XML (such as participants, teams, and meeting time), processing and verifying the legality of user input data, then decide which model to call or hand it over to another controller. Meetingdetails is used to display the meeting details. It calls the meeting_details.xml view to interact with the user and forwards the request to the meeting in the model to process specific services. Prefs is a preferenceactivity that is responsible for system configuration. Standuptimer is the business core of the project and controls the process of the meeting through countdown. Use timer. XML to interact with users. The team is responsible for specific business processing (mostly data storage access ). Teamdetails records all the meetings and meeting statistics of the team. Team_details.xml is responsible for interacting with users. Its main business is handled by team. Java and meetingstats. java. Teamlist: A list of teams. Teams. xml interacts with users and calls the team to process core businesses (select all team names from the database ). Project Structure series Index
Android open-source project-standuptimer learning notes Index
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.