The Dependency Injection and factory design patterns are very common, and provide great flexibility in software development. The Dependency Injection (DI) design pattern is "a form of" the Inversion of Control ( IoC ) design which is applied in many frameworks. DI gives the flexibility of attaching a custom implementation such as a "plugin", without modifying existing software. Dependency Injection can be achieved using Constructor, Setter, or Interface Injection.