Facebook Pixel

Domain Modeling Made Functional with F#

  • 2 Days
  • Intermediate
  • Virtual | Classroom
  • £ On Request

Learn and explore all the key concepts of functional programming. Taught by an industry world expert.

Book for my Team

What your team will learn

The concepts of functional programming

How to represent the nouns and verbs of a domain using types and functions

How to decouple the pure domain logic from the outside world

How to build a business workflow from smaller components

How to handle errors as part of the domain

How to ensure that constraints and business rules are captured in the design

Overview

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. You’ll do lots of exercises and build some small projects that take you all the way from high-level design to low-level implementation.

By the end of the workshop you’ll know how to build working solutions with rich domain models, using only functional programming techniques.

Outline

Overview of DDD Principles

  • Building a shared model and representing it in code
  • Persistence ignorance
  • Domain modeling with AND/OR

Introduction to Functional Programming

  • Functions and types
  • Composition as the fundamental principle

Domain Modeling with Algebraic Types

  • Records, choices, simple types, and functions
  • Modeling constraints, options
  • Making illegal states unrepresentable
  • Modeling states

Error Handling

  • Handling domain errors
  • Railway oriented programming
  • Composing error generating functions with bind (monads!)
  • Validation

Functional Architecture

  • Keeping IO at the edges
  • DTOs versus Domain objects and how to transform between them

Programming a Complete Workflow

  • Putting it all together

Requirements

You will be using F# as your development language. No experience with F# needed. Please install the F# compiler and an F# friendly editor such as Visual Studio Code using the instructions at fsharp.org or ionide.io.

About The Trainer

Scott has over 20 years experience in development, design and architecture covering all aspects of business software. He is the creator of F# for Fun and Profit and the book ‘Domain Modeling Made Functional’.

He is an excellent communicator and is comfortable with the “soft” skills that many developers dislike, including being a business analyst, writing documentation, interfacing with non-techies, and generally being a champion for the user experience.

Ready to take the next step?

Instructor-led training for teams. Get in contact to learn more.

Book for my Team

Related Courses