Modularization by
Feature
app
dashboard profile
core
All possible targets can be made
available by adding the
dependency.
newsfeed
Slide 28
Slide 28 text
Modularization by
Feature… with
Dynamic Delivery
app
dashboard profile
core
Sometimes the newsfeed module is
there, sometimes it’s not.
newsfeed
Slide 29
Slide 29 text
Detour: Dynamic
Features
app
dashboard profile
core
Google introduced Dynamic
Features to further modularize app
delivery.
Next step after App Bundles.
Reverses the module-dependency.
newsfeed
(injecting functionality)
Slide 30
Slide 30 text
Detour: Dynamic
Features
app
dashboard profile
core
App has no compile-time
dependency on newsfeed.
App (or base) doesn’t know about
Android components.
newsfeed
(injecting functionality)
Slide 31
Slide 31 text
Multi-Activity and
Intent
Now requires a String instead of
the class name.
Slide 32
Slide 32 text
Fragment
Transactions
Now require reflection to create
the Fragment instead of a simple
constructor or method call.
Slide 33
Slide 33 text
Modularization + Deep Linking
Slide 34
Slide 34 text
Modularization:
The tough part with
dynamic features
Dynamic features are/can be added at
runtime.
Requires a dynamic navigation.
Implementation details might be
unknown.
app
dashboard profile
core
newsfeed
?
?
Slide 35
Slide 35 text
Modularization:
The tough part with
dynamic features
We could use fully qualified class names
and create Intents, but that introduces
tight coupling between otherwise
independent dynamic features.
app
dashboard profile
core
newsfeed
?
Slide 36
Slide 36 text
Modularization:
The tough part with
dynamic features
Fully qualified class names as Strings…
just doesn’t feel right.
dashboard
newsfeed
Slide 37
Slide 37 text
Deep Linking
Implementation independent.
Descriptive.
Slide 38
Slide 38 text
Modularization:
The tough part with
dynamic features
Deep Linking through via Intents as a
decoupled navigation pattern.
Good for a decoupled scenario.
app
dashboard profile
core
newsfeed
intent: myapp://newsfeed/article/123
Slide 39
Slide 39 text
Modularization:
The tough part with
dynamic features
AndroidManifest is still merged.
Intent-Filters are alive in dynamic
features.
Flexible and dynamic.
app
dashboard profile
core
newsfeed
intent: myapp://newsfeed/article/123
intent-filter: myapp://newsfeed/{type}/{id}
Slide 40
Slide 40 text
Modularization:
The tough part with
dynamic features
AndroidManifest is still merged.
Intent-Filters are alive in dynamic
features.
Flexible and dynamic.
app
dashboard profile
core
newsfeed
intent: myapp://newsfeed/article/123
Slide 41
Slide 41 text
What’s next?
Slide 42
Slide 42 text
Modularization is
hard.
Take a look at other approaches.
Navigation in Modular Applications with Deep Linking
- https://blog.usejournal.com/navigation-in-modular-applicatio
ns-with-deep-linking-6a599c11e487
Patterns for accessing code from dynamic feature
modules
- https://medium.com/androiddevelopers/patterns-for-accessi
ng-code-from-dynamic-feature-modules-7e5dca6f9123
Plaid
- https://github.com/android/plaid
airbnb Deeplink Dispatcher
- https://github.com/airbnb/DeepLinkDispatch
AndroidX Navigation
- https://developer.android.com/guide/navigation/
Slide 43
Slide 43 text
Thank You
Onefootball @damian2048 damian-burke
(we’re hiring)