2

I have been doing android dev for quite a time now and have started to understand/appreciate a few things that I previously hated (Like Kotlin) . so am not sure where would be my stance regarding this rant in upcoming months, but FUCK DEPENDENCY INJECTION FRAMEWORKS!!

dependency injection is rightly said to be a $25 term for a 25 cents concept. If i start refactoring my old apps today to "follow DI principles", they would require just 5-10% refactoring and i will end up with much more testable code.

But integrating dagger in my apps? Oh please fuck me straight instead. That thing is so overly complicated and confusing. Why would you trust compiler to inject instances in YOUR LOGIC ? it was YOUR LOGIC that guided the compiler, remember?
I am yet to work on a product of scale where frameworks like dagger or koin made even a slightest of sense.
Currently it just feels like another bad choice we took between "simple but verbose" and "complicated but pretty to look at"

The way this framework makes me think like a compiler than a programmer somehow reminds me of this beautiful article i read:
https://theatlantic.com/technology/...

Comments
  • 0
    Would have never expect something like an injection framework to exist.

    Dependency injection is like security - if the code isn't build with it in mind, you can't just get dependency injection working by burying it under more code.
    But if you refactor the code anyways - what does the framework do?
  • 0
    @Oktokolo by refactoring , i meant if i have to just include the concepts of DI in my already deployed app. that would just require shifting a few things to caller classes and would count to 5-10% of changes and 2-3 hours of work.

    But this framework is a mamoth, providing all different ways for injecting different types of dependencies : the one which whose constructor is accessible to us, the one who constructor isn't accessible to us, the dependencies which are instances of interfaces, using factory vs using builder for providing dependency... it has a lot of stuff.

    well maybe its good in the long run, but its learning curve is steep and it complicates a lot of stuff
  • 0
    Well, Autodesk is known to get stuck in the past....
    If Linux licences is less then 10% is even surprising they have a Linux version...
Add Comment