Android Architecture Blueprints

Android Architecture Blueprints

https://github.com/googlesamples/android-architecture

The Android framework provides a lot of flexibility in deciding how to organize and architect an Android app. While this freedom is very valuable, it can also lead to apps with large classes, inconsistent naming schemes, as well as mismatching or missing architectures. These types of issues can make testing, maintaining and extending your apps difficult.

The Android Architecture Blueprints project demonstrates strategies to help solve or avoid these common problems. This project implements the same app using different architectural concepts and tools.

You can use the samples in this project as a learning reference, or as a starting point for creating your own apps. The focus of this project is on demonstrating how to structure your code, design your architecture, and the eventual impact of adopting these patterns on testing and maintaining your app. You can use the techniques demonstrated here in many different ways to build apps. Your own particular priorities will impact how you implement the concepts in these projects, so you should not consider these samples to be canonical examples. To ensure the focus is kept on the aims described above, the app uses a simple UI.

요즘 부서에서 Android MVP 가 핫한 이슈가 되어 Android Architecture Blueprints 를 들여다 보게 되었습니다.

Stable samples – Java

SampleDescription
todo‑mvpDemonstrates a basic Model‑View‑Presenter (MVP) architecture and provides a foundation on which the other samples are built. This sample also acts as a reference point for comparing and contrasting the other samples in this project.
todo‑mvp‑cleanUses concepts from Clean Architecture.
todo‑mvp‑daggerUses Dagger 2 to add support for dependency injection.
todo‑mvp‑rxjavaUses RxJava 2 to implement concurrency, and abstract the data layer.
todo‑mvvm‑databindingBased on the todo-databinding sample, this version incorporates the Model‑View‑ViewModelpattern.
todo‑mvvm‑liveUses ViewModels and LiveData from Architecture Components and the Data Binding library with an MVVM architecture.

todo-mvp

제일 먼저 todo-mvp 를 들여다 보았습니다.
Basic Model-View-Presenter architecture 라고 하는데 이게 좋은 architecture 인지는 잘 모르겠습니다.
구조에 맞게 분리는 해놓았습니다만, 동작 흐름을 살펴보면 View (Fragment) 를 통해서 Presenter 가 동작하고, Presenter 는 내부에서 View 를 조작하고.. 이렇게 View 와 Presenter 간에 순환하는 방식 같습니다.

https://medium.com/upday-devs/android-architecture-patterns-part-2-model-view-presenter-8a6faaae14a5

위의 글에는 MVP 에 대해 잘 설명되어 있습니다만, 개인적으로는 Android 에서 MVP 가 잘 맞는지 의문입니다. 아직 답은 찾지 못했습니다.

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 /  변경 )

%s에 연결하는 중

%d 블로거가 이것을 좋아합니다: