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
    

...

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.