chapter two

2 The basics of Functional Declarative Design

 

This chapter covers

  • Introducing software architecture
  • Introducing functional design tools, ideas, and approaches
  • Shaping the surface of Functional Declarative Design
  • Practicing simple eDSLs

High-level requirements and business environments are never the same for different business tasks. Budgets, technology stacks, available resources, - all this is very situational. We can’t predict everything. If some idea works better here, it can fail under other circumstances. The object-oriented paradigm nicely addresses graphic user interfaces while making it very difficult to build concurrent applications. Imperative code will be the fastest on average, but its safety will take much more effort than functional languages could take.

We can’t predict everything, but at least we can reduce risks and costs by having ready patterns, architectures, common practices, and reasoning frameworks. Functional languages such as Scala and Haskell offer a different perspective on how to construct applications. Even within Scala, there are at least two schools of doing things. Yet there is a conceptual apparatus that we can try to shape in this chapter. It’s the world of concepts you can meet in Haskell, Scala, and other functional languages. Consider this chapter to be a navigation map across this world, and read it as reference material.

2.1 The engineering approach

2.1.1 Software architecture classification

2.1.2 2Design tools and abstractions

2.1.3 Top-down iterative development process

2.1.4 Collecting requirements

2.1.5 Requirements in mind maps

2.2 Application architecture

2.2.1 Architecture layers

2.2.2 Embedded domain-specific languages

2.2.3 Modularization of applications

2.3 Summary