A comprehensive guide that takes you on a journey through the world of design patterns in .NET, empowering you to create software that is not only robust and efficient but also maintainable, scalable, and testable.
Develop a solid understanding of object-oriented programming (OOP) principles, including inheritance, encapsulation, and polymorphism, forming the groundwork for well-structured code. Explore creational design patterns like Factory and Abstract Factory, mastering object instantiation, and delve into structural patterns such as Adapter and Composite, governing object composition. Navigate the intricacies of behavioral patterns like Template Method and Observer to control object interaction effectively. Unravel the mysteries of SOLID principles: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion for building maintainable, scalable, and testable code.
This book can give you an insight into how modern software is written, what problems software developers face in their everyday work, and how they solve them by simplifying the design and structure of the code. After reading this book, you will become a better developer who can talk freely with more experienced colleagues and easily solve complex tasks with minimum effort.
Author(s): Yaroshenko, Timur;
Publisher: BPB Publications
Year: 2024
Language: English
Pages: 314
Cover
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgement
Preface
Table of Contents
1. Main OOP Standpoints
Introduction
Structure
Objectives
Inheritance
Polymorphism
Encapsulation
Main OOP standpoints in .NET
Interfaces
Abstract classes
Generics
Extension methods
Partial classes
Conclusion
2. Creational Design Patterns: Factory, and Builder
Introduction
Structure
Objectives
Factory
Designing the processing pipeline
Code
Abstract Factory
Designing the processing event hub
Code
Builder
Designing the processing event hub
Code
Synergy of the patterns
Code
Conclusion
3. Creational Design Patterns: Singleton and Prototype
Introduction
Structure
Objectives
Singleton
Designing the configuration provider
Design
Code
Prototype
Designing a cloneable pipeline
Code
Synergy of the patterns
Adjusting the processing engine
Code
Conclusion
4. Structural Design Patterns: Adapter, Composite, and Flyweight
Introduction
Structure
Objectives
Adapter
Design interface to the outside world
Code
Composite
Design bulk processing pipeline
Code
Flyweight
Sharing a common state
Code
Adjusting the processing engine
Code
Conclusion
5. Structural Design Patterns: Object Composition
Introduction
Structure
Objectives
Proxy
Design the interface to outside world
Code
Facade
Code
Bridge
Ease of changes
Code
Decorator
Making functionality modular
Code
Synergy of the patterns
Adjusting the processing pipeline
Code
Conclusion
6. Object Behavioral Design Patterns
Introduction
Structure
Objectives
Template method
Simplify pipelines creation and design
Code
Strategy
Functionality split
Code
Chain of responsibility
Modularizing the pipeline
Code
Synergy of the patterns
Conclusion
7. Behavioral Design Patterns: Observer, Visitor, and State
Introduction
Structure
Objectives
Observer
System notifications mechanism
Code
Visitor
Collecting processing information
Code
State
Designing stateful system
Code
Conclusion
8. Behavioral Design Patterns: Mediator and Command
Introduction
Structure
Objectives
Mediator
Making a communication bus
Code
Command
Code
Conclusion
9. Behavioral Design Patterns: Interpreter, Iterator, and Memento
Introduction
Structure
Objectives
Interpreter
Language is a key
Code
Iterator
Implementing the Enumeration concept
Code
Memorizing events
Code
Conclusion
10. The SOLID Principles
Introduction
Structure
Objectives
What are these principles for
Brief description of principles
Single Responsibility Principle
Open/Closed Principle
Liskov Substitution Principle
Interface Segregation Principle
Dependency Inversion Principle
Secondary principles
How to use principles
Conclusion
11. Inversion of Control in .NET Core
Introduction
Structure
Objectives
Overview of IoC
.NET Core provided services
Design services for Dependency Injection
Adopt pipelines to .NET IoC
Code
Conclusion
Index