Implementing SOLID and the onion architecture in Node.js with TypeScript and InversifyJS
In this article, we are going to describe an architecture known as the onion architecture. The onion architecture is a software application architecture that adheres to the SOLID principles. It uses the dependency injection principle extensively, and it is profoundly influenced by the Domain Driven Design (DDD) principles and some functional programming principles.
The following section describes some software design principles and design patterns that we must learn to be able to understand the onion architecture.
The separation of concerns (SoC) principle
Concerns are the different aspects of software functionality. For instance, the “business logic” of software is a concern, and the interface through which a person uses this logic is another concern.
The separation of concerns is keeping the code for each of these concerns separated. Changing the interface should not...
Continue reading →