4 End-to-end design

This chapter covers

  • Improving the structure of an application
  • Finding and fixing design flaws
  • Designing the frame of an application from end to end
  • Implementing functional services using the Service Handle pattern
  • Writing simple tests with and without mocks

Determining the final goals of a design is a very helpful technique. I’m speaking from experience. There have been many times when I’ve missed flaws in my design that I could have easily avoided if I had had my system used somehow. It would have been more future proof had there been code that called my system somehow and highlighted blind spots and potential problems. The subsystem can still be under construction, and it doesn’t have to provide full functionality, but once you manage to connect all the parts into a consistent story, you’ll immediately know whether everything fits well. You’ll be sure that there are no critical problems in the architecture, interfaces, and implementation. We call the approach of tying all the knots of the system end-to-end design.

4.1 Finding the place for the end-to-end design

4.1.1 Identifying and fixing wrong dependencies

4.1.2 Improving models and naming

4.1.3 Improving the Hdl language and interpreter

4.1.4 Tests as a final consumer

4.2 Functional services

4.2.1 Layers and sublayers

4.2.2 The Service Handle pattern

4.2.3 Hardware service

4.2.4 Mocking with the Service Handle pattern

4.2.5 Type class-powered service handle

Summary