memesearch
Stop Doing Dependency Injection

Stop Doing Dependency Injection

Download Find similar pictures
Text on the meme
STOP DOING DEPENDENCY INJECTION • OBJECTS WERE SUPPOSED TO BE CREATED WITH `new` • YEARS OF INJECTING yet NO REAL-WORLD USE FOUND for building ABSTRACTIONS around GLOBAL STATE • Wanted global state anyway for a laugh? We had a tool for that: It was called "GLOBAL VARIABLE" • "Yes I'd like to get an instance of WHATEVER and call METHODS on it" - Statements dreamed up by the utterly Deranged LOOK at what DI Experts have been demanding your Respect for all this time, with all the compilers & languages we built for them (This is REAL DI, done by REAL DI Experts): var builder = new ContainerBuilder(); builder.RegisterType<ConsoleOutput>().As<IOutput>(); builder.RegisterType<TodayWriter>().As<IDateWriter>(); Container = builder.Build(); ?????????????? ??????????? "Hello I would like to resolve an instance in a lifetime scope please." They have played us for absolute fools
What it means

This programming meme presents dependency injection as an overcomplicated ritual, contrasting simple global variables or direct object creation with verbose container configuration and lifetime scopes. The punchline mocks DI experts by showing a tiny piece of code and an injection syringe as if dependency injection were an absurd cult, then concludes that developers have been fooled into accepting unnecessary complexity.

Objects
Tags
Source
Type
image
Size
800×800 · 142.9 KiB
Mood
саркастичный, абсурдный
Language
en
Added