Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. DI Containers > DI Container patterns

3.3. DI Container patterns

DI CONTAINERS are great tools, but, as with all tools, there are correct and incorrect ways of using them. In the same way that cooks know to treat their knives with respect, so should you learn to properly wield your DI CONTAINER—it doesn’t have the potential to lop off your fingers, but you may not harvest the benefits it can provide.

The most important thing to understand is where in the application architecture a DI CONTAINER should be used. Once you understand that, you must also learn how to use it. The following two mini-patterns provide the answers.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial