Java 9 Dependency Injection
上QQ阅读APP看书,第一时间看更新

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