Why Dependency Injection?

In software development, very often someone else might already have found effective solutions to the problems you are facing.

As a developer, you don't need to reinvent the wheel every time. Instead, you need to refer to the well-established practices and methodologies. Have you guessed what we are talking about? That's correct: design patterns.

This chapter is crafted to cover the following interesting topics:

  • What design patterns are and their benefits
  • Dependency Injection Principle (DIP)
  • Inversion of Control (IoC)—a design methodology to implement DIP
  • Various design patterns to implement IoC
  • Dependency Injection (DI)
  • Various types to implement DI
  • How an IoC container is helpful to apply a DI

Get Java 9 Dependency Injection now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.