(Off-Topic Rant) Dependency Injection Catalogues

I’m actually quite annoyed, for once. I remember reading a completely lucid description of Dependency Injection some time ago, but recently I’ve done a brief search of the web for documents on the subject and they’re unanimously impenetrable, at least for someone with my attention span. So here’s my explaination of DI Catalogues in as few words as I can.

Firstly we need a catalogue:

Next we need to populate it:

Finally we get to use it:

That is all there is to it! Of course this omits all error checking, but you can add that yourself once you understand the principles.

Leave a Reply

Your email address will not be published. Required fields are marked *