<?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 2 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=dependency_injection&amp;p=1">1.Previous</a><br />
<a accesskey="3" href="page.php?w=dependency_injection&amp;p=3">3.Next</a>
</p>
<p>The pattern ensures that an object or function that wants to use a given <a href="page.php?w=Service_%28systems_architecture%29">service</a> should not have to know how to construct those services. Instead, the receiving "<a href="page.php?w=Client_%28computing%29">client</a>" (object or function) is provided with its dependencies by external code (an "injector"), which it is not aware of. Dependency injection makes implicit dependencies explicit and helps solve the following problems:<br/>
* How can a <a href="page.php?w=Class_%28programming%29">class</a></p><p>
<a accesskey="1" href="page.php?w=dependency_injection&amp;p=1">1.Previous</a><br />
<a accesskey="3" href="page.php?w=dependency_injection&amp;p=3">3.Next</a>
</p>

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

</card>
</wml>
