course background
course

25

People

1

Day

Hexagonal Architecture - Apply Ports and Adapter Patterns


25

People

1

Day

About Course

Hexagonal Architecture is an application structuring concept introduced by Alistair Cockburn, one of the Agile Manifesto signatories. It is based on the Ports and Adapters pattern, with the objective of decoupling business logic from technology-specific concerns. This approach makes it easier to design applications as modular monoliths, improving maintainability and flexibility.

This class covers the following topics:
  • The origins of Hexagonal Architecture, starting from the Ports and Adapters pattern, including common misunderstandings within the software development community regarding Hexagonal Architecture
  • The differences between Layered Architecture and Modular Architecture in monolithic applications
  • Hands-on labs involving real coding exercises, beginning with refactoring existing code into a Ports and Adapters–based structure
  • Hands-on labs focused on designing application structures to explore how the Ports and Adapters concept leads to modular application design
  • Applying incremental concepts that build toward a broader understanding of architectural approaches derived from Hexagonal Architecture, including Clean Architecture, its relationship to Domain-Driven Design (DDD), and approaches to designing large-scale systems using Microservices Architecture

This class is designed for software developers who want to understand the importance of communicating design intent through application structure. It aims to improve code maintainability, enable clearer and more effective code reviews, and help teams align on consistent design and communication practices.
Hands-on labs in this class will use TypeScript; however, participants may use any programming language or tools they are comfortable with, including Java, C#, Kotlin, Swift, or any other object-oriented programming language. Participants are required to bring their own laptops.


  • 9:00 - 10:30 - Introduction 
    • Application Architecture 
    • Separation of Concerns: Dependencies Injection
    • GoF OOP Design patterns Revisit
    • Fundamental Pattern: Adapter Pattern + (optional) Strategy Pattern 
    • Hexagonal Architecture - AKA Ports & Adapters Pattern

  • 10:45 - 12:00 - Workshop 1 : Refactoring by Apply Ports & Adapters
    • Restructure :- Apply Interfaces
    • Introduce Test
    • Apply ports and adapters

  • 13:00 - 14:15 - Workshop 2 : Implement Ports & Adapters
    • Understand Requirements
    • Define App structure
    • Test-to-Test -> Real-to-Real Walkthrough
    • Apply Ports & Adapters

  • 14:30 - 15:30 - More about Software Architecture Related Topics
    • Hexagonal Architecture Wrap up
    • Hexagonal vs. Onion vs. Clean Architecture
    • Layered & Component in Monolith Architectural Style
    • Modular Monolith :- From Monolith to Microservices with Hexagonal
    • DDD Related

  • 15:40 - 16:00 - Class Retrospective

Instructor

logo

Olarn Ungumnuayporn

Enabler