Replies: 4 comments 1 reply
-
I think what we have in place right now is a mix of both, sort of. We are doing somewhat feature modules. For example, right now we have We then have an ** optional ** domain/use-case layer that sits between these feature modules and data. Our data layer is also broken up into separate modules: So we are in a way doing a mix of modules broken down by features and by layer. I'm open to all and any suggestions, changes, etc. The purpose of this community-led project is to build something fun and useful, but also serve as a community-built example of good architecture, best practices, and bleeding-edge tech. Originally posted by @crocsandcoffee in #68 (comment) |
Beta Was this translation helpful? Give feedback.
-
Yes, to this mix is what I refer to. The UI modularization looks good to me, it is with the data and domain layers where I'm not so sure about. Originally posted by @lotdrops in #68 (comment) |
Beta Was this translation helpful? Give feedback.
-
Currently the projects is using both as you can read in the guidelines This gives the project the best possible flexibility. Since most of the communication will be shared with all of the modules, it might be useful to keep the data:network shared. But if someone might say, it is better to keep the lower layers inside a feature, feel free to create a draft PR or draw a dependency graph and let's have an open discussion. I'm myself like the shared mix for this project, but I don't have hard feelings about it. |
Beta Was this translation helpful? Give feedback.
-
I think it's a good idea to mix the two types of modularization, especially at the beginning of the project, maybe later we can switch to one or the other if we need it. Based on a script shared by Jake Wharton. I tried to take a picture of the dependency between the project modules: I wonder if the |
Beta Was this translation helpful? Give feedback.
-
Sorry if this was discussed elsewhere, I didn't find it. Are we settled on modularization by layer?
UI needs to be separate from the rest because of KMP, that's for sure. However, I think we could split it by features instead of doing domain/data.
As I understand architecture, we want modules with high cohesion and with low coupling. If we split by layer I think we do not achieve those goals. Also, modularization by feature mimics how we'd split by "teams".
Also, I think it used to be common to modularize by layer but now I believe it is mostly done by feature. For example, it is shown in the android architecture page. Fernando Cejas made it popular, but then changed his mind about this because of feedback from the community.
I usually follow an approach similar to this. For small/medium apps I don't split features in api/impl, and my module-injector is inside of app.
Originally posted by @lotdrops in #68 (comment)
Beta Was this translation helpful? Give feedback.
All reactions