Android官方mvp说明——Android架构蓝图——android Architecture Blueprints

Android框架在定义怎样组织和架构androidapp的时候,提供了很多的灵活性。

这个自由,非常的有价值,可以使得app及时使用了很大的类,可以让命名和架构不会使得测试,维护,和拓展造成困难。

Android Architecture Blueprints 展示了解决常见问题的可能方法。在这个项目中我们使用了不同的概念和工具来构架了同一个应用。


你可以把这些例子看做是参考或者你的app的启发点。这里的重点是代码的结构,架构,测试和维护。然而,要记住,使用这些架构和工具构建app有很多种方法,这取决于你的 优先级,所有这个标准不应该是一个严格的例子。这里UI有意保持简单的样子。


例子

所有的项目都在他们的分支上发布了。阅读项目的README来获取更多的信息。

Samples

All projects are released in their own branch. Check each project's README for more information.

Stable samples

  • todo-mvp/ - Basic Model-View-Presenter architecture.
  • todo-mvp-loaders/ - Based on todo-mvp, fetches data using Loaders.
  • todo-mvp-databinding/ - Based on todo-mvp, uses the Data Binding Library.
  • todo-mvp-clean/ - Based on todo-mvp, uses concepts from Clean Architecture.
  • todo-mvp-dagger/ - Based on todo-mvp, uses Dagger2 for Dependency Injection
  • todo-mvp-contentproviders/ - Based on todo-mvp-loaders, fetches data using Loaders and uses Content Providers

Samples in progress

  • dev-todo-mvp-rxjava/ - Based on todo-mvp, uses RxJava for concurrency and data layer abstraction.

Also, see "New sample" issues for planned samples.

External samples

These are community contributions that may not be in sync with the rest of the branches.

  • todo-mvp-fragmentless/ - Based on todo-mvp, uses Android views instead of Fragments.

What does beta mean?

We're still making decisions that could affect all samples so we're keeping the initial number of variants low before the stable release.

Why a to-do application?

The aim of the app is to be simple enough that it's understood quickly, but complex enough to showcase difficult design decisions and testing scenarios. Check out the app's specification.

Also, a similar project exists to compare JavaScript frameworks, called TodoMVC.

我的app应该选择哪个例子呢?

你因该自己决定:在每一个例子中都有一个README文件,其中有度量以及主观评价。

































你可能感兴趣的:(Android,API,Android)