
Explore how the factory method and abstract factory patterns create database objects via interfaces, enabling lazy loading of connections and commands for sequel server and Lady B databases.
Discover how the prototype pattern creates objects by cloning a prototype, and implement clone methods in .NET to create shallow or deep copies of complex objects like users with addresses.
Demonstrate the singleton pattern with a thread-safe exception handler that uses a private constructor, lazily creates a single instance with a lock, and writes logs to a file.
Explore the composite pattern for part–whole hierarchies, with tree structures and uniform treatment of assemblies and parts, including add, remove, and write parts list.
Explore the decorator pattern to add memory and storage options to a base object dynamically, using a decorator that wraps a component and overrides get price and get option code.
Explore the decorator pattern by building a computer ordering system, where base computer and decorators add RAM, storage, and a discount to update option codes, prices, and the model number.
Demonstrates the chain of responsibility by building a three-stage approver chain (engineering, purchasing, finance) to approve material based on drawing and part numbers and budget, with next links and reasons.
Explore the command pattern to decouple the application from method calls by using a common command interface, an invoker, and concrete commands that set properties such as color.
Learn how the mediator pattern isolates object communication by centralizing messaging with a mediator that registers colleagues, posts messages to all, and enables them to receive messages.
Explore the memento design pattern to enable undo and transaction rollback by capturing an object's internal state while preserving encapsulation, using originator, memento, and caretaker.
Explore the observer pattern that notifies multiple observers automatically when a subject's data changes, with subscribe, unsubscribe, and notify mechanisms for price or data view updates.
Explore the observer pattern with a price tracker that notifies observers when a price changes. Subscribe and unsubscribe observers, and handle updates through a price changed event.
Apply the state pattern to manage user login state and type, routing to login, standard, or premium pages, with log in, log out, and upgrade handled via encapsulated state transitions.
Explore the template pattern by implementing an abstract data logger template with concrete file and Windows Event Log loggers, and override log data for each destination.
Build an ASP.NET MVC project in Visual Studio, exploring models, views, and controllers. Learn to implement read/write actions, routing, and razor views with a demo customer data flow.
In this Learning C# Design Patterns training course, expert author Keith Welch will teach you about design patterns, and how to use them to create reusable, maintainable code. This course is designed for users that already have experience with C#, as well as basic object-oriented programming principles.
You will start by learning about creational patterns, including abstract factory, builder, prototype, and singleton. From there, Keith will teach you about structural patterns, such as adapter, bridge, composite, and facade. This video tutorial also covers behavioral patterns, such as chain of responsibility, common, iterator, and mediator. Finally, you will learn about the Model View Controller (MVC) design pattern.
Once you have completed this computer based training course, you will be fully capable of using these 23 design patterns to create your own C# code. Working files are included, allowing you to follow along with the author throughout the lessons.