https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

03/30/2020, 6:32 PM
When you modularize, and you need some shared code in each feature module
o

Orhan Tozan

03/30/2020, 7:19 PM
We actually don't seperate code per feature module, but per type: domain module, repositories module, datasources module, viewmodels module
u

ursus

03/30/2020, 7:43 PM
Well thats different, btw imo I dont think that scales and is incorrect
t

tschuchort

03/30/2020, 8:35 PM
@Orhan Tozan that sounds really awful to work with
o

Orhan Tozan

03/30/2020, 8:37 PM
Well, you can't do multiplatform single feature modules
Some parts you need to share, some don't
It doesn't make sense to put the chat model and the chat repository in the chatting feature, because there is a big chance another feature might also need to know of the chat model and maybe even chat repository
so you will be constantly moving files then, giving the sign that it is unscalable
That's how most clean architecture projects are set up too
u

ursus

03/30/2020, 8:49 PM
and theyre wrong, your not gaing much, sure you need shared modules, but imagine twitter & periscope, you cannot just share "domain" because it contains twitter specific etc
🤣 1
you can only share entire layers
o

Orhan Tozan

03/30/2020, 9:15 PM
They can, imagine a server-client setup. The server and client use the same domain.
u

ursus

03/30/2020, 9:27 PM
sure, but if youll have something client specific, then youre screwed
otherwise if it were features, or a module of feature modules.. etc, composition
o

Orhan Tozan

03/30/2020, 9:44 PM
Client is not screwed, if client has specific models, he will use that as is own layer on top of the domain layer. composition indeed
u

ursus

03/31/2020, 12:21 PM
then its not what you described, or I undestood but okay
t

tschuchort

03/31/2020, 3:59 PM
Modularizing by layer is an anti-patterm that everyone else moved past 10 years ago, except for Android developers who still cling to it. If your app and consequently the team that works on it gets large enough then you need to split the large team into independent smaller teams or the organizational overhead will kill you. You can split either by technology (what people used to do) or by domain area. If you split by technology then every feature that has to be developed needs to be communicated across many team boundaries: frontend, Backend, mobile, UX, ops. Once again, you will drown in overhead. Which is why everyone has adopted the domain-driven way of vertically integrated teams. The code base has to reflect the organizational structure to enable independent teams, which means vertically integrated feature modules.
o

Orhan Tozan

03/31/2020, 5:21 PM
I think you are talking about a different thing
d

dewildte

04/01/2020, 12:59 PM
Are you modularising out principle or do you have empirical data that says its it best way to go for the application?
The costs to modularise is very high in Android thanks to how navigation works.
u

ursus

04/02/2020, 8:55 PM
@dewildte not really, same as any cross module communication, just put it on common module (or root/base and fck it)
2 Views