<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Dependency injection - Page 5 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Dependency_injection&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Dependency_injection&amp;p=6">3.Next</a>
</p>
<p>in the constructor method's parameters), and passes the dependencies into the object.</p>

<p>Dependency injection implements the idea of "inverting control over the implementations of dependencies", which is why certain Java frameworks generically name the concept "inversion of control" (not to be confused with <a href="page.php?w=Inversion_of_control">inversion of control flow</a>).</p>

<p><big> Roles </big></p>
<p>Dependency injection involves four roles: services, clients, interfaces, and injectors.</p>

<p><big> Services and clients </big></p>
<p>A service</p><p>
<a accesskey="1" href="page.php?w=Dependency_injection&amp;p=4">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Dependency_injection&amp;p=6">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
