Dependency Injection

Veröffentlicht am: 20 Juni 2010
auf dem Kanal: Jakob Jenkov
130,502
651

Dependency injection is a design technique where dependencies are injected into an object from the outside, instead of being created by the object itself on the inside. A dependency is an object that is needed by another object for that object to do its job. For instance, a BookingManager might need a DatabaseAccessObject in order to store a Booking in the database. Instead of creating the dependency - the DatabaseAccessObject, the BookingManager will have a DatabaseAccessObject injected into it from the outside. This dependency injection is typically performed by a dependency injection container.

While dependency injection may not be the silver bullet that solves all problems, dependency injection is still a nice tool in any developers tool belt. Check out the corresponding 10 texts in my dependency injection tutorial too, by clicking the link first in the description.

http://tutorials.jenkov.com/dependenc...


Auf dieser Seite können Sie das Online-Video Dependency Injection mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Jakob Jenkov 20 Juni 2010 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 130,502 Mal angesehen und es wurde von 651 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!