Examples - Simple Address Book

The purpose of this system is to express the extraction of object content from the domain objects and the selection of the attributes to be published. The user shall access one page, which publishes a list of objects. For each object a set of attributes values are displayed.

In this case the example is an address book of contacts. Each contact will contain a name, two phone numbers (main and alternative), two postal addresses (main and alternative), and one e-mail address.

Design considerations and requirements

The system will offer a page with an introductory text, and the list of contacts in the agenda, which is stored in a database. For each object the set of its non-empty attributes values will be displayed.

UWE models

This example was modelled with UWE Profile - v1.9 defined in the Magic Draw 16.8 CASE tool and is available as mdzip and emf.

UWE specifies Web applications following the separation of concerns, i.e. modelling content, navigation structure and presentation separately.

Figure 1 shows the content model of the simple address book example, with the classes defined for AddressBook, Contact, Address and Phone. The content model is represented as a plain UML class diagram.

UWE solution modelled with MagicDraw

Figure 1. UWE content model of the running example

The hypertext structure is described using a navigation diagram, which consists of a set of nodes and links. UWE distinguishes among different types of nodes, such as navigation class, menu, index and query. Figure 2 shows the navigation model of the running example. It includes two navigation classes AddressBook and Contact. Address and Phone are not included as they are not relevant for the navigation. Address and phone information is included in the Contact list. Navigation class AddressBook is identified as entry point of the Web application with the tagged value {isHome}.

UWE solution modelled with MagicDraw

Figure 2. UWE navigation structure of a simple Address Book

Figure 3 shows the presentation model of the running example. UWE uses a class diagram for the representation of presentation models. The container form is selected in order to provide a more intuitive representation of pages. The address book page contains an Introduction and a list of Contacts. For each contact the corresponding email, phones and addresses fields are displayed.

UWE solution modelled with MagicDraw

Figure 3. UWE presentation model of a simple Address Book