Repositories vs Gateways
I've been studying different architectures like Clean Architecture & Hexagonal Architecture. I noticed that use cases define gateways for data access. This helps separate implementation details from business logic. However, in clean architecture codebases I've found in Github, most data access seems defined by Repositories, which usually live within the Domain. I understand that this seems to be related to Domain Driven Design principles, but I'm just wanting some guidance on the similarities or differences between the two.
In, DDD, do repositories represent data access interfaces, or am I mistaken. Can a CA codebase utilize both Gateways and Repositories?
See the following screenshots from the book for reference.
u/Informal_External_55 — 3 days ago