2 ms·
Similar to this note: I've done my fair share of using dependency injection frameworks in the Java backend world (e.g. Spring), just to develop a healthy dislik
by isoos 11y ago
Similar to this note: I've done my fair share of using dependency injection frameworks in the Java backend world (e.g. Spring), just to develop a healthy dislike for every DI out there. The magic is nice and good, until it becomes a burden, and a constant question of where certain objects are coming from. It was a pain to see the same design pattern to emerge in the (compiled-to-)JS world, with all of the same problems and complexities.
I wonder if any _good_ pattern had similar lifecycle, winning the minds and then spreading to different domains.
To be fair: I do think DI has value, but I started to prefer explicit over implicit, and most DI stuff is focusing on implicit and magic.
- on_and_off 11y agohave you tried dagger 2 ? I think it makes a good job at dispelling the magic as much as possible.