Domain-Driven Design and Scala

Hey.

Scala is known for its ability to model complex domains and DDD (Domain-Driven Design) is known for the same thing.

Are there anything like that (How to Implement Domain-Driven Design (DDD) in Golang | by Percy Bolmér | Towards Data Science) but for Scala? I’m thinking of articles, videos, tutorials which contain simple introduction or step-by-step guides for implementing DDD with Scala.

I think you can just walk by this table and pick up a copy.

Welcome to the Scala community, @yyqwerty

The book above uses Scala so you should prefer that. It’s in Scala 2, so enums are a bit awkward, so it has to do sealed trait + case class pattern manually. It goes very heavily into the category theory stuff with Scalaz. Be prepared for a lot of algebraic laws and stuff!

There is also Domain modeling made functional

It’s in F# but can work easily with Scala. It only touches on monads briefly, does not have any category stuff / algebraic laws other than that. At least worth a look. It uses Haskell-ish enum / algebraic data types, so you might want to prefer Scala 3 for it.

1 Like

There are also Practical FP in Scala and Functional Event Driven Architecture, books are offering examples for scala 2.13 and 3.x

1 Like

also asked at Reddit - Dive into anything