
Explore design patterns in C# with professional examples, covering creational and structural patterns such as factory, abstract factory, singleton, prototype, builder, decorator, and facade, plus solid principles.
Explore creational design patterns that control object creation, including simple factory, factory method, abstract factory, singleton, prototype, and builder, to manage complexity and flexibility.
Explore the simple factory pattern by encapsulating object creation behind a factory method. See how CreateExam returns an IOnlineExam implemented by DotNet or Java, keeping clients unaware of concrete classes.
Demonstrates the simple factory pattern by implementing the IOnlineExam interface and concrete DotNet and Java classes, with a factory creating online exam objects.
Explore the factory method pattern by defining an interface for object creation and letting subclasses decide which concrete class to instantiate. Learn about the open-closed principle and decoupling.
Master the factory method pattern through an online exam implementation, building exam objects via specific exam factories for line and dot net exams, demonstrating extensibility.
Learn how the abstract factory pattern decouples client code from concrete products by creating families of related objects through a single interface, enabling easy extension.
Explore how the abstract factory pattern uses a widget factory to create related window and dialog products for different families, such as windows and mac style.
Learn the singleton pattern concepts in C# with real-world examples like a login service, a printer, and a team captain, plus lazy instantiation and double-checked locking.
Explore the singleton pattern in C# with private constructors, a single instance, and thread safety techniques including lock and double-check locking, highlighting performance trade-offs.
Compare static initialization and lazy instantiation in C# singletons, including private constructors, nested classes, and dotnet lazy initialization for on-demand, thread-safe instance creation.
Clone existing objects to create new instances efficiently using the prototype pattern, with a clone method on an abstract prototype and concrete customers like general and privileged with discounts.
Explore prototype pattern implementation by cloning general and privilege customers, creating copies, and applying discount logic to sale prices.
Explore the prototype pattern through shallow copy, creating a new object and copying non-static fields while shared references, like product details, remain linked; compare with the deep-copy behavior.
Explore the prototype pattern by implementing deep copy, cloning objects and ensuring both object references and nested details, like product details, are copied correctly.
Implement shallow and deep copies using the prototype pattern, exploring local copy, cloning, and copy methods on a customer object to manage references and duplicates.
Explore the builder pattern and fluent interface to address complex constructors and factory pitfalls, using a bank account example to build objects step by step with proper initialization.
Explore the builder pattern with a fluent interface to create a bank account object step by step, using chainable methods and a private constructor to produce final account.
Explore the builder pattern in C# using abstract interfaces and concrete builders to assemble complex objects like bank accounts. See how a director guides construction to produce different representations.
Explore the builder pattern in a bank account example, implementing interfaces and concrete builders to create saving and other account types via a director.
Get started with design patterns in C# by examining how to structure and build different classes, from simple to complex, and capture relationships between objects.
Explore adapter design pattern concepts by wrapping existing interfaces to work with a new interface, using inheritance and object references to adapt media players for new formats.
Learn the adapter design pattern in c# by implementing a media interface and bridging media player with a media package to enable seamless play functionality across components.
Explore the bridge design pattern by decoupling abstractions from implementations across two separate hierarchies, using abstract persistence to illustrate composition over inheritance in software design.
Explore the bridge design pattern in C# by separating abstractions from persistence implementations, enabling flexible persistence mechanisms from file to cloud and easy extension.
Explore the composite design pattern concepts, detailing how composites and leaves form hierarchical structures, perform operations, and manage child components in real-world examples like file systems.
Explore the composite design pattern through a practical html-like hierarchy of parent and child tags, implementing components, leaves, and composites with add, remove, and getChildren methods.
This lecture demonstrates implementing the composite design pattern in C# by building a component and composite with add and remove child operations, and using recursion to display an HTML structure.
Apply the composite design pattern in a C# client by building a component hierarchy with leaves and composites, managing children, and traversing to print the structured tree.
Explore how the decorator design pattern extends a component's behavior by wrapping it with additional features, enabling dynamic feature addition without changing existing code or heavy inheritance.
Explore the decorator design pattern through a practical car racing app and window components, showing how wrapping a base component with decorators adds features without inheritance.
Implement the decorator design pattern in a car racing app by wrapping a core car component with decorators that add features like speed and number of cars.
Explore the facade design pattern concepts, using a primary face that simplifies interactions with multiple subsystems like mortgage, loan, and credit checks, by consolidating behavior behind a single interface.
Showcases the facade design pattern by unifying access to multiple subsystems, such as a report generator, to simplify client code and reduce system complexity.
Learn the proxy design pattern by examining how a proxy controls access to a real object, including virtual proxies and on-demand initialization to optimize resource use.
Explore remote proxy concepts within the C# design pattern through professional examples. Analyze how proxies manage remote interactions and illustrate practical implementations.
Explore the remote proxy in .NET remoting concepts, explaining how a proxy mediates access to remote objects. Understand how the underlying channels and infrastructure enable remote communication.
Implement a remote proxy in C# to act as the subject, enabling on-demand report generation through a proxy, remote object, and channel.
Explore the virtual proxy pattern in C# with a class diagram and a blog post example. See how a proxy defers heavy work and forwards requests to reduce costs.
Explore the virtual proxy design pattern in C# through a practical implementation that demonstrates lazy creation of blog posts and efficient post loading.
Discover the protection proxy concept and its class diagram in C#, using professional examples to show how a proxy enforces security and controls access.
Explore the protection proxy pattern in C# by implementing a manager as a proxy to control report generation, ensuring only the manager can generate the report.
Explore design patterns in C# with professional examples, showing memory capture and release of two objects, and how data sequencing and simple configuration improve flexibility.
Explore the chain of responsibility pattern by modeling a request passing through a chain of handlers, from supervisor to next receiver, until an appropriate handler acts.
Learn the chain of responsibility pattern in C# through an ATM withdraw example, implementing and connecting handlers that pass or handle withdrawal requests across the chain.
Explore the command design pattern concepts, illustrating how a customer places an order that moves through a waiter to an invoker and a receiver.
Demonstrate the command design pattern with a calculator application, showing the receiver, command object, and concrete commands that execute arithmetic operations.
Explore the command design pattern through an implementation example using a calculator application in C#.
Explore the interpreter design pattern concepts, focusing on domain modeling, the role of context, and the use of abstract expressions. See how context informs interpretation.
illustrate the interpreter design pattern using a class diagram to convert roman numerals to numbers, building a context and abstract syntax tree that drives the conversion logic.
Learn the interpreter design pattern by implementing an abstract expression hierarchy and a context to convert roman numerals to numbers in C#.
Explore iterator design pattern concepts by examining collections, such as lists and dictionaries, and learn how to access items sequentially through iterator-like structures with clear, practical examples.
Explore the iterator design pattern through a class diagram by iterating blog posts with an aggregate and iterator interface, using next to traverse posts.
Explore the iterator design pattern through a practical blog post reader implementation, iterating posts in a blog using a block collection and simple director logic.
Explore the mediator design pattern to decouple interacting objects by routing communications through a central mediator, illustrated with an air traffic controller example.
Explore the mediator design pattern, modeling communication through a ChatMediator class diagram, with an interface and concrete implementations to broadcast messages.
Explore how the mediator design pattern coordinates communication, illustrating a chat mediator scenario where messages broadcast through a mediator reduce direct coupling.
Explore the memento design pattern concepts by saving and restoring object states to enable undo functionality and maintain state across operations in professional C# examples.
Explore the memento design pattern through an implementation using an originator, caretaker, and memento to save and restore file contents at a savepoint.
Explore the observer design pattern with a subject that notifies multiple subscribers when its state changes, illustrated by concepts and a class diagram.
Implement the observer pattern in c# with a product subject and customer observers, enabling automatic notifications when the product is available.
Discover why solid principles matter, how design patterns fit in, and how to spot dirty code with checkpoints that highlight coupling and proper pattern placement.
Explore how solid principles guide cleaner, more maintainable C# code through real-world design patterns, such as the observer pattern, emphasizing responsibilities, reducing duplication, and refactoring benefits.
Explore the solid acronym and the single responsibility principle in c# design, with real-life examples that show how design and dependency decisions shape maintainable software.
Explore the single responsibility principle and how separating concerns leads to smaller classes, each responsible for a specific knowledge area in design patterns.
Analyze how a loan application example violates the single responsibility principle and demonstrates SRP in design. Preview the open/closed principle as the next step toward maintainable code.
Analyze how duplicate logic in a loan application violates the open-closed principle, and explore refactoring via interfaces to achieve extensibility while preserving single responsibility.
Explore applying the single responsibility principle and open-closed principle in a C# loan application, using interfaces and multiple loan types to build extensible, maintainable code.
Explore the Liskov substitution principle through polymorphism, showing how derived types should replace base types without breaking interfaces or behavior.
Explore how the Liskov substitution principle applies when adding an EducationalLoan to an existing LoanApplication, using interfaces, abstract classes, and concrete loan types to model repayments and interest calculations.
Explore interface segregation as a solution to LSP issues by splitting interfaces into focused, rule-based obligations and aligning class designs with practical, maintainable contracts.
Explore dependency inversion in C# by decoupling message delivery with a messenger interface, enabling English or French implementations and ensuring high level logic stays independent of concrete messaging classes.
Thank you and congratulations on completing the course; plan ahead to start a project to explore design patterns in C# based on the context of requirements, incorporating your feedback.
Creational Design Pattern
1. Simple Factory - Creation of object by using "CreateExam" Method for OnlineExam.
2. Factory Method - Creation of object by using ConcreteFactory subclasses for OnlineExam.
3. Abstract Factory - Creation of object for Window and Dialog with respect to different OS by using AbstractWidgetFactory.
4. Singleton - Generic example to understand the concepts, example of static initialization and double lock checking.
5. Prototype - Creation prototype object at run time for GeneralCustomer and PrevilegeCustomer.
6. Builder - Creation of object in series of steps by using Fluent Interface and Bank builder for BankAccount.
Structural Design Pattern
1. Adapter - Adapter used in between Mediaplayer and Mediapackage
2. Bridge - Example Used - Bridge used in between persistence mechanism and file types.
3. Composite - Example Used - HTML tree structure with parent and child element.
4. Decorator - Example Used - Decorating CarRacing application with stage progression.
5. Facade - FacadeReportGenerator for different type of DB.
6. Proxy - Example used for remote proxy, virtual proxy and protection proxy through restaurant application.
Behavioral Design Pattern
1. Chain of Responsibility - ATMWithdraw application for different denominator of Indian rupees.
2. Command - Calculator Application with redo and undo features.
3. Interpreter - Convert Roman number to number.
4. Iterator - Iterating posts of blog.
5. Mediator - ChatMediator for different category of users.
6. Memento - Savepoint with file contents so that go back to previous save point.
7. Observer - Notify all customers when product is available
Solid Principle
1. Checkpoint to see dirty code.
2. Should we give importance to Solid Principle.
3. Acronym of SOLID.
4. SRP Concetps with violation - Example Used : Loan Application
5. OCP : Used open and closed principle in Loan Application
6. LSP : Violation of LSP after adding Educational Loan to Loan Application.
7. ISP : Provide solution to LSP violation in the form of ISP.
8. DIP : Used English and French messenger to understand the concepts in Loan Application.