Design Patterns in C and NET
What you’ll learn
Recognize and apply design patterns
Refactor existing designs to use design patterns
Reason about applicability and usability of design patterns
Requirements
Good understanding of C#
Familiarity with latest C# features
Good understanding of object-oriented design principles
Description
Course Overview
This course provides a comprehensive overview of Design Patterns in C# and .NET from a practical perspective. This course in particular covers patterns with the use of:
The latest versions of C# and the .NET frameworkUse of modern programming approaches: dependency injection, reactive programming and moreUse of modern developer tools such as ReSharperDiscussions of pattern variations and alternative approaches
This course provides an overview of all the Gang of Four (GoF) design patterns as outlined in their seminal book, together with modern-day variations, adjustments, discussions of intrinsic use of patterns in the language.
What are Design Patterns?
Design Patterns are reusable solutions to common programming problems. They were popularized with the 1994 book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, John Vlissides, Ralph Johnson and Richard Helm (who are commonly known as a Gang of Four, hence the GoF acronym).
The original book was written using C++ and Smalltalk as examples, but since then, design patterns have been adapted to every programming language imaginable: C#, Java, PHP and even programming languages that aren’t strictly object-oriented, such as JavaScript.
The appeal of design patterns is immortal: we see them in libraries, some of them are intrinsic in programming languages, and you probably use them on a daily basis even if you don’t realize they are there.
What Patterns Does This Course Cover?
This course covers all the GoF design patterns. In fact, here’s the full list of what is covered:
SOLID Design Principles: Single Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion PrincipleCreational Design Patterns: Builder, Factories (Factory Method and Abstract Factory), Prototype and SingletonStructrural Design Patterns: Adapter, Bridge, Composite, Decorator, Façade, Flyweight and ProxyBehavioral Design Patterns: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Null Object, Observer, State, Strategy, Template Method and Visitor
Who Is the Course For?
This course is for .NET/C# developers who want to see not just textbook examples of design patterns, but also the different variations and tricks that can be applied to implement design patterns in a modern way. For example, the introduction of the DLR allows us to use an ImpromptuObject, so that our DynamicObject exposes any interface we desire. This allows for dynamic programming, and many design patterns are presented in terms of their static and DLR-based variations.
Presentation Style
This course is presented as a (very large) series of live demonstrations being done in Microsoft Visual Studio. Most demos are single-file, so you can download the file attached to the lesson and run it in Visual Studio, Visual Studio Code, Rider or another IDE of your choice.
This course does not use UML class diagrams; all of demos are live coding. I use Visual Studio, various NuGet packages, R# unit test runner and even dotMemoryUnit.
Overview
Lecture 1 Introduction
Section 1: The SOLID Design Principles
Lecture 2 Overview
Lecture 3 Single Responsibility Principle
Lecture 4 Open-Closed Principle
Lecture 5 Liskov Substitution Principle
Lecture 6 Interface Segregation Principle
Lecture 7 Dependency Inversion Principle
Lecture 8 Summary
Section 2: Builder
Lecture 9 Gamma Categorization
Lecture 10 Overview
Lecture 11 Life Without Builder
Lecture 12 Builder
Lecture 13 Fluent Builder
Lecture 14 Fluent Builder Inheritance with Recursive Generics
Lecture 15 Stepwise Builder
Lecture 16 Functional Builder
Lecture 17 Faceted Builder
Lecture 18 Summary
Section 3: Factories
Lecture 19 Overview
Lecture 20 Point Example
Lecture 21 Factory Method
Lecture 22 Asynchronous Factory Method
Lecture 23 Factory
Lecture 24 Object Tracking and Bulk Replacement
Lecture 25 Inner Factory
Lecture 26 Abstract Factory
Lecture 27 Abstract Factory and OCP
Lecture 28 Summary
Section 4: Prototype
Lecture 29 Overview
Lecture 30 ICloneable is Bad
Lecture 31 Copy Constructors
Lecture 32 Explicit Deep Copy Interface
Lecture 33 Prototype Inheritance
Lecture 34 Copy Through Serialization
Lecture 35 Summary
Section 5: Singleton
Lecture 36 Overview
Lecture 37 Singleton Implementation
Lecture 38 Testability Issues
Lecture 39 Singleton in Dependency Injection
Lecture 40 Monostate
Lecture 41 Per-Thread Singleton
Lecture 42 Ambient Context
Lecture 43 Summary
Section 6: Adapter
Lecture 44 Overview
Lecture 45 Vector/Raster Demo
Lecture 46 Adapter Caching
Lecture 47 Generic Value Adapter
Lecture 48 Adapter in Dependency Injection
Lecture 49 Summary
Section 7: Bridge
Lecture 50 Overview
Lecture 51 Bridge
Lecture 52 Summary
Section 8: Composite
Lecture 53 Overview
Lecture 54 Geometric Shapes
Lecture 55 Neural Networks
Lecture 56 Composite Specification
Lecture 57 Summary
Section 9: Decorator
Lecture 58 Overview
Lecture 59 Custom String Builder
Lecture 60 Adapter-Decorator
Lecture 61 Multiple Inheritance with Interfaces
Lecture 62 Multiple Inheritance with Default Interface Members
Lecture 63 Dynamic Decorator Composition
Lecture 64 Detecting Decorator Cycles
Lecture 65 Static Decorator Composition
Lecture 66 Decorator in Dependency Injection
Lecture 67 Summary
Section 10: Façade
Lecture 68 Overview
Lecture 69 Façade
Lecture 70 Summary
Section 11: Flyweight
Lecture 71 Overview
Lecture 72 Repeating User Names
Lecture 73 Text Formatting
Lecture 74 Summary
Section 12: Proxy
Lecture 75 Overview
Lecture 76 Protection Proxy
Lecture 77 Property Proxy
Lecture 78 Value Proxy
Lecture 79 Composite Proxy: SoA/AoS
Lecture 80 Composite Proxy with Array-Backed Properties
Lecture 81 Dynamic Proxy for Logging
Lecture 82 Proxy vs. Decorator
Lecture 83 ViewModel
Lecture 84 Bit Fragging
Lecture 85 Summary
Section 13: Chain of Responsibility
Lecture 86 Overview
Lecture 87 Command Query Separation
Lecture 88 Method Chain
Lecture 89 Broker Chain
Lecture 90 Summary
Section 14: Command
Lecture 91 Overview
Lecture 92 Command
Lecture 93 Undo Operations
Lecture 94 Composite Command
Lecture 95 Summary
Section 15: Interpreter
Lecture 96 Overview
Lecture 97 Handmade Interpreter: Lexing
Lecture 98 Handmade Interpreter: Parsing
Lecture 99 ANTLR
Lecture 100 Summary
Section 16: Iterator
Lecture 101 Overview
Lecture 102 Iterator Object
Lecture 103 Iterator Method
Lecture 104 Iterators and Duck Typing
Lecture 105 Array-Backed Properties
Lecture 106 Summary
Section 17: Mediator
Lecture 107 Overview
Lecture 108 Chat Room
Lecture 109 Event Broker
Lecture 110 Introduction to MediatR
Lecture 111 Summary
Section 18: Memento
Lecture 112 Overview
Lecture 113 Memento
Lecture 114 Undo and Redo
Lecture 115 Memento for Interop
Lecture 116 Summary
Section 19: Null Object
Lecture 117 Overview
Lecture 118 Null Object
Lecture 119 Null Object Singleton
Lecture 120 Dynamic Null Object
Lecture 121 Summary
Section 20: Observer
Lecture 122 Overview
Lecture 123 Observer via the ‘event’ Keyword
Lecture 124 Weak Event Pattern
Lecture 125 Observer via Special Interfaces
Lecture 126 Observable Collections
Lecture 127 Bidirectional Observer
Lecture 128 Property Dependencies
Lecture 129 Declarative Event Subscriptions with Interfaces
Lecture 130 Summary
Section 21: State
Lecture 131 Overview
Lecture 132 Classic Implementation
Lecture 133 Handmade State Machine
Lecture 134 Switch-Based State Machine
Lecture 135 Switch Expressions
Lecture 136 State Machine with Stateless
Lecture 137 Summary
Section 22: Strategy
Lecture 138 Overview
Lecture 139 Dynamic Strategy
Lecture 140 Static Strategy
Lecture 141 Equality and Comparison Strategies
Lecture 142 Summary
Section 23: Template Method
Lecture 143 Overview
Lecture 144 Template Method
Lecture 145 Functional Template Method
Lecture 146 Summary
Section 24: Visitor
Lecture 147 Overview
Lecture 148 Intrusive Visitor
Lecture 149 Reflective Visitor
Lecture 150 Classic Visitor (Double Dispatch)
Lecture 151 Reductions and Transforms
Lecture 152 Dynamic Visitor via the DLR
Lecture 153 Acyclic Visitor
Lecture 154 Summary
Section 25: Course Summary
Lecture 155 Creational Paterns Summary
Lecture 156 Structural Patterns Summary
Lecture 157 Behavioral Patterns Summary
Lecture 158 End of Course
Section 26: Additional Lectures
Lecture 159 Duck Typing Mixins
Lecture 160 An ASCII C# String
Lecture 161 Continuation Passing Style
Lecture 162 Local Inversion of Control
Lecture 163 DI Container and Event Broker Integration
Lecture 164 Beyond the Elvis Operator
Lecture 165 CQRS and Event Sourcing
Section 27: Functional Patterns in F#
Lecture 166 Overview
Lecture 167 Builder
Lecture 168 Decorator
Lecture 169 Factory
Lecture 170 Interpreter
Lecture 171 Strategy
Lecture 172 Template Method
Lecture 173 Summary
Beginner and experienced developers,Anyone interested in design patterns
Course Information:
Udemy | English | 20h 22m | 7.46 GB
Created by: Dmitri Nesteruk
You Can See More Courses in the Developer >> Greetings from CourseDown.com