# android-architecture

K Merle

05/26/2022, 9:34 AM
In multi-modularized project, we have module Feature1 and module Feature2. If Feature1 needs an information from Feature2, what should I expose from Feature2, a data module or domain module?

Jhonatan Sabadi

05/26/2022, 12:14 PM
The perfect worlds, feature 1 should not depends on feature 2, but you can use another module as bridge, like common, datasource e make theses feature modules depends on core modules
👍 1
🙌 4
🙌🏽 1


06/02/2022, 11:22 AM
There is some way to do that: 1. You can move the common code to the core module if these functionalities are needed by a few others feature modules. Core module can be accessible by any feature module 2. You can create a featuer2-api module and expose the public interface in this module. Then use the functionalities from the feaurte1 module by the api module inyterface 3. Use the Adapter pattern inside your main app module to provide functionalities from feature2 to feature1 module. App module can access any feature module.
👍 1

Thanos Psaridis

06/10/2022, 11:13 AM
We use "shared" and "core" modules to address such problems