Software Architecture: Dependency Injection for C# Devs
Dependency Injection is the set of techniques that allow to supply dependencies to objects. Build a solid foundation in software architecture applying Dependency Injection with IoC-Containers.
- Self-paced with Life Time Access
- Certificate on Completion
- Access on Android and iOS App
Teaching Approach
No fluff, no ranting, no beating the air. I esteem 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
Who is the target audience?
- Any C# developer who wants to learn about Dependency Injection and IoC-Frameworks
- Solid experience in C#
- Apply DIP and use IoC-Containers for Dependency Injection to come up with improved Architecture
The outline of the section dedicated to Dependency Inversion Principle (DIP) and Dependency Injection (DI) where you'll learn the main definitions and concepts.
Learn the difference between volatile dependencies and stable dependencies.
Look at the refactoring process based on Dependency Injection (DI) that leads to a better design of the application.
Learn different Dependency Injection (DI) techniques such as Constructor Injection, Property Injection and Method Injection.
Learn about the common smells of Dependency Inversion Principle (DIP) violation.
A conclusion of the section dedicated to Dependency Inversion Principle (DIP) and Dependency Injection (DI). Recap what you learned.
Learn what is Pure DI and how it differs from IoC-Containers (DI-Containers).
Learn what is Service Locator and how to implement it. What is the difference between a DI-Container and Service Locator?
The conclusion for the section on IoC-Containers (DI-Containers). Recap what you learned.
The outline of the third section "Dependency Injection - Related Anti-Patterns & Refactorings". Learn what the most common DI-related anti-patterns exist and how to avoid them or how to remove them by applying proper refactorings.
Learn about the dependency injection anti-pattern called "Hidden Dependencies" that is caused by wrong use of Service Locator design pattern.
Learn about the dependency injection anti-pattern called "Temporal Coupling" and how to avoid it by applying the constructor injection technique.
Learn about the dependency injection anti-pattern called "Constructor Over-Injection" and how to avoid it by applying corresponding refactorings.
Learn the Ambient Context design pattern and how to apply it to avoid the "Constructor Over-Injection" anti-pattern.
Learn what is Facade Service and how to apply it to avoid constructor over-injection.
Learn about the dependency injection anti-pattern called "Bastard Injection" and how to cure the decease by applying the property injection.
The conclusion on the third section dedicated to DI-related anti-patterns and refactorings.
The outline of the fourth section dedicated to analysis of a real-world code example where we apply Dependency Injection to achieve loosely coupled code.
In this lecture, you'll learn about the problem of tight coupling that can be fixed by Dependency Injection.
In this lecture, you'll learn how to refactor the code base towards loosely-coupled code by applying dependency injection.
Learn how to isolate the bootstrapper to adhere to the SRP (Single Responsibility Principle).
Learn what are the consequences of refactoing we performed by applying dependency injection.
The conclusion on the refactoring of a real-world example by applying dependency injection to achieve loosely coupled code.
The outline of the fifth section dedicated to harnessing the pros of loosely-coupled code achieved through Dependency Injection.
In this lecture, I'll show you how to add new data access layer in a loosely-coupled code that was achieved by applying dependency injection.
In this lecture, you'll see how to write a unit test for a view model in a loosely coupled code achieved by applying dependency injection.
The conclusion on the section dedicated to harnessing the pros of loosely-coupled code that was achieved by applying dependency injection.
The outline of the sixth section dedicated to DI-Containers (IoC-Containers).
Look at the problem of the boilerplate code that can be solved by AOP.
Learn how to apply AOP by using the power of Intercepting feature of Unity.
Learn the pros and cons of different approaches to implement AOP.
Learn how to build a bootstrapper with Autofac and Castle.Windsor DI-Containers.
The conclusion on the sixth section dedicated to DI-Containers (IoC-Containers).
