
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 what is Dependency Inversion Princple (DIP) in essence.
Learn the definition of a dependency.
Learn the difference between volatile dependencies and stable dependencies.
Learn what is "inversion of control" and "dependency injection".
Look at an example of DIP violation on practice.
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 architectural implications of dependency 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.
Outline of the second section dedicated to DI-Containers (IoC-Containers).
Learn what is Pure DI and how it differs from IoC-Containers (DI-Containers).
Learn how to build your own naive implementation of a DI-Container.
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 "Control Freak".
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 applyt 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.
Learn what is "cyclic dependencies" and why they are pure evil.
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 achive loosely coupled code.
An overview of an application we're going to work on.
Overview of the Data Access Layer.
In this lecture, I'll demonstrate you the UI-side of the sample application.
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 achive loosely coupled code.
The outline of the fifth section dedicated to harnessing the pros of loosely-coupled code achived 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).
Learn what DI-Containers in the world of .NET platforms exist.
Learn how to build a bootstrapper with a Unity DI-Containe.
Learn what is late binding and how to implement it with Unity.
Learn what is Aspect-Oriented Programmin or AOP in short.
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.
Learn what the problems are related to DI-Containers.
The conclusion on the sixth section dedicated to DI-Containers (IoC-Containers).
Join the mailing list for the biggest discounts on any of my video courses and explore my Patreon page, and leave a review to support the course.
Explore the purpose and structure of unit tests, definitions of system under test, and the key difference between unit and integration tests, including test doubles for isolation.
Explore unit test naming conventions: project and class names, three naming styles, and how use cases, scenarios, and outcomes shape readable tests, with Visual Studio test execution insights.
Learn how to use Visual Studio for unit testing: build the solution, run and re-run tests, create playlists to group tests, and debug tests with breakpoints.
Unit tests act as a safety net, verifying correct behavior and catching unintended changes. They boost productivity, enable safer refactoring, and support continuous integration as a core process.
Explore the programmer's oath and its emphasis on responsibility, unit testing and test-driven design, frequent small releases, honest estimates, and continuous improvement in software architecture.
Learn how unit tests call a function, verify outcomes, and identify the system under test, using the three-part naming template and Visual Studio's test discovery after builds.
Install and run a unit testing framework in Visual Studio, write assertions with new unit API, implement setup and teardown, group and ignore tests, run from console, and calculate coverage.
Examine the assertion model at the heart of unit testing, using constraint-based expressions like all, has, and not to build fluent, expression-tree assertions.
Explore how unit tests validate a game character class using diverse assertions, covering strings, numeric values, booleans, nulls, collections, type checks, ranges, and exception handling.
Explore the arrange-act-assert pattern in unit testing, showing how to set up the system under test, call one or more methods, and verify behavior with assertions.
Group tests with a category attribute at class or method level to organize the test suite. Use the ignore attribute to skip tests and view ignored tests in test runner.
Implement a Roman numeral parser that converts numerals to Arabic numbers, handle subtractive notation, and prove the algorithm with unit tests.
Practice writing unit tests for a simple stack by covering push, pop, and peek methods, testing the public API and preparing for the next lecture with a sample solution.
Demonstrate unit testing a stack in C#, covering empty state, count, push and pop behavior, peak results, and exception handling, then discuss test coverage goals.
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
Introduction to Unit Testing
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.
Take this course, and you will be satisfied.