I have been reading up on the Onion Architecture and today I found out about Uncle Bob's Clean Architecture.
For the life of me I cannot see any differences between them, they look identical (other than the naming convention).
Is there any differences between the two architectural styles? If yes, can you explain it to me please?
Cheers
Onion architecture consists of several concentric layers interacting with each other towards the core, which is the domain. The architecture does not depend on the data layer, as in a traditional three-tier architecture; it depends on real domain models.
Clean architecture is a software design philosophy that separates the elements of a design into ring levels. An important goal of clean architecture is to provide developers with a way to organize code in such a way that it encapsulates the business logic but keeps it separate from the delivery mechanism.
Clean architecture vs. The logical layers of this style are as follows: Presentation layer ( accounts for the presentation to the user) Business logic layer (contains the business rules) Data access layer (processes the communication with the database)
The term "Clean Architecture" is just the name of the article. The onion architecture is a specific application of the concepts explained in the article.
There are architectures like clean, hexagonal and onion with the same objectives and some differences in their implementation.
In all architectures the goal is allows the most stable things are not dependent on less stable things will change more frequently.
The layer more important and more stable is domain.
This is the more important over these architectures, then if for onion the object for coordinate from user interface input to infrastructure, domain etc.. is a application service or if in clean architecture is a interactor are small details.
They do look alike and are used to achieve the same objectives which are mainly testability and separation of concerns, but you should notice that the Uncle Bob's Clean Architecture is more Use Case centric.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With