Skip to content

Unlock the Power of DDD Aggregates and Functional Programming with `faggregate`!

License

Notifications You must be signed in to change notification settings

tmorin/faggregate

Repository files navigation

faggregate

Continuous Integration - Build Quality Gate Status

Enhance DDD and Functional Programming with faggregate.

faggregate offers Java developers tools and abstractions to streamline building scalable and robust software. Ideal for any developer level, it maximizes Domain Driven Design Aggregates and functional programming.

The library provides a simple and flexible way to define Aggregates:

  1. define the data structure of the aggregate's state
  2. define the commands and events which change the state
  3. define the side effects : initialization, storing, loading, destroying
  4. and finally bundle everything with the help of a nice builder

Empower Your Development with DDD Aggregates & Functional Programming - Learn with this Tutorial!

Features

Outbox Pattern

The library handle the transactional part of the Outbox Pattern.

The todo-infra-quarkus example demonstrates the usage of MongoDB to store the state and the domain events of an Aggregate.

Native Image

The library is designed to be integrated directly into a Native Image.

The todo-infra-quarkus example provides an E2E example leveraging on Quarkus.

Functional

The library emphases some functional programing concepts like immutable structures.

The todo-core example provides an implementation leveraging on the Immutables Java library to easily and nicely force the immutable structures of the Aggregate state.

The todo-core module is also used by todo-infra-quarkus. Therefore, it demonstrates Immutables can be used also within common Framework and Native Images.

Validation framework

The library provides a tiny framework (core-scenario) to drive and validate the implementation of side effects.

The todo-core example provides an implementation of scenarios suite.

The todo-infra-quarkus example proves its correctness executing the scenarios suite as an Integration Test.

Installation

The library provides an implementation: faggregate-core-simple. Its usage can be done manually or via Service Loader.

The artifacts are deployed on GitHub. Therefore, a custom configuration is required to resolve the artifacts, please review Working with the Apache Maven registry.

Manual integration

The GitHub Package

<dependency>
    <groupId>io.morin.faggregate</groupId>
    <artifactId>faggregate-core-simple</artifactId>
    <version>VERSION</version>
</dependency>

Service Loader integration

The GitHub Package

<dependency>
    <groupId>io.morin.faggregate</groupId>
    <artifactId>faggregate-spi-simple</artifactId>
    <version>VERSION</version>
</dependency>

The scenario framework

The GitHub Package

<dependency>
    <groupId>io.morin.faggregate</groupId>
    <artifactId>faggregate-core-scenario</artifactId>
    <version>VERSION</version>
</dependency>

Maintenance

Dependencies upgrade

./mvnw versions:display-dependency-updates

Release

./mvnw --batch-mode release:clean \
&& ./mvnw --batch-mode release:prepare \
  -DreleaseVersion=X.Y.Z \
  -DdevelopmentVersion=Y.X.Z-SNAPSHOT

About

Unlock the Power of DDD Aggregates and Functional Programming with `faggregate`!

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages