Skip to main content

Posts

Showing posts from September, 2019

Dependency injection — Android DaggerV2— Part1

What dependency injection means? Well, we can break it into two parts: Part1 : Dependency Part2 : Injection Dependency is a general situation that arises , when two classes in your code base are interrelated. Example : FirstClass makes use of SecondClass . We say that FirstClass depends on SecondClass , or alternatively, we can say that SecondClass is the dependency of the FirstClass. The other way to state the same thing is to say that FirstClass is the client while SecondClass is the service. This client-service terminology is very common in software design, that the same class can be a client or a service in different circumstances, and that the client-service definition is not universal. It's contextual. We can only assign client and service roles when we discuss two specific classes in our codebases.So, in order to function clients need references to their services.How do they obtain those references?  W...

Blog authors

My photo
Mouhsin Bour Qaiba
Lead Mobile Developer Android Java/Kotlin