Domain Modeling Made Functional

Scott Wlaschin 2-Day Workshop
Tue-Wed, Sept 17-18

Functional programming and domain-driven design might not seem to be a good match, but in fact functional programming can be an excellent approach to designing decoupled, reusable systems with a rich domain model. This workshop will show you why.

This will be a hands-on workshop designed for beginners in functional programming. We'll do lots of domain modeling exercises starting with some simple models and then enhancing them with constraints, state machines, error handling, commands and events, and so on.

We'll Cover These Topics in Detail

  • The core concepts of functional programming and how they can be applied to Domain-Driven Design
  • How to represent the nouns and verbs of a domain (e.g. the ubiquitous language) using types.
  • Why representing the domain model using types is better than UML or other documentation (hint: it can never get out of sync)
  • How to capture constraints and business rules in the domain model itself instead of being buried in the implementation
  • How to represent state transitions
  • How to treat errors as a part of the domain
  • How to build a complete business workflow from smaller components using composition
  • How to design a functional architecture with bounded contexts, validation, I/O and on.

Prerequisites

We will be using F# as our modeling language, but no prior experience with F# is needed and we will not be doing advanced coding. Please install the F# compiler and an F#-friendly editor such as Visual Studio Code using the instructions at fsharp.org or http://ionide.io.

Code samples and instructions will be distributed at the start of the workshop.