What is a design pattern?
A design pattern is a reusable conceptual solution to a recurring software-design problem. It describes relationships and responsibilities rather than providing code that must be copied exactly.
C# interview questions covering design patterns & production architecture.
Open a question for the full answer, code and interview guidance.
A design pattern is a reusable conceptual solution to a recurring software-design problem. It describes relationships and responsibilities rather than providing code that must be copied exactly.
The Factory Pattern centralizes object creation and hides the decision about which concrete implementation should be instantiated.
The Strategy Pattern defines interchangeable implementations of an algorithm or business rule behind a common contract.
The Repository Pattern provides an abstraction over data access and presents collection-like operations for domain or application code.
Unit of Work coordinates multiple data changes so they can be committed as one logical transaction.
The traditional Singleton Pattern ensures that a class controls creation of a single instance and exposes global access to it.
The Decorator Pattern wraps an existing implementation of an interface to add behavior without modifying the original implementation.
Clean Architecture organizes software so core business rules do not depend directly on frameworks, databases, UI technology, or external infrastructure.
Separation of concerns means dividing software so different responsibilities are handled by appropriate components.
A production ASP.NET Core application should have clear boundaries while remaining proportional to the application's complexity.