Monday, August 13, 2007

How Old is the Concept of "Inversion of Control"?

Think this article by Martin Fowler, probably most quoted, is the first one talking about this concept? Well, then we were both wrong, because I have just found out this article, "The Dependency Inversion Principle", published as early as 1996!

Isn't that something?

5 comments:

Anonymous said...

The D.I.P. is not the same as what people have been calling "IOC", which is not, by the way, what people used to call "IOC" before the enterprise Java crowd started calling what is know known as "Dependency Injection" "IOC". Back in those days it used to mean event-driven I/O instead of blocking/polling I/O. Confused? Welcome to enterprise software development where !

The concepts behind "Dependency Injection" -- expose dependencies between modules/objects/components, distinguish between required and provided services, separate configuration from computation -- have been around since the late 70s under various names: module interconnection languages, configuration programming, ADLs, etc. etc.

Shane said...

I know what you mean but you gota admit that the concept is pretty much the same, and that is where I am going with. If you can provide a reference it would be great. Thanks!

Anonymous said...

The Dependency Inversion Principle was covered in the excellent "Agile Software Development, Principles, Patterns, and Practices" by Robert C. Martin (of Object Mentor)
http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445/ref=sr_1_2/105-8581918-1302023?ie=UTF8&s=books&qid=1187574233&sr=8-2

This book was recommended to me (by Uncle Bob, tsk) and got me interested in the whole Agile / XP thing.

Definitely a worthwhile addition to your bookshelf if you don't already have it.

Shane said...

That book came out in 2002, I think, which is way later than the paper.

Thanks for the recommendation, I have read it (My Book Shelf)

Anonymous said...

Inversion of Control in computing is at least as old as callback functions (as anonymous alludes).

My Amiga (as all GUIs do) in the early 80's used IoC to tell my applications when a user clicked a button. GhostScript used "inverted control structures" at least as early as 1989.

As for "Dependency Injection", I'd be prepared to be convinced that "lambdas/agents/delegates" are the same thing. The argument may then be whether the just type and behaviour are sufficient, or whether mutable state is also needed. If you're happy to stretch it, then go back to Lisp (and even ALGOL really).

But, of course, the lambda calculus goes back to 1936 (and 1940 for simple types), so perhaps it's at least that old.