Giter VIP home page Giter VIP logo

hexagonal-architecture-example's Introduction

Hexagonal Architecture Example

Project Description

The Hexagonal Architecture Example project is a simple demonstration of implementing the hexagonal architecture pattern within a Spring Boot application, utilizing R2DBC for reactive database access and WebFlux for reactive web endpoints.

Overview

The project serves as a practical illustration of the Hexagonal Architecture pattern, also known as Ports and Adapters architecture, as described in the literature referenced by the project. This architectural style emphasizes the separation of concerns and the independence of the core application logic from external dependencies, such as databases, frameworks, and user interfaces.

Key Features

  • Hexagonal Architecture Implementation: The project showcases the organization of the application into distinct layers, including the domain/core logic, application services, and infrastructure adapters. This separation facilitates modularity and testability.
  • Spring Boot Integration: Leveraging the Spring Boot framework, the project demonstrates how to integrate the hexagonal architecture pattern within a modern Java application development context. Spring Boot's auto-configuration and dependency injection capabilities are utilized for rapid development.
  • Reactive Database Access with R2DBC: The project utilizes R2DBC, a reactive database connectivity library, to interact with the underlying database in a non-blocking, asynchronous manner. This enables efficient handling of database operations, particularly in high-concurrency scenarios.
  • Reactive Web Endpoints with WebFlux: WebFlux, the reactive web framework provided by Spring WebFlux, is employed to expose reactive HTTP endpoints. This allows for handling a large number of concurrent requests with minimal resource consumption.

Purpose

The primary purpose of the Hexagonal Architecture Example project is to serve as an educational resource for developers interested in understanding and implementing the hexagonal architecture pattern in Spring Boot applications. By following the project's codebase and accompanying documentation, developers can gain insights into how to design modular, maintainable, and testable applications that are resilient to changes in external dependencies.

Notes

  • In order to maintain the simplicity of the example I avoid few important things:
  • Each request/response should use an independent Dto, in this case only 1 dto is used
  • Mappers should be used when transforming data between layers
  • Validators should be used for each request

References

The project draws heavily from existing literature and best practices related to hexagonal architecture, Spring Boot development, R2DBC usage, and reactive programming with WebFlux. The following are some of the key references utilized in developing the project:

Note

This project is intended for demonstration purposes only and may not encompass all aspects of a production-grade application. Developers are encouraged to adapt and extend the project according to their specific requirements and best practices.

hexagonal-architecture-example's People

Contributors

erickvaernet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.