You are on page 1of 26

 Presentation Abstraction Control

 Distributed Architecture
◦ Client Server Architecture
◦ Multi-tier Architecture
 The key point - the separation of user interactions from data
abstraction and business data processing.
 The interaction oriented software architecture decomposes the
system into three major partitions:
◦ Data module
◦ Control module
◦ View presentation module
 The data module provides the data abstraction & all business logic.
 The view presentation module is responsible for data output
presentation and it may provide an input interface for user input.
 The control module determines the flow of control involving view
selections, communications between modules, job dispatching, and
certain data initialization and system configuration actions.
 Multiple view presentations in different formats are allowed
 Two major style
◦ Model-View-Controller (MVC)
◦ Presentation-Abstraction-Control (PAC)
 Both of MVC and PAC are used for interactive
applications multiple talks and user interactions.
 They are different in their flow of control and
organization.
 The PAC is an agent based hierarchical architecture
 The MVC does not have a clear hierarchical structure
and all three modules are connected together.
 The PAC architecture is similar to MVC but with
some important differences.
 The PAC was developed from MVC to support

the application requirement of multiple agents in


addition to interactive requirements.
 In PAC, the system is decomposed into a

hierarchy of many cooperating agents.


 Each agent has three components (Presentation,
Abstraction, and Control).
 The Control component in each agent is in charge of
communications with other agents.
 The top-level agent provides core data and business
logics.
 The bottom level agents provide detailed specific data
and presentations.
 A middle level agent may play a role of coordinator of
low-level agents.
 There are no direct connections between Abstraction
component and Presentation component in each agent.
 The PAC three components concepts are applied to all
concrete sub-system architectures.
 It is very suitable for any distributed system where all the
agents are distantly distributed and each of them has its
own functionalities with data and interactive interface.
 In such a system, all agents need to communicate with
other agents in a well-structured manner.
 The PAC is also used in applications with rich GUI
components where each of them keeps its own current
data and interactive interface and needs to communicate
with other components.
 Of course, some concrete agent needs all three
components and some other agents do not.
 For some middle level agents the interactive
presentations are not required, so they do not have a
Presentation component.
 The control component is required for all agents
because this is the only way for an agent to talk to
another agent.
 The Control component is a mediator between the
Presentation component and the Abstraction component
within the agent, and also a bridge between the agent
itself and other agents as well.
 The Presentation component and the Abstraction
component are loosely coupled.
 The Presentation component is responsible for both data
input and data output in GUI interfaces where the data
come from the Abstraction component.
 The Abstraction component is responsible for providing
logical data concepts and services and encapsulating all
detailed data manipulation.
 Assume that the current page is the second to last
page in the document at this time.
 If the user clicks on the next button, P4 informs C4
that the “next” button was pressed, in this case, it
also hides the next button since there is no next
page after last page.
 Agent C4 informs agent A4 to update the data on
“next” button.
 After C4 handles all local processing, it contacts its
parent agent, C1, to let it take over.
 After C1 gets the message from C4, it tells A1 to
move the next page, which is the last page in the
document, and then C1 asks P1 to display that
page.
 C1 also informs C5 to hide the last button since the
current page is the last page (or let the last button
stay based on the requirement specification).
 We can see that all the agents communicate via the
controls.
 Since PAC2, PAC3, PAC4, and PAC5 are all buttons,
they have very similar data and presentation
functionality such as hide, move-over, gray-out
features; their controls, however, are different.
 The sequence diagram in Figure 9.9 shows the interaction
sequence in the example we discussed above.
 When the next button is pressed to display the last page in
the document PAC4 and PAC1 react as follows:
P4 informs C4 that the “next” button was pressed;
C4 sends update to A4;
C4 informs P4 to update its presentation or shape;
C4 contacts C1 (a top level agent).
C1 sends update to A1 to move the pointer to next (last
page)
C1 instructs P1 to display the last page.
 Applications:
◦ Suitable for an interactive system where the system
can be divided into many cooperating agents in a
hierarchical manner.
◦ Each agent has its own specific assigned job.
◦ Suitable when the coupling among the agents is
expected to be loose so that changes on an agent
does not affect others.
 Benefit:
◦ Support of multi-tasking and multi-viewing.
◦ Support agent reusability and extensibility.
◦ Easy to plug-in new agent or replace an existing
one.
◦ Support for concurrency where multiple agents are
running in parallel in different threads or different
devices or computers.
 Limitations:
◦ Overhead due to the control bridge between
presentation and abstraction and the communication
of controls among agents.
◦ Difficult to determine the right number of the agents
due to the loose coupling and high independence
between agents
◦ Complete separation of presentation and abstraction
by control in each agent generate development
complexity since communications between agents
only take place between the controls of agents.
 A distributed system consists of multiple
autonomous computers that communicate
through a computer network.
 A distributed system can be modeled by the
client-server architecture, and this forms the
basis for multi-tier architectures; alternatives
are the broker architecture such as CORBA,
and the Service-Oriented Architecture (SOA).
 Process takes place
◦ on the server and
◦ on the client
 Servers
◦ Store and protect data
◦ Process requests from clients
 Clients
◦ Make requests
◦ Format data on the desktop
 Clients
 Servers
 Communication Networks

Server

Client

UNT Center for Digital Knowledge May 2002 23


 The n tier architecture is based on the concept of
separating a system to different layers (usually 3)
Each layer interacts with only the layer directly
below, and has specific function that it is
responsible for.
 3 Tier architecture:
◦ Presentation Layer
Presentation Layer is the layer responsible for displaying user interface.
◦ Business Tier
Business Tier is the layer responsible for accessing the data tier to retrieve,
modify and delete data to and from the data tier and send the results to the
presentation tier. This layer is also responsible for processing the data
retrieved and sent to the presentation layer.
Data Tier
Data tier is the database or the source of the data itself.
 Common mistakes – tightly coupling layers in technology and writing
business logic in presentation tier
 The three tiers may seem similar to the model-view-
controller (MVC) concept; however, topologically they are
different.
 A fundamental rule in a three tier architecture is the client
tier never communicates directly with the data tier; in a
three-tier model all communication must pass through the
middle tier.
 Conceptually the three-tier architecture is linear.
 However, the MVC architecture is triangular: the view
sends updates to the controller, the controller updates the
model, and the view gets updated directly from the model.

You might also like