Over the past few months, various people asked me where to get started with Dependency Injection in Delphi.
First of all, get this book:
[WayBack] Dependency Injection In… by Nick Hodges [Leanpub PDF/iPad/Kindle]
This book covers Dependency Injection from A to Z. In it you’ll learn about Constructor Injection, Property Injection, and Method Injection. You’ll learn about the right and wrong way to use the Dependency Injection Container.
It’s well worth reading.
Then buy this book and continue reading; it’s more extensive but coming from a Delphi background it’s better to read Nicks’ book first:
[WayBack] Dependency Injection in .NET: Mark Seemann: 9781935182504
Dependency Injection in .NET, winner of the 2013 Jolt Awards for Productivity, presents core DI patterns in plain C#, so you’ll fully understand how DI works, covers integration with standard Microsoft technologies like ASP.NET MVC, and teaches you to use DI frameworks like Structure Map, Castle Windsor, and Unity.
Then start at these demo projects:
Finally read through these posts and what they link to:
Then compare what you learned with this:
Read the rest of this entry »
Like this:
Like Loading...