/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

arturdryomov.dev
| | sookocheff.com
6.1 parsecs away

Travel
| | Inversion of Control (IoC), also known as Dependency Injection (DI), allows an object to define their dependencies as constructor arguments (strictly speaking, you can set these dependencies as properties, but the examples I will use today are constructor-based). This is the inverse of the object itself controlling the instantiation or location of its dependencies, hence the name Inversion of Control. Let's look at an example from Stackoverflow using a text editor with a spell checking component:
| | adambennett.dev
3.5 parsecs away

Travel
| | Android Bennett's blog :: android, kotlin, thoughts, opinions, occasional rants
| | blog.sqisland.com
4.0 parsecs away

Travel
| | Android instrumentation testing with Dagger 2, Espresso 2 and Mockito.
| | conradakunga.com
35.5 parsecs away

Travel
| This is Part 8 of a series on dependency injection.