Facebook Pixel

Understanding Functional Programming with F#

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

A workshop to build complete production quality workflows, with validation, error handling, logging and more, using only functional programming techniques.

Book for my Team

What your team will learn

The core concepts of functional programming - functions, types and composition

How to ensure that constraints and business rules are captured using types

How to handle errors and validation in a functional way

The functional toolkit - Monoids! Monads! Functors!

Functional architecture and why you should keep IO at the edges

How to test functions in various ways

Overview

Functional programming is an excellent approach to designing and coding 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 work through lots of exercises - building projects that take you all the way from high-level design to low-level implementation. Along the way you’ll learn the core concepts of functional programming - functions, types, composition, monads, monoids, functors and more.

By the end of the course you’ll have leanrt how to build a complete production quality workflow in a functional way.

This workshop is for people who want to learn the principles of functional programming without academic jargon and overly abstract ideas. All concepts used in the workshop will be explained in detail.

Outline

Introduction to Functional Programming

  • Functions and types
  • Composition as the fundamental principle
  • Working with pipelines

Working with Composable Types

  • Records, choices, simple types
  • Optional data vs null
  • Modeling constraints
  • Making illegal states unrepresentable
  • The importance of pure, total functions

Error Handling

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

The Functional Toolkit

  • Monoids
  • Monads
  • Functors
  • Cutting through the jargon

Functional Architecture

  • Keeping IO at the edges
  • DTOs versus Domain objects
  • Data transforms
  • Programming a complete production quality workflow

Testing functions

  • Example based testing
  • Property based testing

Requirements

You will be using F# as your development language. No experience with F# needed but previous development experience is required. 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