Tag Archives: Design Patterns

Design Patterns – Singleton

By | 21/10/2020

From Wikipedia:“In software engineering, the singleton pattern is a software design pattern that restricts the instantiation of a class to one ‘single’ instance. This is useful when exactly one object is needed to coordinate actions across the system. The term comes from the mathematical concept of a singleton.“ In this post, we will see how to implement this pattern in a .NET Console application. We… Read More »

C# – SOLID Principles

By | 29/04/2020

In this post, we will see what SOLID means and how to implement it using C#. SOLID is a mnemonic acronym for five designers principles that help us to write software more understandable, easier to maintain, flexible and easier to extend.The five principles are:Single responsibility principleOpen/closed principleLiskov substitution principleInterface segregation principleDependency inversion principle  SINGLE RESPONSABILITY… Read More »

Design Patterns – Repository and Unit of Work

By | 03/12/2019

From Microsoft Web Site:“The repository and unit of work patterns are intended to create an abstraction layer between the data access layer and the business logic layer of an application. Implementing these patterns can help insulate your application from changes in the data store and can facilitate automated unit testing or test-driven development (TDD)“. In… Read More »

Design Patterns – Factory

By | 23/09/2019

From https://en.wikipedia.org/wiki/Factory_method_pattern:“In class-based programming, the factory method pattern is a  creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally… Read More »