kdocs
GitHub
SC - Software Architecture
SC - Software Architecture
  • About
    • Architectural Requirements (RAs)
    • Architectural Perspectives
  • Software Design
    • Microservices
      • Patterns
    • Monolithic
    • C4 Model
  • Software Architectures
    • Clean Architecture
    • DDD (Domain Driven Design)
      • Strategic Modeling
      • Tactical Modeling
    • Event Driven Architecture
      • CAP Theorem
    • Hexagonal Architecture (Ports and Adapters)
  • Design Patterns
    • Behavioral
    • Creational
    • Data Access
    • Structural
  • Practices
    • Clean Code
    • SOLID
  • Others
    • CQRS
Powered by GitBook
On this page
  • Application
  • The Business Logic
  • Drivers
  • Driven Actors (Resources)
  1. Software Architectures

Hexagonal Architecture (Ports and Adapters)

PreviousCAP TheoremNextBehavioral

Last updated 7 months ago

Application

The Business Logic

The business logic (usecases), uses a Driven Port. And this Driven Port is implemented by a Driven Adapter, and the Resources (Driven Side) use this Adapters to communicate with the application.

  • Here the Driven Port, could be seen as a Generic Interface.

  • This Generic Interface can be implemented by multiple types of Adapters:

    • Like Database adapter.

    • Memory adapter.

    • File adapter.

Also the business logic, implements a Driver Port.

Drivers

What drives the application, it is what consumes.

Driven Actors (Resources)

Is what is consumed by the drivers.

  • SMTP Server

  • Queue

  • File system

  • Database

In the application border we will have the application API. This means that the API is not a resource to be consumed.