Software Architecture: Dependency Injection in .NET (The Course)
Minimum price
Suggested price

Course Info

This course includes 1 attempt.

Teaching Approach

No fluff, no ranting, no beating the air. I respect your time. The course material is succinct, yet comprehensive. All the important concepts are covered. Particularly important topics are covered in-depth. For absolute beginners, I offer my help on Skype absolutely free, if requested. 

Take this course, and you will be satisfied. 

Build a solid foundation in software architecture applying Dependency Injection with IoC-Containers

In many of my courses I use techniques of Dependency Injection and each time students write me private messages saying that they don't what it is and thus they don't understand what's going on in the course I teach. This is very unfortunate from the learning perspectives.

Dependency Injection is the set of techniques that allow to supply dependencies to objects. Actually, if you have ever passed dependencies via constructors, then you applied the so-called constructor injection. Dependency Injection (DI) is simple and difficult at the same time. On one hand, DI is comprised of simple techniques and on the other hand, when we need to bring DI to the next level, we need to make things more complicated using the so-called DI or IoC (Inversion of Control) Containers. These are the frameworks which perform dependency injection automatically. You just need to set one up in the application root (an extremely important notion which you'll learn about in the course) and after that, it will resolve all the dependencies it knows about in the runtime.

If you still don't understand what am I talking about, just believe me, you absolutely need to know about Dependency Injection. This course will tremendously improve your understanding of how software architectures emerge. So, this course is "must watch" for anyone who still doesn't understand what is DI and IoC-Containers.

Content and Overview 

This course is aimed at all kind of developers. It provides solid theoretical base reinforced by practical material. 

The course covers:

  • Introduction to Inversion of Control:
  • Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI),
  • Dependencies and their types, Pure DI and IoC-Containers, Service Locator
  • The Architectural Implications of Dependency Injection
  • DI-related Anti-Patterns & Refactorings: 
  • Control Freak, Hidden Dependencies, Temporal Coupling,
  • Constructor Over-Injection and how to avoid it,
  • Ambient Context, Facade Service, Property Injection vs Bastard Injection, Cyclic Dependencies
  • Refactoring Example of an existing code base applying Dependency Injection
  • How to reap the fruits of DI
  • DI-Containers (IoC-Containers):
  • Overview, Unity, Late Binding with Unity, Aspect-Oriented Programming (AOP), Interception vs Pure DI vs AOP Tools,
  • Setting up a bootstrapper with Unity, Autofac and Castle.Windsor


Course Material

  • Promo
  • Course Promo
  • Dependency Inversion Principle and Dependency Injection
  • Outline-01
  • Definition of DIP
  • Dependencies
  • Volatile and Stable Dependencies
  • Definitions-IoC and DI
  • DIP Violation Demo
  • Refactoring to a Better Design
  • Dependency Injection Techniques
  • Architectural Implications
  • Common Smells of DIP Violation
  • Conclusion
  • Introduction to IoC-Containers (or DI-Containers)
  • Outline
  • Pure DI and IoC
  • Building a Simple IoC-Container
  • ServiceLocator
  • Demo with an IoC-Container
  • Conclusion
  • Dependency Injection - Related Anti-Patterns & Refactorings
  • Outline
  • Control Freak
  • Hidden Dependencies and Service Locator
  • Temporal Coupling and Constructor Injection
  • Constructor Over-Injection
  • Ambient Context
  • Facade Service
  • Property Injection vs Bastard Injection
  • Cyclic Dependencies
  • Conclusion
  • Dependency Injection Real-World Example
  • Outline
  • Application Overview
  • Data Access and Models
  • UI-Side
  • The Problem of Tight Coupling
  • Refactoring Process
  • Isolating the Bootstrapper
  • Consequences
  • Conclusion
  • Reaping the Fruits of DI
  • Outline
  • Adding new DAL
  • Writing Unit Tests for View Models
  • Conclusion
  • DI-Containers (IoC-Frameworks)
  • Outline
  • Overview of DI-Containers
  • Unity
  • Late Binding with Unity
  • Aspect-Oriented Programming
  • Demo of the Boilerplate Code Problem
  • Implemeneting AOP by Interception
  • Interception vs Pure DI vs AOP Tooling
  • Autofac and Castle.Windsor DI-Containers
  • Problems Related to DI-Containers
  • Conclusion


    • I'm thankful enough for that I love what I do.

      I began my career as a postgraduate student participating in Microsoft ImagineCup contest.

      I've been working with .NET platform since 2003. I've been professionally architecting and implementing software for more than 10 years, primarily based on the .NET platform. I'm passionate about building rich and powerful applications using modern technologies. I'm a certified specialist in Windows Applications and Service Communication Applications by Microsoft. I'm one of the coordinators of the MskDotNet User Group in Moscow.

      "If it's work, we try to do less. If it's art, we try to do more." - Seth Godin.

      What I can say is that software is my art.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub