Software Design Patterns

Software Design Patterns for C#


Course Outline Outline
Software Installation ArgoUML: IDE:
Reading Material
Useful References
DayModuleSharing
1
  • 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
  • How a Simple Factory Works?
  • Building the Simple Factory
  • Using the Factory
  • Consequences of Abstract Factory
  • Example
  • How a Builder Works?
  • Consequences of the Builder Pattern
  • Example
  • When to Use a Factory Method?
  • Example
  • 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
  • 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

Patterns

Excercises

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

Patterns

Excercises

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

Patterns

Excercises

5
  • “Don’t call me, I will call you” model
  • Consequences of the Observer Pattern
  • Event-Handler model in .NET
  • Example
  • Switching Between States
  • How the Mediator Interacts with the State Manager?
  • Consequences of the State Pattern
  • Example
  • Motivation
  • The Context
  • The Program Commands
  • Example
  • Motivation
  • Kinds of Methods in a Template Class
  • Templates and Callbacks
  • Summary and Consequences
  • Example
  • 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
  • Overall structure of the design pattern catalogue
  • Classification of relationships
  • Categories of relationships
  • Modifying relationships and design patterns

Patterns

Excercises


Recommanded Books
TitleSoftware Design Patterns: The Ultimate Guide
ISBN978-1-032-31177-7
AuthorSufyan bin Uzayr
Year2023
Publisher CRC Press
TitleHands-On System Design: Learn System Design, Scaling Applications, Software Development Design Patterns with Real Use-Cases
ISBN978-9-355-51236-9
AuthorHarsh Kumar Ramchandani
Year2022
Publisher BPB Publications
TitleHead First Design Patterns: Building Extensible and Maintainable Object-Oriented Software
ISBN978-1-492-07800-5
AuthorEric Freeman, Elisabeth Robson
Year2020
Publisher O’Reilly Media
TitleDive Into Design Patterns
ISBN
AuthorAlexander Shvets
Year2019
Publisher
TitleSoftware development, Design and Coding: with patterns, debugging, unit testing, and refactoring
ISBN978-1-484-23152-4
AuthorDooley, John F
Year2018
Publisher Apress
TitleDesign Patterns Explained Simply
ISBN
AuthorAlexander Shvets
Year2013
Publisher
TitleDesign Patterns
ISBN978-1-598-22031-5
AuthorChristopher G. Lasater
Year2006
Publisher Jones & Bartlett Learning
TitleDesign Patterns Explained: A New Perspective on Object-Oriented Design
ISBN978-0-201-71594-1
AuthorAlan Shalloway, James Trott
Year2001
Publisher Addison-Wesley Professional
TitleDesign Patterns Elements of Reusable Object-Oriented Software
ISBN978-0-201-63361-0
AuthorErich Gamma, Richard Helm, Ralph Johnson, John Vlissides
Year1994
Publisher Addison-Wesley
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