Software Design Patterns in C#

Introduction Download
Course Outline Outline
Reading Material Download
C# IDE
Useful Links
DayModulesSharing
1

Introduction:

  • Why do we need Design Pattern?
  • A bit of the history
  • Good software practices and principles
  • The Gang of Four (GoF)
  • Overview of the Design Patterns
  • Essential software engineering disciplines
  • How patterns are documented?
  • Class
  • Abstract Class
  • Interface
  • Aggregation & Composition
  • Multiplicity
  • Association
  • Role
  • Attributes
  • Operations and Methods
  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Façade
  • Flyweight
  • Prox
  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor
  • Inheritance
  • Polymorphism
  • Abstract Classed and Methods
  • Interfaces
  • Access Modifiers
2

Creational Patterns:

  • Creating Singleton Using a Static Method
  • Exceptions and Instances
  • Throwing the Exception
  • Creating an Instance of the Class
  • Providing a Global Point of Access to a Singleton
  • Example in C#
  • When to Use a Factory Method?
  • Example in C#
  • How a Simple Factory Works?
  • Building the Simple Factory
  • Using the Factory
  • Consequences of Abstract Factory
  • Example in C#
  • How a Builder Works?
  • Consequences of the Builder Pattern
  • Example in C#
  • Using the Prototype
  • Deep Vs Shallow copy
  • Cloning the Class
  • Using the Prototype Pattern
  • Dissimilar Classes with the Same Interface
  • Prototype Managers
  • Consequences of the Prototype Pattern
  • Example in C#

Patterns

Excercises

3

Structural Patterns:

  • Basic understanding of GC based system
  • An Implementation of a Composite
  • Doubly Linked Lists
  • Consequences of the Composite Pattern
  • A Simple Composite
  • Example in C#
  • Handling events in a Decorator
  • Layout Considerations
  • Multiple Decorators
  • Decorators, Adapters, and Composites
  • Example in C#
  • What Constitutes the Façade?
  • Consequences of the Façade
  • Example in C#
  • Making an Adapter
  • The Class Adapter
  • Two-Way Adapters
  • Pluggable Adapters
  • Example in C#
  • Copy-on-Write
  • Comparison with Related Patterns
  • Example in C#
  • Extending the Bridge
  • Windows Forms as Bridges
  • Consequences of the Bridge Pattern
  • Example in C#
  • Sharable Objects
  • Copy-on-Write Objects
  • Intrinsic and extrinsic
  • Example in C#

Patterns

Excercises

4

Bahevioural Patterns:

  • Applicability
  • Consequences of the Chain of Responsibility
  • Example in C#
  • Motivation
  • Command Objects
  • Building Command Objects
  • Consequences of the Command Pattern
  • Example in C#
  • Motivation
  • Applicability
  • State machine
  • Objects Used in Parsing
  • Regular Expression
  • Example in C#
  • Motivation
  • Consequences of the Iterator Pattern
  • Iterators in C# collections classes
  • Example in C#
  • Interactions Between Controls
  • Initialization of the System
  • Mediators and Command Objects
  • Consequences of the Mediator Pattern
  • Single Interface Mediators
  • Implementation Issues
  • Example in C#
  • Motivation
  • Implementation
  • Providing Undo
  • Command Objects in the User Interface
  • Example in C#

Patterns

Excercises

5
  • “Don’t call me, I will call you” model
  • Consequences of the Observer Pattern
  • Event-Handler model in .NET
  • Example in C#
  • Switching Between States
  • How the Mediator Interacts with the State Manager?
  • Consequences of the State Pattern
  • Example in C#
  • Motivation
  • The Context
  • The Program Commands
  • Example in C#
  • Motivation
  • Kinds of Methods in a Template Class
  • Templates and Callbacks
  • Summary and Consequences
  • Example in C#
  • Motivation
  • When to Use the Visitor Pattern
  • Visiting the Classes
  • Visiting Several Classes
  • Catch-All Operations with Visitors
  • Double Dispatching Issue
  • Traversing a Series of Classes
  • Consequences of the Visitor Pattern
  • Example in C#
  • Overall structure of the design pattern catalogue
  • Classification of relationships
  • Categories of relationships
  • Modifying relationships and design patterns

Patterns

Excercises


Other C# related Courses you might be interested
SE002 The Practice of Writing Excellent Code
SE001OOT Introduction Basic Object-Oriented Concepts
SE005CS High Performance C#
SE012CS Defensive Programming in C#
SE013CS Refactoring to Patterns using C#
AI001 Programming with Artificial Intelligence Techniques

Recommanded Books
TitleImplementing Design Patterns in C# 11 and .NET 7: Learn how to design and develop robust and scalable applications using design patterns
ISBN978-9-355-51733-3
AuthorMalavasi Cardoso, Alexandre F.
Year2024
Publisher BPB Publications
TitleDesign Patterns in .NET 6: Reusable Approaches in C# and F# for Object-Oriented Software Design
ISBN978-1-484-28244-1
AuthorDmitri Nesteruk
Year2022
Publisher Apress
TitleReal-World Implementation of C# Design Patterns: Overcome daily programming challenges using elements of reusable object-oriented software
ISBN978-1-803-24273-6
AuthorBruce M. Van Horn II
Year2022
Publisher Packt Publishing
TitleDesign Patterns in .NET Core 3: Reusable Approaches in C# and F# for Object-Oriented Software Design
ISBN978-1-484-26179-8
AuthorDmitri Nesteruk
Year2021
Publisher Apress
TitleDesign Patterns in C#: A Hands-on Guide with Real-world Examples
ISBN978-1-484-26061-6
AuthorVaskaran Sarcar
Year2020
Publisher Apress
TitleHands-On Design Patterns with C# and .NET Core
ISBN978-1-789-13364-6
AuthorGaurav Aroraa and Jeffrey Chilberto
Year2019
Publisher Packt
TitleDesign Patterns in .NET: Reusable Approaches in C# and F# for Object-Oriented Software Design
ISBN978-1-484-24365-7
AuthorDmitri Nesteruk
Year2019
Publisher Apress
TitleDesign Patterns in C#
ISBN
AuthorDmitri Nesteruk
Year2018
Publisher leanpub.com
Title.NET Design Patterns
ISBN978-1-786-46615-0
AuthorPraseed Pai, Shine Xavier
Year2017
Publisher Packt Publishing
TitleC# Design Pattern Essentials
ISBN978-0-956-57586-9
AuthorTony Bevis
Year2012
Publisher Ability First Limited