This video is causing some controversy on Twitter, and a just wanted to clarify some aspects.
My position regarding Dagger is clear (at least to me): I don't think is dead. The thumbnail was what I thought it was a fun and catchy idea that was then explained in the title and content.
Dagger is a pure dependency injector, as opposed to Koin, which follows more the idea of a service locator. The difference is simple: on the first, the library provides the dependencies automatically, while on the second you go get them explicitly.
This has its pros and cons. The main cons I see for Dagger, which prevents lots of not so experienced developers from using it, is that Dagger is quite complex to understand and that the configuration is quite tricky. Also, you can do the same thing in many different ways, so it's hard to know which one is the good one.
On the other hand, Koin is pretty straightforward and easy to understand and start using it. I prefer devs using Koin rather than not using any dependency provider at all.
For big projects, you may reach to a point where the boilerplate that the service locator requires is a bit bigger than the one required by Dagger. But in practice, to me it's difficult to see when that point is reached.
But anyway, as a summary, there are two approaches to attack the same problem. You can choose the one you prefer and, if you manage to understand how they work, you probably won't regret having chosen any of those.
But if you're too lost with dependency provisioning and want to start with something simple, I would go for Koin first, and then you can jump to Dagger.
Antonio Leiva - Android & Kotlin Development
This video is causing some controversy on Twitter, and a just wanted to clarify some aspects.
My position regarding Dagger is clear (at least to me): I don't think is dead. The thumbnail was what I thought it was a fun and catchy idea that was then explained in the title and content.
Dagger is a pure dependency injector, as opposed to Koin, which follows more the idea of a service locator. The difference is simple: on the first, the library provides the dependencies automatically, while on the second you go get them explicitly.
This has its pros and cons. The main cons I see for Dagger, which prevents lots of not so experienced developers from using it, is that Dagger is quite complex to understand and that the configuration is quite tricky. Also, you can do the same thing in many different ways, so it's hard to know which one is the good one.
On the other hand, Koin is pretty straightforward and easy to understand and start using it. I prefer devs using Koin rather than not using any dependency provider at all.
For big projects, you may reach to a point where the boilerplate that the service locator requires is a bit bigger than the one required by Dagger. But in practice, to me it's difficult to see when that point is reached.
But anyway, as a summary, there are two approaches to attack the same problem. You can choose the one you prefer and, if you manage to understand how they work, you probably won't regret having chosen any of those.
But if you're too lost with dependency provisioning and want to start with something simple, I would go for Koin first, and then you can jump to Dagger.
And that's it! Hope it's now more clear.
6 years ago | [YT] | 0