ZenWave SDK

👉 ZenWave360 Helps You Create Software Easy to Understand

Maven Central GitHub release (latest by date) General Availability build coverage branches coverage GitHub

Domain Driven Design (DDD) and API-First for Event Driven Microservices

ZenWave SDK is a configurable and extensible code generator tool for Domain Driven Design (DDD) and API-First for Event Driven Microservices that can generate code from a mix of different models including:

ZenWave SDK can generate code from a mix of different models including:

  • ZDL Domain Language as Ubiquitous Language. You can describe the core of your Bounded Context, as well as how it connects to external systems through different adapters and APIs.
  • AsyncAPI: Industry de-facto standard to describe Event-Driven Architectures for Message-based APIs.
  • OpenAPI: Industry standard for Request-Response Architectures with REST APIs.

Using ZenWave Domain Language as Ubiquitous Language for modeling and describing Bounded Contexts: aggregates, entities with their relationships, services, value objects, commands and events.

ZenWave Domain Language started as an extended subset of JHipster Domain Language (JDL) that let you describe your entities and relationships.

Using ZDL Domain Language as Ubiquitous Language for Data on the Inside and API-First specs like AsyncAPI and OpenAPI to describe Inter Process Communications (IPC) for Data on the Outside.

  • ZenWave Domain Language (ZDL) as Ubiquitous Language: To describe your domain core domain model.
  • API-First specs like AsyncAPI and OpenAPI: to describe Inter Process Communications (IPC) between bounded contexts/microservices.
  • ZenWave SDK: to generate (a lot of) infrastructure, functional and testing code from your models and APIs.

ZenWave SDK is designed to be easily extensible and adaptable to your project or your organization needs and likes. You can always fork an existing, standard or custom plugin.

You can install the latest release using jbang running the following command:

jbang alias add --fresh --name=zw release@zenwave360/zenwave-sdk

Please refer to ZenWave SDK for more detailed installation options.

Note: Official plugins are designed to generate functional code and tests on top of existing projects. Creating a base project is out of scope, but you can always go to start.spring.io or start.jhipster.tech, in case your company doesn’t already have a project starter or archetype.

Not (just) a Code Generator

ZenWave SDK is a Modeling Tool for Domain Driven Design and API-First in disguise of a code generator.

Its purpose is to produce successful software projects by dramatically shortening the feedback loop between the expert domain knowledge and working software and its tests.

Domain Driven Design Feedback Loop

In this way all team members: Domain Experts, Product Owners, Software Architects, Developers and Testers can provide early feedback based on an Ubiquitous Language (JDL) and the software and tests generated from that model.

Why Domain Driven Design?

“There are three types of developers implementing microservices. Those who use DDD, those who don’t realise they do, and those who fail.”

DDD: is about building software around a domain model that represents the problem we want to solve. Expressed by and Ubiquitous Language that is shared by all team members. It helps understand the problem before thinking of a solution. It connects Domain Experts with Technical Experts building a shared understanding of the problem and the solution.

ZenWave360: is about speeding up the feedback loop from idea -> model -> working software and tests.

Design to Code

Table of Contents

Generate complete Event Driven Microservices using DDD and API-First

You can generate complete Event Driven Microservices using DDD and API-First

Follow instructions in Getting Started

👉 Describe your Model → Generate Backend ⤳ Generate OpenAPI ⤳ Generate AsyncAPI → Generate API Implementations → Generate Tests and Contracts 👍

  1. Start by describing your core domain model using JDL entities and relationships, annotations and comments.
  2. Generate a complete Backend Application from your Domain Definition Model.
  3. Generate a draft OpenAPI definition from the JDL model. Edit collaboratively this OpenAPI document and then generate some more functional code and tests from that definition.
  4. Generate a draft AsyncAPI definition for consuming async request commands and publishing domain events. Now use zenwave maven plugin to generate strongly typed business interfaces implementing some Enterprise Integration Patterns like: transactional outbox, business dead letter queue…
  5. Generate E2E, Integration tests and Consumer Contracts for the public APIs you just produced.

ZenWave Features MindMap

What can we generate for you today?

Whether you are:

…ZenWave SDK can… generate a lot of code for you!!

06-ServiceImplementation-Hexagonal

  • Standard Plugins
    • JDL Backend Application (flexible hexagonal architecture)
      • Domain Entities,
      • Inbound
        • Service Ports, DTOs, Mappers
        • Implementation for CRUD operations
        • Acceptance Tests: SpringData InMemory Repositories
      • Outbound: SpringData Repositories, ElasticSearch… (for REST or Async see other plugins)
      • Adapters:
        • Spring MVC
        • Spring WebFlux
      • Flavors
        • MongoDB
          • Imperative
          • Reactive
        • JPA
          • Imperative
          • Reactive
      • Unit/Integration Testing
        • Edge Integration Testing: partial spring-boot context for outbound adapters (with testcontainers)
        • Sociable Vertical Testing: manual dependency setup with in memory infrastructure test-doubles
        • Vertical Integration Testing: full spring-boot context for inbound adapters (with testcontainers)
    • JDL OpenAPI Controllers
    • OpenAPI to Spring WebTestClient
    • AsyncAPI Spring Cloud Streams3
      • Consumer and Producer. Imperative and Reactive.
        • Business Exceptions Dead Letter Queues Routing
      • Producer with Transactional Outbox pattern
        • For MongoDB
        • For JDBC
      • Enterprise Envelop Pattern
      • Automatically fill headers at runtime from payload paths, tracing-id supplier…
    • JDL to Specs
      • JDL to OpenAPI
      • JDL to AsyncAPI
        • AsyncAPI schemas
        • AVRO schemas
    • API Testing
    • Reverser Engineering
      • OpenAPI 2 JDL
      • Java 2 JDL
        • Spring Data MongoDB annotations
        • JPA annotations

Generate a Complete Backend Implementation: Getting Started

Follow instructions in Getting Started


ZenWave360 © 2022-2024 - Domain Driven Design (DDD) and API-First for Event Driven Microservices.