4

in the case of real large project, i have decided to use clean architecure inside each feature module of my application separately, preventing to have one Giant domain and data layer against too many features. Now , I'm thinking how to do bestEffort for my issue : if some usecases (like accessing UserInfo) may needed by several feature modules , how to prevent duplicating of creating same domain and data class ?

P.S : I myself decided to have shared-modules for domain and data , which present usecases needed by multipke features. but in this way, there is no boundary or some rules that team mates could understand the specefic usecase is available inside shared-moudle.

modules in project :

  • app

  • common

  • features

    -login

        -domain
    
    
        -data
    
    
        -ui
    

    -charge

        -domain
    
    
        -data
    
        -ui
    

...

HAMED
  • 353
  • 4
  • 13

1 Answers1

1

For erveryone reading this ,I decided to package my these common usecases( like everything related to user infomation , such as userinfo ) into another common module named UserModule Which has its own data and domain module without any presentation module. Other modules that may need userInfo can implement this module , so they can have their own clean arch with domain , data , presentation based on their need , or have only the presentation layer

peter
  • 112
  • 1
  • 8
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 23 '22 at 02:23