Tactical Design Patterns in .NET: Managing Responsibilities

Applying a design pattern to a real-world problem is not as straightforward as literature implicitly tells us. It is a more engaged process. This course gives an insight into tactical decisions we need to make when applying design patterns that have to do with separating and implementing class responsibilities.
Course info
Rating
(509)
Level
Intermediate
Updated
March 26, 2015
Duration
4h 49m
Table of contents
The Right Time to Apply a Design Pattern
Cascading Factories to Eliminate Dependencies
Real World Composition Pitfalls
Compositing the Control Role
Object Composition Using Chain of Responsibility
Visitor Design Pattern and Encapsulation
Calling Protocols and the Visitor
Using Mixin to Move Responsibilities Out
Description
Course info
Rating
(509)
Level
Intermediate
Updated
March 26, 2015
Duration
4h 49m
Description

Textbooks and courses explain a design pattern by highlighting a situation, then providing a convenient solution: the pattern. There is nothing wrong with this when documenting a design pattern. The problem comes when the same sequence of steps is applied to recognize the design pattern directly from the requirements. The request is then captured in terms of a well-known design pattern. The design becomes rigid and unable to answer to changes in requirements. In this course on design patterns, students are actively pursued to not apply design patterns up-front. Design patterns come the other way around. Once a tailored solution is designed, parts of the design start exhibiting behavior which is a known hallmark of a certain design pattern. Only then do we change the design to accommodate the design pattern, and only because we have discovered the pattern in actual design. The key point is that a design pattern comes last to the design. Always with a relief; sometimes with a huge surprise in the form of a breakthrough.

About the author
About the author

Zoran Horvat is Principal consultant at Coding Helmet Consultancy, speaker and author of 100+ articles, and independent trainer on .NET technology stack.

More from the author
Writing Purely Functional Code in C#
Advanced
4h 14m
23 May 2018
Making Your C# Code More Functional
Intermediate
3h 54m
24 Jan 2018
Advanced Defensive Programming Techniques
Intermediate
6h 22m
25 Aug 2017
More courses by Zoran Horvat