46
Views
3
Comments
One application but there are 2 or 3 modules
Question

Dear all Please refer

I want to make an application, but in that space I want to create a lot of application modules too, so that one apk or IPA when it is built. like the image below for the design I want. please directions how the architecture


Rank: #95

Hello Hothorasman,

Hope you're doing well.

What you can do in this scenario is:

  • Maintain all of your screens and navigation logic in your Main Module. This module will be in your Main application (let's call it like this) and that's the one that you will use to build your APK / IPA.
  • Each of these screens will have one Block (or more) inside of it.
  • The navigation logic is strictly handled by your Main Module in order to avoid cyclic dependencies and can be triggered (for example) by events from these blocks.
  • The blocks inside of the screens will contain all of the functionalities and screen logic and they will be added as a dependency in your Main Module. They will basically work as your screen, but they are created as blocks and you just need to create the wrapper (pages) in your Main Module. That's why you have to build them as blocks, so you can reference and use them after. These blocks can be from another module / application.


Following your example:

  • Modules ABC, BBC and CCD have blocks that contain all of the screen logic and work as screens. But you create them as blocks.
  • Back to your your main module, you will have the screens and respective pages, calling these created blocks from modules ABC, BBC and CCD and handling all of the navigation logic. You can trigger events from the blocks and handle the navigation back to your main module in order to avoid cyclic dependencies.
  • This will allow you to have 1 main module calling several functionalities from another modules / applications.


Hope that this helps you!


Kind regards,

Rui Barradas

Rank: #95

Hello Hothorasman,

Did you manage to solve your issue?

Let me know your conclusions :)


Kind regards,

Rui Barradas

Dear Rui Barradas

Thank you for the information, for now I will first analyze the impact when there is an enhancement in an application that is different from the concept you are giving.