Domain-Driven Design (DDD) and Hexagonal Architecture in Java

Domain-Driven Design and hexagonal architecture
  Welcome to the third installm ent of our Domain-Driven Design (DDD) series, updated for 2024. In Part 1, we explored Strategic Domain-Driven Design, and in Part 2, we focused on Tactical DDD. Now, we’ll show you how to transform a domain model into fully functional software by applying the principles of hexagonal architecture.

This article dives deeper into the practical implementation of DDD concepts, with a specific focus on Java and Vaadin – a powerful platform for building modern, secure, and scalable web applications in Java. While the ideas presented here can be applied across programming environments, the examples are tailored to help Java developers effectively adopt these powerful architectural techniques.

The insights in this post are inspired by the foundational books Domain-Driven Design: Tackling Complexity in the Heart of Software by Eric Evans and Implementing Domain-Driven Design by Vaughn Vernon. While these works were the starting point for my journey, the perspectives and code examples here reflect my own practical experiences.

Let’s explore how combining DDD with hexagonal architecture can help you build robust, maintainable, and scalable software solutions.

Subscribe to our newsletter

Be the first to learn about new Vaadin resources and tips

Learn about strategic domain-driven design in this blog series.

DDD Part 1: Strategic Domain-Driven Design

This is the first part of our in-depth series on Domain-Driven Design (DDD). Part two discusses tactical DDD, whereas, in part three, you'll learn how to apply DDD to working software using Java and Vaadin. Updated for 2024. Domain-Driven Design (DDD) has been around since Eric Evans published his ...
What is tactical domain-driven design

DDD Part 2: Tactical Domain-Driven Design

This is the second part of our in-depth series on Domain-Driven Design (DDD). Part one discussed strategic domain-driven design, whereas, in part three, you'll learn how to apply domain-driven design to working software using Java and Vaadin. Updated for 2024. In this article, we are going to learn ...

Designing REST APIs

Introduction If I had to guess, I would say that most Vaadin applications are self-contained, with the UI and the business logic packaged inside the same application archive and running inside the same Java virtual machine (VM). However, there are cases where it makes more sense to separate the UI ...

A Hybrid Approach to Spring Security in Vaadin Applications

In my previous blog post about Spring Security, I wrote about filter-based security and how to use that in your Vaadin applications. In this blog post, we are going to look at another way of utilizing Spring Security. In addition to filters, Spring Security has other ways of protecting your ...

Filter based Spring Security in Vaadin applications

Spring Security’s web infrastructure is completely based on standard servlet filters. All requests go through a filter chain, where each filter does something with the request and decides whether to continue down the chain or stop and do something else. For example, a filter could check if the user ...

Let's talk about DDD

All software systems are hopefully designed to solve a real world problem. To be able to do this, the software needs an abstraction of the problem - a model - that it can work with. Coming up with this model is not always easy, especially if the real world problem is complex. Domain Driven Design ...

Is MVP a Best Practice?

When I first learned about the Model-View-Presenter (MVP) pattern, I was excited. I thought this was The Pattern to use for Vaadin user interfaces and that it would make everybody’s life a lot easier. Now, when I am older and maybe a bit wiser, I am not so sure anymore. As an architect, it is easy ...

Spring Time for Vaadin

Originally, the idea of the webinar was to show you how Spring has been used in different Vaadin projects in the past. However, once Josh Long from Pivotal got involved, we ended up creating a first prototype of a completely new integration that will sweep the floor with the conventional ways. This ...

Maven Overlays for Vaadin Projects

Maven is more or less the de facto system for managing dependencies and builds in Java applications these days. Whether this is good or bad is up to yourself to decide, but Maven is here to stay and by using it properly, you can actually do some pretty nice stuff with it. In this blog post, I’m ...