-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Get Your Hands Dirty on Clean Architecture
By :
In Chapter 1, What's Wrong with Layers?, I ranted about the traditional layered architecture and claimed that it supports "database-driven design" because, in the end, everything depends on the persistence layer. In this chapter, we will have a look at how to make the persistence layer a plugin to the application layer to invert this dependency.
Instead of a persistence layer, we will talk about a persistence adapter that provides persistence functionality to the application services.
The following figure shows how we can apply the Dependency Inversion Principle to do just that:
Our application services call port interfaces to access persistence functionality. These ports are implemented by a persistence adapter class that does the actual persistence work and is responsible for talking to the database...
Change the font size
Change margin width
Change background colour