Tech Day #3 – Inversion of Control (IoC) Containers
For my third tech day I had a bit of an internal fight over whether or not I should get started with WPF, or take a look at IoC containers. As you can tell from the title, I went with IoC containers since I thought the knowledge would be more useful to me at this point. What is an Inversion of Control (IoC) Container? The first obvious question. Before we answer this through we should talk about some base concepts that are important to IoC. We’ll come back to this in a minute.. What are the Basic Concepts Behind IoC? The Hollywood Principle I first heard about this in Head First Design Patterns (I also strongly recommend grabbing the poster ). In short this basically says “don’t call us, we’ll call you” – lower-level classes that perform specialised tasks lose their control, instead being called by higher-level classes. These higher-level classes provide the “hooks” for the lower-level classes to “slot in”. Lower-level classes don’t get to call the big-shot higher-level clas...