Chapter 5: Layering

Anatoly Volkhover

Break your system into layers and keep them separate. Consider creating a domain-specific language (DSL) for the application layer, as a way to promote simplicity and separation. If using general-purpose language (GPL) for building the application layer, create a restrictive framework and a process to keep the application layer from intermingling with the layers below.

Break your system into layers and keep them separate. Consider creating a domain-specific language (DSL) for the application layer, as a way to promote simplicity and separation. If using general-purpose language (GPL) for building the application layer, create a restrictive framework and a process to keep the application layer from intermingling with the layers below.

  • Andrew says:

    Hi Anatoly,
    There is a tiny typo “augmentSerices()” at least in kindle version, page 63.

  • weldon says:

    Is the calling signature different after myBankingService implemented by augmentServices?

    Before:
    myBankingService.deposit(…)

    After:
    myBankingService[“deposit”](…)

    Am i right? I’m not familiar with TS

    • anatoly says:

      In typescript/javascript, there is no functional difference between
      myBankingService.deposit(…)
      and
      myBankingService[“deposit”](…)
      The difference is that the first version is validated by the compiler – it checks that the deposit() method is defined for myBankingService, and the second version leaves the validate for runtime. The second syntax is not advisable unless you need to compute the name of the method to be called dynamically, and the expense and the compile-time static type check.

  • >