Tree Of A Kind is a multi-platform system supporting the creation of a family tree.
Modules of application are separated. It allows to maintain low coupling, and as a result, allows easy testing and swapping (eg. swapping database or ORM), because the business layer is fully independent of implementation.
We are using the MediatR library to separate API from the Application layer. Requests are segregated into two types: commands and queries, this allows for separation of the read and write model. Both types are handled by corresponding handlers.
In the application layer pipeline, commands and queries are validated and checked for authorization. Validators and authorizers are injected by DI container which finds them during application startup by assembly scanning.
using FluentValidation;
namespace TreeOfAKind.Application.Command.Trees.TreeAdministration.AddTreeOwner
{
public class AddTreeOwnerCommandValidator : AbstractValidator<AddTreeOwnerCommand>
{
public AddTreeOwnerCommandValidator()
{
RuleFor(x => x.AddedPersonMailAddress)
.EmailAddress()
.WithMessage("Provided string is not proper e-mail address");
}
}
}
After business layer operation. Events published by domain objects are aggregated and send by MediatR. This allows for adding Domain Event Handlers on a basis of PUB-SUB, which further separates business logic from implementation. We have used this functionality to add sending welcoming messages to newly registered users.
Events from the application are logged to DataDog:
Traces of the machines are also aggregated in DataDog service, which provides a clear view on servers response times and allows further analysis:
My full name is Esteban Julio Ricardo Montoya de la Rosa Ramírez.
~ Esteban Julio Ricardo Montoya de la Rosa Ramírez, The Suite Life of Zack and Cody