Chapter 5. The Service Layer

If you want service(s), serve yourself.

—Spanish proverb

In the previous chapter, we examined various approaches to the design and implementation of the business logic: Transaction Script (TS), Table Module (TM), and a couple of object-based approaches such as Active Record (AR) and Domain Model (DM). Of the four approaches, only TS—unquestionably the simplest—has a clear dependency on use cases that need to be supported by the presentation layer.

When you choose a TS procedural approach for the business logic, you define a list of methods starting from actions the user can trigger from the user interface. Each click or selection triggers a method on one of the TS objects. Although we could debate whether TS is ...

Get Microsoft® .NET: Architecting Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.