Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS AWS Certified Developer - Associate CompTIA Security+
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Personal Transformation Meditation Life Purpose Coaching Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee

This course includes:

  • 5.5 hours on-demand video
  • 5 articles
  • Full lifetime access
  • Access on mobile and TV
Development Software Engineering Dependency Injection

Software Architecture: Dependency Injection for C# Devs

Learn Dependency Injection techniques along with an IoC-framework (DI-Container). Grow Architecture applying DI.
Rating: 4.3 out of 54.3 (291 ratings)
5,111 students
Created by Engineer Spock
Last updated 7/2020
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • Deeply understand the concepts of Dependency Injection and Inversion of Control
  • Apply Dependency Inversion Principle (DIP) in practice
  • Understand the concept of DI-Containers (IoC-Containers)
  • Build a trivial IoC-Container on your own
  • Apply existing IoC-Containers (frameworks)
  • Refactor your code by applying DI coming up with significantly improved Architecture
  • Write unit tests (this course includes introduction to Unit Testing)
  • Apply AOP (aspect-oriented programming) techniques
Curated for the Udemy for Business collection

Course content

9 sections • 86 lectures • 5h 18m total length

  • How to Ask Questions
    00:22
  • Introduction to Unit Testing
    00:11
  • Download Source Code and Slides
    00:03
  • English Subtitles
    00:06
  • Join .NET Community of Students
    00:02

  • Preview01:35
  • Preview03:30
  • Dependencies
    04:49
  • Preview02:53
  • Definitions of IoC and DI
    03:18
  • DIP Violation Demo
    02:47
  • Refactoring to a Better Design Applying Dependency Injection
    08:31
  • Dependency Injection Techniques
    07:09
  • Preview05:24
  • Common Smells of DIP Violation
    02:37
  • Conclusion
    02:03

  • Outline
    01:07
  • Preview05:01
  • Building a Simple IoC-Container
    03:53
  • Service Locator Design Pattern
    02:54
  • Demo With an IoC-Container
    10:21
  • Conclusion
    01:17

  • Outline
    01:54
  • Control Freak
    07:06
  • Hidden Dependencies with Service Locator
    04:41
  • Temporal Coupling and Constructor Injection
    01:47
  • Preview04:05
  • Preview03:53
  • Facade Service
    02:58
  • Property Injection VS Bastard Injection
    03:34
  • Cyclic Dependencies
    10:50
  • Conclusion
    02:35

  • Outline
    01:13
  • Application Overview
    01:24
  • Data Access and Models
    02:00
  • UI-Side
    03:18
  • The Problem of Tight Coupling
    03:41
  • Refactoring Process
    10:30
  • Isolating the Bootstrapper
    04:20
  • Consequences
    01:54
  • Conclusion
    01:14

  • Outline
    00:27
  • Adding New DAL
    08:58
  • Writing Unit Tests for View Models
    10:17
  • Conclusion
    00:45

  • Outline
    01:35
  • Overview of DI-Containers
    03:46
  • Unity DI-Framework
    10:17
  • Late Binding with Unity
    05:30
  • Preview03:49
  • Demonstration of the Problem of Boilerplate Code
    04:08
  • Preview05:19
  • Interception vs Pure DI vs AOP Tooling
    02:40
  • Autofac and Castle.Windsor DI-Containers
    04:29
  • Problems Related to DI-Containers
    01:57
  • Conclusion
    00:57
  • BONUS Lecture
    01:18

  • Outline
    00:58
  • What is a Unit Test
    03:09
  • Unit Testing Frameworks
    03:22
  • Your First Unit Test
    08:43
  • Naming Conventions
    04:34
  • Running and Debugging Unit Tests
    05:02
  • Benefits of Unit Tests
    03:35
  • Who Should Write Unit Tests and When
    02:51
  • Programmer's Oath
    03:17
  • Exercise: Degree Converter
    01:29
  • Solution: Degree Converter
    06:54
  • Conclusion
    01:15

  • Outline
    01:01
  • Assert Intro
    05:29
  • Assert Demo
    10:27
  • Arrange-Act-Assert
    00:58
  • Running Tests from the Console
    01:51
  • SetUp and TearDown
    05:09
  • OneTimeSetUp and OneTimeTearDown
    02:13
  • Parameterized Unit Tests
    03:40
  • Grouping and Ignoring Unit Tests
    02:14
  • Code Coverage
    01:42
  • Exercise: FizzBuzz
    01:07
  • Solution: FizzBuzz
    05:05
  • Exercise: Parsing Roman Numerals
    02:27
  • Solution: Parsing Roman Numerals
    09:27
  • Exercise: Stack
    00:59
  • Solution: Stack
    09:02
  • Conclusion
    01:25

Requirements

  • Some experience in C#

Description

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. 

Who this course is for:

  • Any C# developer who wants to learn about Dependency Injection and IoC-Frameworks

Instructor

Engineer Spock
Software Engineer - 1000+ Reviews, Average Score - 4.5
Engineer Spock
  • 4.2 Instructor Rating
  • 7,522 Reviews
  • 61,466 Students
  • 22 Courses

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 .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 MSK.NET 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.

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.