Port of schuchert.wikispaces.com


martin_fowler_blog_wip.DipInTheWild

martin_fowler_blog_wip.DipInTheWild

Overview

You can safely skip to the article.

This is my WIP for an article for Martin Fowler’s blog. The first cut is going to be a novelization of a talk I recently gave in Sweden. The materials for that (code and pdf of slides) are on github.

This is a first version I’ll put together. Then, after I’ve reintroduced myself to Martin’s development stack, I’ll port, rewrite and edit in earnest. You can read into this that I’m going to take more time and care since it’ll be on Martin’s blog. In fact, this is approximately what I did with my first article.

I’m applying my extraversion to the creation of this work just because. Since a 50-minute talk and a blog are different media, I expect there’ll be some differences. However, I could also offer the real scoop on the heavy use of SWAG + procstination that went into the original presentation for SDC2013.

Dip in the Wild

My original introduction to the Dependency Inversion Principle came from Robert (Uncle Bob) Martin back in the last century, around 1994. It, along with most of the SOLID principles, is simple to state but deep in its application. What follows are some recent applications I’ve used on real projects (everything I discuss is in production from June 2012 and as of 2013 is still in production, with one of these going back several more years).

Rather than define the dependency inversion principle, I’ll first point to wikipedia and then a more in-depth coverage from my original source.

Where the description refers to abstractions, I’ve noticed many people confuse abstraction with:

In fact, the wikipedia article has a link to the idea, but a quick summary would include:

That is, as we will see, simply depending on an interface can (typically it seems to me) still violate the dependency inversion principle. Whether that is a bad thing or not, is a good follow-on discussion to have.

What follows are four examples of applying the dependency inversion principle in the “wild”, or things I’ve done on projects, in the moment.

Logging

Depending on Interfaces

Message Oriented Middleware

Assist in Multi-Thread Development (add this???)

Metrics and a Feature Toggle

to be drawn, includes much code…

Conclusion

Depending on an interface is not enough.

Enabling technology.


Comments

" Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.