android10/Android-CleanArchitecture

Refactor project structure to one single module?

Open

#112 建立於 2016年2月15日

在 GitHub 查看
 (31 留言) (0 反應) (0 負責人)Java (3,329 fork)batch import
WIPdiscussionhelp wanted

倉庫指標

Star
 (15,449 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi guys, as you can see I have been working on a single module project structure. Here is the PR: https://github.com/android10/Android-CleanArchitecture/pull/103

I'm not saying that I will land it but I do want to start a discussion around it and see pros and cons for either a single module project or multi module project.

The first couple of things that came to my mind:

Advantages:

  • Scalability: package organization into features so working with a feature team model will fit better, specially when the number of contributors to the codebase is big.
  • Scope: favors exposure to only necessary members (removes many public methods from feature specific classes).
  • Build System: less overhead since building logic sits on only one project and we do not have to maintain many build.gradle files for each project (better performance?).

Drawbacks:

  • Clarity: by having 3 modules, each layer responsibility is very clear.
  • Dependency with the framework: By having only one android module we are exposed to make mistakes and break both dependency rule and dependency on android/java framework.

A few extra eyes are very appreciated, so let's try to find the best way to keep on improving this codebase.

@spirosoik @Trikke @caseykulm I mention you guys since have been collaborating a lot. Thanks! Feel free to involve anyone here :smiley:

貢獻者指南