The Simplified Clean Architecture Model

Introduction

Today we will look at an application architecture design model, which I have refined from the well-known Clean Architecture Model. I have simplified it to make it more applicable and easier to understand for both smaller and larger applications. I will detail it at a higher level and the implementation can be used in any technology including .NET. So, let us begin.

The Model

Below is the overall layout of the model.

The Simplified Clean Architecture Model

We start with the Association Project. This is the project where the application begins, mostly it can be an MVC application, Razor Pages application or even a simple console application. It has a reference to every project as the Dependency Injection is defined in this project and hence it is called the Association project.

We also have an Interfaces project, which defines all the shared interfaces between all components of our application. All calls and references to types between the different projects must be made using these interfaces only. No direct reference must be normally used.

Next, we have the Middle Layer projects. These make up the projects which host the business logic, conversion between types of objects projects, calls to external services etc.

And then we have the main Domain project, which sits at the center of the entire application and holds the main domain related objects of our application. Please note that any direct reference between projects must be originating from the Domain project. Besides this all calls between projects must be done using interfaces that have been associated in the Association project using Dependency Injection.

Finally, we have various External Services projects, which include providing access to relational and non-relational databases, queues, and other cloud services. These are all also accessed using the interfaces defined.

Using this model and following the SOLID principles, we can have a very scalable and maintainable architecture for our application. However, this model is not a final layout of how you should design your application. It is more of a recommendation and there is always scope for extensions and improvements in it.

Summary

In this article, we looked at the simplified clean architecture model. This provides us with a very scalable and maintainable model and adding additional features to it is very quick and secure at the same time. Happy coding!


Similar Articles