Mô tả

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 framework
  • Use of modern programming approaches: dependency injection, reactive programming and more
  • Use of modern developer tools such as ReSharper
  • Discussions 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 Principle
  • Creational Design Patterns: Builder, Factories (Factory Method and Abstract Factory), Prototype and Singleton
  • Structrural Design Patterns: Adapter, Bridge, Composite, Decorator, Façade, Flyweight and Proxy
  • Behavioral 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.


Bạn sẽ học được gì

Recognize and apply design patterns

Refactor existing designs to use design patterns

Reason about applicability and usability of design patterns

Yêu cầu

  • Good understanding of C#
  • Familiarity with latest C# features
  • Good understanding of object-oriented design principles

Nội dung khoá học

28 sections

Introduction

1 lectures
Introduction
07:12

The SOLID Design Principles

7 lectures
Overview
01:16
Single Responsibility Principle
07:29
Open-Closed Principle
17:24
Liskov Substitution Principle
06:37
Interface Segregation Principle
06:33
Dependency Inversion Principle
11:11
Summary
05:25

Builder

11 lectures
Gamma Categorization
03:36
Overview
01:43
Life Without Builder
03:34
Builder
09:06
Fluent Builder
01:16
Fluent Builder Inheritance with Recursive Generics
12:37
Stepwise Builder
09:00
Functional Builder
10:19
Faceted Builder
11:11
Builder Coding Exercise
1 question
Summary
00:57

Factories

11 lectures
Overview
02:22
Point Example
04:38
Factory Method
05:03
Asynchronous Factory Method
05:01
Factory
02:59
Object Tracking and Bulk Replacement
12:01
Inner Factory
05:41
Abstract Factory
11:21
Abstract Factory and OCP
09:52
Factory Coding Exercise
1 question
Summary
01:05

Prototype

8 lectures
Overview
01:59
ICloneable is Bad
07:37
Copy Constructors
03:55
Explicit Deep Copy Interface
02:34
Prototype Inheritance
20:24
Copy Through Serialization
09:05
Prototype Coding Exercise
1 question
Summary
01:08

Singleton

9 lectures
Overview
02:43
Singleton Implementation
08:40
Testability Issues
07:22
Singleton in Dependency Injection
08:58
Monostate
03:46
Per-Thread Singleton
04:25
Ambient Context
12:26
Singleton Coding Exercise
1 question
Summary
02:15

Adapter

7 lectures
Overview
02:36
Vector/Raster Demo
08:35
Adapter Caching
06:04
Generic Value Adapter
25:18
Adapter in Dependency Injection
09:07
Adapter Coding Exercise
1 question
Summary
01:10

Bridge

4 lectures
Overview
02:50
Bridge
09:49
Bridge Coding Exercise
1 question
Summary
01:33

Composite

6 lectures
Overview
01:53
Geometric Shapes
07:33
Neural Networks
08:00
Composite Specification
05:58
Composite Coding Exercise
1 question
Summary
01:11

Decorator

11 lectures
Overview
02:34
Custom String Builder
06:19
Adapter-Decorator
06:33
Multiple Inheritance with Interfaces
08:40
Multiple Inheritance with Default Interface Members
07:44
Dynamic Decorator Composition
07:39
Detecting Decorator Cycles
22:02
Static Decorator Composition
09:30
Decorator in Dependency Injection
06:10
Decorator Coding Exercise
1 question
Summary
02:02

Façade

4 lectures
Overview
03:08
Façade
07:59
Facade Coding Exercise
1 question
Summary
01:25

Flyweight

5 lectures
Overview
05:24
Repeating User Names
12:29
Text Formatting
08:53
Flyweight Coding Exercise
1 question
Summary
00:58

Proxy

12 lectures
Overview
03:12
Protection Proxy
03:11
Property Proxy
09:24
Value Proxy
12:04
Composite Proxy: SoA/AoS
11:30
Composite Proxy with Array-Backed Properties
06:42
Dynamic Proxy for Logging
11:50
Proxy vs. Decorator
01:27
ViewModel
08:42
Proxy Coding Exercise
1 question
Bit Fragging
25:04
Summary
00:55

Chain of Responsibility

6 lectures
Overview
03:33
Command Query Separation
01:28
Method Chain
12:15
Broker Chain
13:50
Chain of Responsibility Coding Exercise
1 question
Summary
01:18

Command

6 lectures
Overview
03:06
Command
07:47
Undo Operations
06:05
Composite Command
12:11
Command Coding Exercise
1 question
Summary
01:09

Interpreter

6 lectures
Overview
04:00
Handmade Interpreter: Lexing
07:52
Handmade Interpreter: Parsing
12:05
ANTLR
02:44
Interpreter Coding Exercise
1 question
Summary
01:03

Iterator

7 lectures
Overview
01:42
Iterator Object
11:49
Iterator Method
06:57
Iterators and Duck Typing
04:06
Array-Backed Properties
05:51
Iterator Coding Exercise
1 question
Summary
01:28

Mediator

6 lectures
Overview
01:13
Chat Room
10:42
Event Broker
15:30
Introduction to MediatR
13:20
Mediator Coding Exercise
1 question
Summary
01:16

Memento

6 lectures
Overview
01:41
Memento
06:04
Undo and Redo
07:15
Memento for Interop
06:38
Memento Coding Exercise
1 question
Summary
01:17

Null Object

6 lectures
Overview
01:57
Null Object
08:53
Null Object Singleton
05:08
Dynamic Null Object
06:11
Null Object Coding Exercise
1 question
Summary
00:41

Observer

10 lectures
Overview
02:10
Observer via the 'event' Keyword
07:09
Weak Event Pattern
08:25
Observer via Special Interfaces
18:28
Observable Collections
09:45
Bidirectional Observer
14:48
Property Dependencies
13:30
Declarative Event Subscriptions with Interfaces
27:08
Observer Coding Exercise
1 question
Summary
00:56

State

8 lectures
Overview
03:08
Classic Implementation
12:32
Handmade State Machine
06:44
Switch-Based State Machine
06:38
Switch Expressions
08:49
State Machine with Stateless
05:37
State Coding Exercise
1 question
Summary
01:00

Strategy

6 lectures
Overview
01:50
Dynamic Strategy
08:25
Static Strategy
04:07
Equality and Comparison Strategies
07:41
Strategy Coding Exercise
1 question
Summary
00:26

Template Method

5 lectures
Overview
01:29
Template Method
07:22
Functional Template Method
03:38
Template Method Coding Exercise
1 question
Summary
00:45

Visitor

9 lectures
Overview
04:46
Intrusive Visitor
04:41
Reflective Visitor
09:10
Classic Visitor (Double Dispatch)
10:21
Reductions and Transforms
14:24
Dynamic Visitor via the DLR
07:11
Acyclic Visitor
12:01
Visitor Coding Exercise
1 question
Summary
01:09

Course Summary

4 lectures
Creational Paterns Summary
04:41
Structural Patterns Summary
06:13
Behavioral Patterns Summary
08:48
End of Course
00:54

Additional Lectures

7 lectures
Duck Typing Mixins
09:53
An ASCII C# String
13:58
Continuation Passing Style
11:06
Local Inversion of Control
17:42
DI Container and Event Broker Integration
10:11
Beyond the Elvis Operator
14:46
CQRS and Event Sourcing
26:42

Functional Patterns in F#

8 lectures
Overview
05:10
Builder
04:57
Decorator
04:39
Factory
08:15
Interpreter
09:58
Strategy
05:38
Template Method
10:06
Summary
02:55

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.