Implementing the Domain Model

Learn how to implement a domain model.

Introduction

Let’s look at how we can manifest the architecture we have discussed in actual code.

Modeling domain code

Since the application, web, and persistence layers are so loosely coupled in our architecture, we’re totally free to model our domain code as we see fit. We can do DDDDomain-Driven Design, we can implement a rich or an anemic domain model, or we can invent our own way of doing things.

Hexagonal Architecture

Get hands-on with 1200+ tech skills courses.