Submitted by admin on

Dependency Injection (DI) is a design pattern/technique that removes dependencies from computer code, making the application easier to maintain and test.

injecting a object into another object i.e. dependency injection

Ways of Injecting dependencies

Dependency Injection can be done in two ways.

  1. Using setter injection
  2. Using constructOr injection

inversion of control vs dependency injection

 

IOC continer: it is a pre defined program, that maintain the object lifecycle(creation, object hold into memory, destroy).

नई टिप्पणी जोड़ें

सादा टेक्स्ट

  • No HTML tags allowed.
  • लाइन और पैराग्राफ स्वतः भंजन
  • Web page addresses and email addresses turn into links automatically.
Standard (Image)