Software Architecture: Dependency Injection for C# Developers | Elias Spock | Skillshare

Software Architecture: Dependency Injection for C# Developers

Elias Spock, Chance favors the prepared mind.

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
52 Videos (3h 30m)
    • 00 Promo

      5:11
    • 01 Outline 01

      1:34
    • 02 Definition of DIP

      3:30
    • 03 Dependencies

      4:12
    • 04 Volatile and Stable Dependencies

      2:53
    • 05 Definitions IoC and DI

      3:18
    • 06 DIP Violation Demo

      2:25
    • 07 Refactoring to a Better Design

      8:12
    • 08 Dependency Injection Techniques

      5:54
    • 09 Architectural Implications

      5:24
    • 10 Common Smells of DIP Violation

      2:11
    • 11 Conclusion

      0:57
    • 01 Outline

      1:35
    • 02 Pure DI and IoC

      4:31
    • 03 Building a Simple IoC Container

      3:55
    • 04 ServiceLocator

      2:44
    • 05 Demo with an IoC Container

      10:27
    • 06 Conclusion

      1:17
    • 01 Outline

      1:35
    • 02 Control Freak

      7:22
    • 03 Hidden Dependencies and Service Locator

      4:19
    • 04 Temporal Coupling and Constructor Injection

      1:47
    • 05 Constructor Over Injection

      4:06
    • 06 Ambient Context

      3:39
    • 07 Facade Service

      2:58
    • 08 Property Injection vs Bastard Injection

      3:34
    • 09 Cyclic Dependencies

      11:34
    • 10 Conclusion

      2:35
    • 01 Outline

      1:35
    • 02 Application Overview

      1:24
    • 03 Data Access and Models

      2:00
    • 04 UI Side

      3:18
    • 05 The Problem of Tight Coupling

      3:26
    • 06 Refactoring Process

      10:38
    • 07 Isolating the Bootstrapper

      4:37
    • 08 Consequences

      1:54
    • 09 Conclusion

      1:14
    • 01 Outline

      1:35
    • 02 Adding new DAL

      9:04
    • 03 Writing Unit Tests for View Models

      10:19
    • 04 Conclusion

      0:45
    • 01 Outline

      1:35
    • 02 Overview of DI Containers

      3:46
    • 03 Unity

      10:24
    • 04 Late Binding with Unity

      5:30
    • 05 Aspect Oriented Programming

      3:49
    • 06 Demo of the Boilerplate Code Problem

      4:05
    • 07 Implemeneting AOP by Interception

      5:27
    • 08 Interception vs Pure DI vs AOP Tooling

      2:40
    • 09 Autofac and Castle

      4:29
    • 10 Problems Related to DI Containers

      1:57
    • 11 Conclusion

      0:57

About This Class

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

9

Students

--

Projects

  • --
  • Beginner
  • Intermediate
  • Advanced
  • All Levels
  • Beg/Int
  • Int/Adv

Level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

Elias Spock

Chance favors the prepared mind.

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 nearly 7 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 Communicati...

See full profile

Report class