Understanding PAC
At its most abstract, a PAC architecture consists of six kinds of classes: three at the agent scale and three within each agent. Figure 14-1 shows this overall view.

Figure 14-1: The overall hierarchy of agents and PAC within agents.
At the agent scale, the three classes are top-level, bottom-level, and intermediate-level. Figure 14-2 shows Class-Responsibility-Collaboration (CRC; refer to Chapter 2) cards for these three agent classes.
The agents in a PAC hierarchy behave like layers in the Layers pattern (see Chapter 9), in that they communicate only with agents in adjacent layers. If information needs to flow from an agent of one level to another agent of the same level, it must flow upward through an intermediate-level agent before returning to its destination.

Figure 14-2: Agent CRC cards.
Inside all the agents of a PAC architecture are three classes: presentation, abstraction, and control. Figure 14-3 shows CRC cards for these internal classes.

Figure 14-3: Internal PAC CRC cards.
Each of these classes inside an agent has the same responsibility relative to the others. Depending on a class's location in the overall agent hierarchy, however, the functionality ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access