Tag Archives: single-responsibility principle

The Tight Three: SRP, OCP, and IoC

Today I’m going to elaborate on a statement I made in my¬†Inversion of Control (IoC) post: …inversion of control falls naturally out of writing cohesive units that adhere to the single-responsibility principle (pdf) and the open-closed principle (pdf). Inversion of control is about responsibility placement. That is, to use IoC is to consider an object’s […]

Continue Reading

Inversion of Control (IoC) and Dependency Injection (DI)

What is Inversion of Control (IoC)? Inversion of Control (IoC) is a generic term for changing (i.e. inverting) which of at least two sites controls a specific behavior. In other words, inversion of control is a simple statement about where the responsibility or control over some behavior belongs. ¬†Thus, inversion of control falls naturally out […]

Continue Reading