1 What is software design?

This chapter covers

  • Establishing the idea and intuition behind software design
  • Finding similarities and dissimilarities between object-oriented and functional design
  • The concepts of functional design
  • General design principles

Software engineers deal with many universal concepts, such as requirement analysis, design of domain-specific languages, modularization and project organization, layering, SQL and key–value database support, multithreading, concurrency, logging, building frameworks, domain modeling, and testing. Developers who choose statically typed functional languages such as Haskell, Scala, F#, OCaml, Elm, or PureScript generally have fewer resources for learning design principles that maximize the benefits of those languages in addressing common challenges.

This book explores software design and architecture within statically typed functional languages by introducing a systematic approach called functional declarative design (FDD). FDD is a full development cycle methodology along the lines of object-oriented design (OOD), which introduces functional application architectures, design patterns, design principles, and a new architectural design pattern called hierarchical free monads (HFM).

1.1 Why functional programming?

1.2 Software design

1.2.1 Requirements, goals, and simplicity

1.3 Essential and accidental complexity

1.3.1 Low coupling, high cohesion

1.3.2 Interfaces, inversion of control, and modularity

1.3.3 Functional design

1.4 Design in mainstream paradigms

1.4.1 Imperative design

1.4.2 Object-oriented design

1.4.3 Object-oriented design principles

1.5 Software design in functional languages

1.5.1 Immutability, purity, and determinism

1.5.2 Strong static type systems

1.5.3 Patterns and idioms

1.5.4 Monads

Summary

sitemap