Dependency injection: Difference between revisions

Content deleted Content added
top: Final.
Tags: Mobile edit Mobile app edit Android app edit
m Frameworks: improve clarity and wording
Line 200:
=== Frameworks ===
[[File:DependencyInjectionServiceProvider.png|alt=A class diagram of dependency injection containers in the .NET Framework.|thumb|Containers such as Ninject or StructureMap are commonly used in [[object-oriented programming]] languages to achieve Dependency Injection and [[inversion of control]].]]
Manual dependency injection is often tedious and error-prone for larger projects, promoting the use of frameworks which automate the process. Manual dependency injection becomes a dependency injection [[Software framework|framework]] once the constructing code is no longer custom to the application and is instead universal.<ref>{{citation |last=Riehle |first=Dirk |title=Framework Design: A Role Modeling Approach |url=http://www.riehle.org/computer-science/research/dissertation/diss-a4.pdf |year=2000 |publisher=[[ETH Zurich|Swiss Federal Institute of Technology]]}}</ref> While useful, these tools are not required in order to doperform dependency injection.<ref>{{Cite web |title=Dependency Injection != using a DI container |url=http://www.loosecouplings.com/2011/01/dependency-injection-using-di-container.html |access-date=2015-07-18 |website=www.loosecouplings.com}}</ref><ref>{{Cite web |title=Black Sheep » DIY-DI » Print |url=http://blacksheep.parry.org/archives/diy-di/print/ |url-status=dead |archive-url=https://web.archive.org/web/20150627215638/http://blacksheep.parry.org/archives/diy-di/print |archive-date=2015-06-27 |access-date=2015-07-18 |website=blacksheep.parry.org}}</ref>
 
Some frameworks, like [[Spring Framework|Spring]], can use external configuration files to plan program composition: