ubervu
Apple iPhone
Nexus One
+ Add

EMAIL ALERTS: SUBSCRIBE
Updated 3 months, 2 weeks ago

Source:
http://www.lazycoder.com/

I see a lot of people talking about how “advanced” techniques like dependency injection and inversion of control are and how their team won’t understand either technique.
Folks, this isn’t hard. In fact, both of these things are so simple I simply call it “using the programming language”.
Let’s look at dependency injection.
PLAIN TEXT
CODE:
public class MyClass
{
private DataTableReader _reader;
...
Showing 12 relevant reactions out of 28.

Good IOC/Dependency Injection explanation... http://tr.im/El5x

[...] This post was mentioned on Twitter by Scott Koon, Ryan Farley, Jungchan Hsieh, Patrick Veverka, Doug Philips and others. Doug Philips said: RT @lazycoder: [posted]Dependency Injection and Inversion of Control are not rocket surgery http://bit.ly/1AjGZN [...]

Simple and to the point of what I'm doing a lot these days (refactoring code) http://bit.ly/1c1QF

In a word – “Quality!”
It’s posts like these that are driving home everyday something that we already know: these concepts are not tough to understand and use, it is the incessant resistance to change causing problems.
The more of these great 1-pagers we have in evidence, the more I get to point out to those whining about “if it ain’t broke…blah”
...
See all content

Wim: Yeah, I struggled a bit to come up with a good example of IoC. I finally just went with the interface injection. I supposed that delegate event handlers would have been another good example, one that might have turned on the light bulb for a lot of people. “Oh, I’m already using IoC and I didn’t even know it”.

Social comments and analytics for this post…
This post was mentioned on Twitter by lazycoder: [posted]Dependency Injection and Inversion of Control are not rocket surgery http://bit.ly/1AjGZN…
Dependency injection really is something that enables inversion of control. It doesn’t have to be the case. In your reader example IoC isn’t very clear at all.
In my opinion IoC is more about having a container that really controls a fairly granular set of methods defined on the dependency interface definition but the container wraps its own logic, logging, and process of executing
...
See all content
Follow us
FEEDBACKTwitterFacebook