Modes of Composition in Functional Scala Programming

location_city Online schedule Jul 20th 10:00 AM - 06:00 PM place Room 3 shopping_cart Reserve Seat

This workshop is an online workshop that will take place over two days:

  • Monday 20 July: 10am - 12:10pm
  • Tuesday 21 July: 10am - 12:10pm

This workshop teaches strongly typed, effectful functional program design in Scala. We will explore how techniques for composing and decomposing functional programs work in an applied scenario around ecommerce order processing.

Composition is a central value in functional programming; the idea is that we build larger, more complex software by composing smaller, simpler pieces. Making it easy to combine pieces together is a key attribute of good programming methods.


Learning Outcome

The workshop explores the idea that there are recurring patterns, or modes, of composition that are useful in a broad range of situations. We are going to examine them as concepts and then see how they manifest in a practical example.

- Applicative composition lets us compose independent or parallel work
- Monadic composition lets us compose dependent or sequential work
- Effect composition lets us combine the different "side-effects" of
doing work together
- Stream composition lets us compose repeated work
- Isomorphic composition lets us compose a function and its inverse to
travel between two states
- Layered composition lets us compose domain model layers together in
which different rules and invariants apply

The workshop exercises build an order processing system in a series of structured and guided steps. Each step includes a focussed problem that illustrates compositional concepts, supported by scaffold code. By keeping the code in each incremental step small and providing clear guidance as to how to tackle each problem, participants can extend their skills and succeed in applying best-practice functional techniques.

Technology-wise, we will work with Scala, the Cats/Typelevel library ecosystem, and SBT.

A github repository will be provided with workshop notes and code.

Target Audience

developers, Technical leads and Architects,programmers, testers, business analysts and product owners

Prerequisites for Attendees

Participants should have familiarity with Scala syntax. Experience
with applied functional programming is not required or assumed. People
with another typed functional language such as Haskell should also be
able to follow the workshop concepts.

schedule Submitted 11 months ago