"Turn" an Android project to fix all the mainstream architectures-1. Project Introduction and basic MVC architecture examples

Source: Internet
Author: User

Http://www.jianshu.com/p/798536fb91c5

Project inspired by similar framework projects from Google
Https://github.com/googlesamples/android-architecture

Then found a self-practiced hand app made a more simple and understandable version of the same kind of project, opened a Super big pit ~
Https://github.com/boredream/DesignResCollection

Welcome to the Star project and follow me, the project will continue to update!!!

Designrescollection

Provide different architectures for the same app, compare and analyze them, and make it easy for you to choose

Why do you want to do such a project

The Android framework is developed using the MVC model, where the activity often takes on a lot of V and C work, both for logic and for handling the UI.
As a result, it is easy to assemble a lot of code in the activity, resulting in complex structure, difficult to test maintenance and many other inconveniences.

This project is designed to help solve this problem. It will provide an identical application and then implement it using a different framework.

You can use the sample code in this project as a reference, or continue to develop your project directly on top of the project's shelves.
In this project, the main focus is on the structural framework, testing and maintainability of the code.
However, it is important to note that there are different architectures, each with their own pros and cons. Therefore, select the corresponding frame structure according to your own needs.
For example, you're just a simple app that doesn't require unit testing and has less functional UI, which is the direct MVC structure.

code example [ongoing development ...]

Displays an application designrescollection of the resources collected in the design site, with different structures corresponding to [_ struct suffixes].
The basic MVP structure, for example, is DESIGNRESCOLLECTION_MVP. See the README.MD in the corresponding folder for a detailed description of the different structures

Example of a completed development
    • DESIGNRESCOLLECTION_MVC/-Model-view-controller structure.
Examples to be developed
    • designrescollection_mvp/-Model-view-presenter structure.
    • designrescollection_mvp-dagger2/-Adds a Dagger2 framework based on the model-view-presenter structure.
Other relevant examples
    • Designrescollection (ing ... -Complete app code, constantly enriched and perfected, to achieve a final full version. The examples in this project are based on this project and are streamlined on the page to demonstrate different code structures.
    • Designcollectioncloudengine-A cloud code project deployed on Leancloud that is used to save timed crawl data to Leancloud to provide data sources for your app.
Development plan

2016.8.17~
designrescollection_mvp/-Model-view-presenter structure.

Universal Dependency Framework
    • Using Leancloud as a backend service is relatively straightforward and does not require self-development.
    • Use Leancloud's Restful-api interface. (Not Leancloud Android SDK, more close to the actual development with the development of interface documentation scenarios)
    • The Network Framework section uses Retrofit2.0 + RxJava.
    • Pictures using Glide.
    • The Code Helper Model Common tool classes, functions, etc. are encapsulated in this dependent model, one for convenience, and the other to focus more on the project framework structure.
What kind of framework is used in my own app?

There is a readme in each framework example, so you can look at each of these features first.
The final project will also compare the advantages and disadvantages of all the frameworks listed, so that you can make a comprehensive comparison according to their specific situation.

Application
Device-2016-08-17-142555.png
Device-2016-08-17-142654.png
Device-2016-08-17-142712.png
Device-2016-08-17-142739.png use

Download from GitHub ~ Unzip the folder to the frame project

"Turn" an Android project to fix all the mainstream architectures-1. Project Introduction and basic MVC architecture examples

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.