diff --git a/docs/ModularizationLearningJourney.md b/docs/ModularizationLearningJourney.md index 01e9b8750..b4933162c 100644 --- a/docs/ModularizationLearningJourney.md +++ b/docs/ModularizationLearningJourney.md @@ -78,7 +78,7 @@ how you can organize your project. In general, you should strive for low couplin * **High cohesion** - A module should comprise a collection of code that acts as a system. It should have clearly defined responsibilities and stay within boundaries of certain domain knowledge. For example, - the [`core-network` module](https://github.com/android/nowinandroid/tree/main/core-network) in Now + the [`core:network` module](https://github.com/android/nowinandroid/tree/main/core/network) in Now in Android is responsible for making network requests, handling responses from a remote data source, and supplying data to other modules. @@ -98,14 +98,14 @@ The Now in Android app contains the following types of modules: through `NiaTopLevelNavigation`. The `app` module depends on all `feature` modules and required `core` modules. -* `feature-` modules - feature specific modules which are scoped to handle a single responsibility +* `feature:` modules - feature specific modules which are scoped to handle a single responsibility in the app. These modules can be reused by any app, including test or other flavoured apps, when needed, while still keeping it separated and isolated. If a class is needed only by one `feature` module, it should remain within that module. If not, it should be extracted into an appropriate `core` module. A `feature` module should have no dependencies on other feature modules. They only depend on the `core` modules that they require. -* `core-` modules - common library modules containing auxiliary code and specific dependencies that +* `core:` modules - common library modules containing auxiliary code and specific dependencies that need to be shared between other modules in the app. These modules can depend on other core modules, but they shouldn’t depend on feature nor app modules. @@ -136,15 +136,15 @@ Using the above modularization strategy, the Now in Android app has the followin
feature-1,
feature-2
feature:1,
feature:2
feature-author
displays information about an author on the AuthorScreen.feature-foryou
which displays the user's news feed, and onboarding during first run, on the For You screen.feature:author
displays information about an author on the AuthorScreen.feature:foryou
which displays the user's news feed, and onboarding during first run, on the For You screen.AuthorScreen
core-data
+ core:data
core-ui
+ core:ui
core-common
+ core:common
core-network
+ core:network
core-testing
+ core:testing
core-datastore
+ core:datastore
core-database
+ core:database
core-model
+ core:model
core-navigation
+ core:navigation