What we mean by the presentation layer
How prototyping can be applied to user interface design How to add boundary classes to the class model
How to model boundary classes in sequence diagrams How design patterns can be applied to the user interface How to model control using statecharts
Designing Boundary Classes
Chapter 17
M8748 © Peter Lo 2007
1
Architecture of the Presentation Layer
Aim to separate the classes that have the responsibility for the interface with the user, or with other systems (Boundary Classes) from the business classes (Entity classes) and the classes that handle the application logic (Control
Classes). This is the Three-Tier Architecture.
There may be more than three layers, and that the logical layers can map to physical platforms in a number of ways.
M8748 © Peter Lo 2007
M8748 © Peter Lo 2007
2
Reasons for the 3-Tier Architecture
Logical Design
Interface Independence
Reuse
3
M8748 © Peter Lo 2007
4
3-Tier Architecture
Presentation Layer
Different authors have used different terms
Boundary, Entity, Control
Model, View, Controller
Human Interaction Component, Problem
Domain Component, Task Management
Component
M8748 © Peter Lo 2007
Handles interface with users and other systems
Formats and presents data at the interface
Presentation can be for display as text or charts, printing on a printer, speech synthesis, or formatting in XML to transfer to another system
Provides a mechanism for data entry by the user, but the events are handled by control classes
5
Presentation Layer
6
Developing Boundary Classes
Does not contain business classes
Clients, Campaigns, Adverts, Invoices, Staff etc.
Does not contain the business logic
Rules like ‘A Campaign must have one and only one Campaign Manager’.
Does not handle validation
Beyond perhaps simple checks on formatting
M8748 © Peter Lo 2007
M8748 © Peter Lo 2007
7