Skip to content

Architecture

How a typed domain becomes a program: domain behaviour described as algebras, interpreters supplied for them, and effects kept at the edges. Part of Type-driven design.

  • Functional domain modeling: Ghosh’s principles, keeping effects out of the domain, modules as algebras with laws, composing effectful operations, commands and events, and bounded contexts.
  • Effects, interpreters and wiring: ways to wire an algebra, Reader and Kleisli, free monads, ZIO’s type, algebraic effects, and initial and final embedded DSLs.
  • Tagless final: the encoding and its EDSL origin, the expression problem, rules for production code, and two critiques.
  • Declarative design: declarative specifications and engines, four senses of “declarative”, DSLs, MDE and ontologies, and key contributors.

Explore this section

  • Declarative specifications and execution engines, four senses of \"declarative\", the connection to functional programming, DSLs, model-driven engineering and ontologies, and key contributors.

  • Supplying interpreters for domain algebras and deciding where effects happen: Reader and Kleisli, free monads, ZIO and algebraic effects, compared by what their types reveal, plus initial and final embedded DSLs.

  • A domain model built from pure functions over domain types, with side effects kept out of the domain logic and behavior described as algebras with separate interpreters.

  • Tagless final as a typed encoding of algebras and interpreters: its origin in typed EDSLs, the expression problem, Volpe's and Parsons' rules for production code, and two critiques.