Design Patterns and their Usage with Dependency Injection

Learn key design patterns, how to implement them, and how to use them as clean code in applications.

Note: The course is also available in German, search for “Entwurfsmuster und ihre Integration mit Dependency Injection”

What you’ll learn

  • By the end of the course, you will understand important design patterns, be able to discover them, classify them, and practically implement them in code..
  • You are familiar with basic software development principles that pave the way to clean, flexible and maintainable code..
  • You know how an application is built and at what point design patterns are injected into your code..
  • The terms Dependency Injection, Composition Root and Object Graph are no longer foreign words to you..

Course Content

  • Introduction and Presentation –> 6 lectures • 9min.
  • SOLID Principles – The Backbone of Flexible Software Development –> 8 lectures • 13min.
  • Dependency Injection – The Wiring of Objects –> 3 lectures • 6min.
  • Composition Root – The entry point to the application –> 4 lectures • 9min.
  • Introduction to Design Patterns –> 2 lectures • 2min.
  • Design Patterns in the real World –> 3 lectures • 12min.
  • Decorator – Add Functionalities to Classes –> 6 lectures • 27min.
  • Composite – Uniform Treatment of multiple Objects –> 4 lectures • 17min.
  • Proxy – Control creation of and access to Objects –> 7 lectures • 49min.
  • Strategy Pattern – Abstraction for various Algorithms –> 2 lectures • 5min.
  • Strategy Proxy – A practical implementation of the Strategy Pattern –> 4 lectures • 20min.
  • Adapter – Translate incompatible Interfaces –> 5 lectures • 24min.
  • Null Object Pattern – Avoiding Null Checks –> 4 lectures • 13min.
  • Reuse of Design Patterns –> 5 lectures • 16min.
  • Design Patterns applied to practical E-Commerce example –> 14 lectures • 1hr 15min.
  • Final Test –> 0 lectures • 0min.
  • Final Part –> 3 lectures • 5min.

Auto Draft

Requirements

Note: The course is also available in German, search for “Entwurfsmuster und ihre Integration mit Dependency Injection”

 

Course to learn frequently used design patterns

In my course you will learn the basics of different, important design patterns of software development. Intentionally, we do not cover all possible design patterns. We limit ourselves to the most commonly used patterns that software developers should know. Other patterns beyond that are beyond the scope and complexity of this course. The course also deals intensively with the practical application of the patterns in connection with Dependency Injection and the SOLID principles, so that Clean Code does not remain just an empty phrase.

Design patterns covered:

  • Decorator
  • Composite
  • Proxy
  • Strategy Pattern
  • Strategy Proxy
  • Adapter
  • Null Object

Concepts covered:

  • SOLID Principles
  • Dependency Injection (Constructor Injection)
  • Composition Root (Bootstrapping)
  • Object Graph
  • Chaining and reuse of design patterns

Target group

The course is aimed at beginners with programming knowledge and advanced programmers / developers who want to learn the structure of object-oriented software beyond the pure implementation of functions and algorithms, as well as to further educate themselves in the area of design / architecture. Abstractions and interfaces are briefly introduced in the course, but a prior knowledge of them will facilitate understanding. The course assumes basic knowledge of classes and functions.

Developers who already develop and build entire applications, but frequently encounter problems with the maintainability and adaptability of their code, can also benefit from the content. In particular, the knowledge imparted about dependency injection and the composition root can provide new insights here.

The examples and exercises are written in C#, a very easy to understand programming language. The concepts covered are cross-language and the code can be easily translated into your own (object-oriented) programming language.

Course content

Short theoretical introductions with simple UML diagrams lead – via analogies from the real world – to practical implementations in code.

All design patterns are explained using the example “plug and socket”. In this way, the function, application and goals of the patterns are explained in an easily understandable way at an abstract level. The focus is always on understanding the patterns as well as the actual implementation. The short theory lessons are accompanied by the simplest UML diagrams.

The course is based on an alternation of

  • Video content that explains design patterns on real objects,
  • Presentations that compactly summarize what has been learned,
  • Screencasts showing implementations in real code,
  • Exercises that can be solved independently,
  • Quizzes, for quick self-control of what has been learned, and
  • A final test with over 35 questions covering the entire course.

All knowledge about design patterns is useless if you can’t use them correctly in an application. Therefore, the course also includes basics on SOLID principles, as well as Dependency Injection and Composition Root, the basis of object-oriented design. With these simple concepts, design patterns can be integrated into applications in such a way that they unleash their true power: adaptive, maintainable and understandable code.

Building on this knowledge, we’ll go through a real-world example application: the order fulfillment of an e-commerce company. You’ll learn about real-world uses of the design patterns, as well as their integration into the application.

Exercises

The entire course is supported by exercises written in C#. You’ll get assignments on implementing and building in design patterns. Exercises can be done in two ways. Once they are available directly in the course, via the IDE provided by Udemy including control tests and solutions. Alternatively, the exercises are in the included project folder for the free Visual Studio 2022 Community Edition (or higher).

All code, both examples and exercises is provided with unit tests. Even though unit tests are not explicitly discussed in this course, these tests can still help you understand and get you started with Test-First-Development or Test-Driven-Development (TDD). You will see how easy it is to test implementations of the design patterns.

Get Tutorial