Traditional: going to a party, bring your own drinks.
Inversion of control: going to a party, there is an ice chest full of drinks, and there's a guy handing out the drinks from the ice chest. You only get to drink what's been handed to you.
Dependency injection: going to a party, and there's an open bar, the bartender makes your drinks, and servers brings you your drinks. You don't know what you're drinking, but it tastes good.
Dependency injection is a fancy kind of Inversion of Control, but also has a bartender & servers.
Traditional: going to a party, bring your own drinks.
Inversion of control: going to a party, there is an ice chest full of drinks, and there's a guy handing out the drinks from the ice chest. You only get to drink what's been handed to you.
Dependency injection: going to a party, and there's an open bar, the bartender makes your drinks, and servers brings you your drinks. You don't know what you're drinking, but it tastes good.
Dependency injection is a fancy kind of Inversion of Control, but also has a bartender & servers.
awesome!