Artemis Artemis - 1 year ago 73
Android Question

What is the good example of using DI (Dagger) in terms of good architecture?

I'm trying to create modular architecture for my Android app and now I'm looking into Dagger DI library. It's really awesome tool, but I don't want to misuse it and currently I have numerous questions like:

  • Should I wrap everything (like Activities or Fragments, or event separate Views) into modules or only common used parts of app (likes services for querying data with login, data layer)?

  • Better use with Android annotations. Android Annotations is another cool library I faced but it seems to play well with UI layer making easy ealing with Views, Fragments and removing some boilerplate code. But how doest it play with Dagger?

If you have a good example of open source project using DI please refer to me. I really want to follow best practices.

Answer Source

Take a look at:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download