Lam Pham
Sep 4, 2022

Approach 3 can actually work with Qualifier (Qualifier annotation in dagger/hilt or Qualifier string in Koin).

Thes are really interesting approaches.

However, I think even if it's a simple UseCase, it's not good to use DI to do the logic. DI is about creating objects and handling dependencies, handling the logic is out of DI's scope. You also lose the consistency because some UseCases define themselves, others are defined by DI.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Lam Pham
Lam Pham

Responses (1)

Write a response