In my previous post, I described how historical trends shaped our (or at least my) perception of software architecture.
However, with experience and seniority, you learn that code architecture always depends on a variety of context-dependent factors. This is something AI cannot help you with. A human must always establish the direction, depending on human factors such as company culture, team dynamics, formalization of work, responsibilities, and the software life cycle.
The best code architecture I have encountered so far doesn't have a name yet. It is a mix of various concepts taken from different architectural patterns.
Domain as a Flat List of Functions
When you use the mediator pattern, you are basically using a service locator. Writing CreateUserCommand and CreateUserCommandHandler is fundamentally the same thing as writing ICreateUserService and/or CreateUserService with a single CreateUser method.









