Teamwork / android-clean-architecture

Showcasing a Clean Architecture approach from our Android applications framework!
https://developer.teamwork.com/
Other
162 stars 16 forks source link

Domain And Data layers for each feature. #10

Open Roshaanf opened 4 years ago

Roshaanf commented 4 years ago

Why there are not Business and Data modules for each feature? For instance if I want to remove any feature from the app or I want to implement dynamic features. I have to go in Business(God Business) to remove that feature specific classes same goes for Data module and if I don't remove those classes then unnecessary code will remain part of my apk. Also if I change something in Business module for only feature1 the whole Business module will require rebuild.

marcosalis commented 4 years ago

Hi, thank you for your comment! It is indeed an important issue on large projects, and one we've discussed internally. However, the scope of the "Clean architecture" example is primarily to showcase our approach in terms of layers ("vertical" splitting). We currently use a very formal and structured package separation policy to make sure a future refactoring will easily allow us to further split the codebase horizontally (and improve build speed in the process). We have discussed ways to achieve that, and still retain the layers separation for each feature. It involves having to find a clever way to manage Gradle configurations for many modules, a good naming convention and (possibly) a Studio template that allows us to create a set of feature modules without too much manual intervention. I can't give you an estimate, but when that happens we'll try to show an example on this repository.