МАТЕМАТИКА, КОМПЮТЪРНИ НАУКИ И ОБРАЗОВАНИЕ
ВЕЛИКОТЪРНОВСКИ УНИВЕРСИТЕТ "СВ. СВ. КИРИЛ И МЕТОДИЙ" - УНИВЕРСИТЕТСКО ИЗДАТЕЛСТВО

Имплементация на шаблоните за софтуерен дизайн посредник (mediator) и CQRS с библиотеката mediatr в .NET


Автори:
Пламенна Петрова Великотърновски университет „Св. св. Кирил и Методий“, България
Златко Върбанов Великотърновски университет „Св. св. Кирил и Методий“

Страници: 75-82
DOI: https://doi.org/10.54664/URDG9808

Резюме:


This paper explores the features of the popular open-source library from the .NET ecosystem MediatR, which implements the behavioral software design pattern Mediator to achieve loose coupling and better communication between the components of developed applications. It introduces an ‘in-process’ mediator, which aids in building systems, based on the Command and Query Responsibility Segregation software design pattern (CQRS). The MediatR library offers the ability to handle both synchronous and asynchronous requests, responses, commands, notifications, and events. It provides a straightforward approach for managing command and request handlers, simplifying the adoption of CQRS. Using the MediatR library improves the modularity and testability of .NET applications by promoting adherence to SOLID principles in the code structure. This facilitates complex interactions between different parts of applications, the integration of new functionalities and the maintenance of existing ones.


Ключови думи:

Software Design Patterns, GoF, Mediator, Command and Query Responsibility Segregation (CQRS), MediatR, .NET, C#, API, SOLID principles, Domain-driven Design (DDD), Clean Architecture, Separation of concerns.

Изтегляне


130 изтегляния от 9.12.2024 г.