Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
WINDHOEK-NAMIBIA
STUDY MANUAL
APPLICATION DEVELOPMENT METHODS
2
CHAPTER
PAGE NUMBER
1. Object-oriented concepts.7
3. Object-oriented design.42
5. Visual development.......83
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
3
THE STRUCTURE OF THIS STUDY MODULE
The Module has margin icons that show the student the objectives, activities,
in-text questions, feedback, further reading, key words and terms, stop and
reflex signs.
Chapter Two looks at the Unified Modelling Language. Here define what UML is
and why it used in Software Development. The diagrammatic notations used in
UML are also introduced here.
Chapter Four focuses on Rapid Prototyping. Here we explain and define Rapid
Software development and its advantages and disadvantages to software
development.
Chapter Six dwells on the User Interface Guidelines. Why is User Interface
Design important to software development? That is discussed here in this
chapter. We also look at the principles and guidelines on how to design and
working and interactive user interfaces (applications)
This module therefore works as a strong guide to Application Development, and hence must
be used in collaboration with other recommended textbooks, not as the ONLY source of
information for this exciting subject.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
5
COURSE OVERVIEW
This tutorial seeks to educate the learner in Application Development Methods. This module
focuses on exploring Software Development world and how Applications are designed from
scratch. Important concepts and definitions used in Software development are covered in this
module. Different models and designs are used in software design which lead to the
successful development and implementation of software applications. Good software
applications interact with users and easily avoid and handle errors that are made by the users
whilst they use the application. Students developing applications should become familiar with
important principles and guidelines in developing software applications.
An examination is appropriately set to test you on this critical area of your study.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
6
COURSE OBJECTIVES- use action verbs;
Upon completion of this course you will be able to:
State and explain the role of Object Oriented models in software design
Illustrate how a good User Interface interacts with users to avoid errors
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
7
Module Outcomes
Illustrate the key issues of web page design with regard to the balance of
dynamics, performance and aesthetics.
Explain the operation of the World Wide Web and related Internet
technologies
Demonstrate the ability to set up and manage a web server.
As you go through his module you will oftenly see the icons below and what they
mean and they emphasize on what you need to understand or look out for. These
may be objectives, activities, feedback e.t.c as listed in the table below. Take note of
them and know what they mean when you see them. They will assist you in making
your study easier and interesting and also in helping you master the keys concepts
and things to understand in this module.
Further reading
Stop & Reflect - student just have to think about a question, idea,
view, opinion (real life practical examples in Namibian context
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
Objectives
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
1 Object-Oriented Concept
Chapter 1
-understand object-orientation in software development
Objectives
Basic Concept
Object-orientation is so called because this method sees things that are
part of the real world as objects. A phone is an object in the same way as
a bicycle, a human being, or an insurance policy are objects. In everyday
life, we simplify objects in our thinking we work with models. Software
development does essentially the same: objects occurring in reality are
reduced to a few features that are relevant in the current situation.
Instead of real objects, we work with symbols. Properties and composition
of objects correspond only roughly to reality; the model selects only
those aspects that are useful for carrying out a specific task. In figure 1.1,
we use model to describe a reality that a teacher owns a bicycle and he
reads a book.
Figure 1.1 Complex realities are made more manageable by abstract models.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
10
1.1.1
Data Abstraction
Encapsulation
11
are hidden from other objects. The object encapsulates both data and the
logical procedures required to manipulate the data.
1.2
Class Modeling
1.2.1
12
Type
Example of class
Example
object
Occurrence
Alarm
Fire alarm
Things
Car
Ferrari 360
External entities
Door
Fire door
Roles
Teacher
John, Nick
Organizational
units
IECS department
FCU_IECS,
1.2.2
of
13
Association
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
14
0..1
No instance,
instance
or
one
0..*, *
1..*
Aggregation
Aggregation is a special form of association. Aggregation is the
composition of an object out of a set of parts. A car, for example, is an
aggregation of tires, engine, steering wheel, brakes and so on. These
parts may in turn be aggregations: a brake consists of disk, pads,
hydraulic, etc. Aggregation represents a has relationship: a car has an
engine. Instead of aggregation, some people talk about whole-part
hierarchy. For example, in figure 1.7, where an Enterprise represents a
whole end and Department represents a part end.
15
the subclass of the class that is extended. Since a subclass contains all of
the data and methods of the superclass plus additional resources, it is
more specific. Conversely, since the superclass lacks some of the
resources of the subclass, it is more general or abstract, than its
subclasses. Figure 1.8 shows an example, where Circle and Rectangle
inherit from GeomFigure and own all attributes and methods from
GeomFigure.
Object-oriented Programming
1.3.1
Interface
16
1.3.2
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
17
Object Communication
Polymorphism
18
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
19
20
Notation
Name
Description
Class
A
class
describes the
structure and
behavior of a
set of similar
objects.
Object
An instance of
a class
Association
A relationship
between
different
objects of one
more classes
Inheritance
One
class
extends
another class
Interface
Abstract
definitions
purely
functional
interfaces
of
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
21
Interface
Implementa
tion
Implement the
functions
defined
in
interface
Aggregatio
n
Aggregation is
the
composition of
an object out
of a set of
parts.
1.5
There are many tools that support UML modeling. Here we take
Rational Rose to introduce these basic modeling concepts.
1.5.1
Rational Rose
Rational Rose is a program that allows you to build models based on the
Unified Modeling Language or more commonly known as the UML. You
are able to create three diagrams in Rational Rose, the use-case diagram,
the sequence diagram, and the class diagram. Here we simple introduce
the class diagram part. The class diagram describes the types of objects
in the program and how they are related to each other.
Before we start modeling, it is important that we know the important
features of the main window. If you look to the far left you will see a side
panel as shown in Figure .13. 1The Use Case View is where you will see all
the use cases that you will make. Along with the use cases you will see
any actors used in your use case diagrams and the different associations
created between the use case and the actor. The Logical View is where
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
22
you will build your class diagram and your sequence diagrams. Inside
here as well you will see the different classes you created and the
associations that exist between them.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
23
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
24
25
can do many things including changing the name of the class and adding
attributes and operations.
If you double click on the operation you created another box will pop
up that allows you to customize the operation. Things you can customize
includes adding parameters and return types. To create an attribute click
on the attribute tab and follow the same procedure
Once you create your class you can make another class in the same
fashion, and connect the two classes with an association. To see how to
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
26
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
27
Activity 1
- What are some of the attributes of UML?
Activity
Feedback Activity 1
Feedback
Key Words/Terms
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
28
2.
What is UML?
Chapter 2
-Define UML and its primary goals
-understand the history of UML
Objectives
29
History of UML
Identifiable object-oriented modeling languages began to appear between
mid-1970 and the late 1980s as various methodologists experimented with
different approaches to object-oriented analysis and design. The number of
identified modeling languages increased from less than 10 to more than 50
during the period between 1989-1994. Many users of OO methods had
trouble finding complete satisfaction in any one modeling language, fueling
the "method wars." By the mid-1990s, new iterations of these methods
began to appear and these methods began to incorporate each others
techniques, and a few clearly prominent methods emerged.
The development of UML began in late 1994 when Grady Booch and Jim
Rumbaugh of Rational Software Corporation began their work on unifying the
Booch and OMT (Object Modeling Technique) methods. In the Fall of 1995,
Ivar Jacobson and his Objectory company joined Rational and this unification
effort, merging in the OOSE (Object-Oriented Software Engineering) method.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
30
As the primary authors of the Booch, OMT, and OOSE methods, Grady Booch,
Jim Rumbaugh, and Ivar Jacobson were motivated to create a unified
modeling language for three reasons. First, these methods were already
evolving toward each other independently. It made sense to continue that
evolution together rather than apart, eliminating the potential for any
unnecessary and gratuitous differences that would further confuse users.
Second, by unifying the semantics and notation, they could bring some
stability to the object-oriented marketplace, allowing projects to settle on
one mature modeling language and letting tool builders focus on delivering
more useful features. Third, they expected that their collaboration would
yield improvements in all three earlier methods, helping them to capture
lessons learned and to address problems that none of their methods
previously handled well.
The efforts of Booch, Rumbaugh, and Jacobson resulted in the release of the
UML 0.9 and 0.91 documents in June and October of 1996. During 1996, the
UML authors invited and received feedback from the general community.
They incorporated this feedback, but it was clear that additional focused
attention was still required.
While Rational was bringing UML together, efforts were being made on
achieving the broader goal of an industry standard modeling language. In
early 1995, Ivar Jacobson (then Chief Technology Officer of Objectory) and
Richard Soley (then Chief Technology Officer of OMG) decided to push harder
to achieve standardization in the methods marketplace. In June 1995, an
OMG-hosted meeting of all major methodologists (or their representatives)
resulted in the first worldwide agreement to seek methodology standards,
under the aegis of the OMG process.
During 1996, it became clear that several organizations saw UML as strategic
to their business. A Request for Proposal (RFP) issued by the Object
Management Group (OMG) provided the catalyst for these organizations to
join forces around producing a joint RFP response. Rational established the
UML Partners consortium with several organizations willing to dedicate
resources to work toward a strong UML 1.0 definition. Those contributing
most to the UML 1.0 definition included: Digital Equipment Corp., HP, i-Logix,
IntelliCorp, IBM, ICON Computing, MCI Systemhouse, Microsoft, Oracle,
Rational Software, TI, and Unisys. This collaboration produced UML 1.0, a
modeling language that was well defined, expressive, powerful, and
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
31
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
32
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
33
An actor is represents a user or another system that will interact with the
system you are modeling. A use case is an external view of the system that
represents some action the user might perform in order to complete a task.
When to Use: Use Cases Diagrams
Use cases are used in almost every project. The are helpful in exposing
requirements and planning the project. During the initial stage of a project
most use cases should be defined, but as the project continues more might
become visible.
How to Draw: Use Cases Diagrams
Use cases are a relatively easy UML diagram to draw, but this is a very
simplified example. This example is only meant as an introduction to the
UML and use cases
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
34
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
35
This example shows the customer as a actor because the customer is using
the ordering system. The diagram takes the simple steps listed above and
shows them as actions the customer might perform. The salesperson could
also be included in this use case diagram because the salesperson is also
interacting with the ordering system.
From this simple diagram the requirements of the ordering system can easily
be derived. The system will need to be able to perform actions for all of the
use cases listed. As the project progresses other use cases might appear.
The customer might have a need to add an item to an order that has already
been placed. This diagram can easily be expanded until a complete
description of the ordering system is derived capturing all of the
requirements that the system will need to perform.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
36
Class Diagrams
Class diagrams are widely used to describe the types of objects in a system
and their relationships. Class diagrams model class structure and contents
using design elements such as classes, packages and objects. Class
diagrams describe three different perspectives when designing a system,
conceptual, specification, and implementation. These perspectives become
evident as the diagram is created and help solidify the design. This example
is only meant as an introduction to the UML and class diagrams. Classes are
composed of three things: a name, attributes, and operations. Below is an
example of a class.
37
In this example the classes Corporate Customer and Personal Customer have
some similarities such as name and address, but each class has some of its
own attributes and operations. The class Customer is a general form of both
the Corporate Customer and Personal Customer classes. This allows the
designers to just use the Customer class for modules and do not require indepth representation of each type of customer.
When to Use: Class Diagrams
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
38
Class diagrams are used in nearly all Object Oriented software designs. Use
them to describe the Classes of the system and their relationships to each
other.
How to Draw: Class Diagrams
Class diagrams are some of the most difficult UML diagrams to draw. To
draw detailed and useful diagrams a person would have to study UML and
Object Oriented principles for a long time. Therefore, this page will give a
very high level overview of the process.
Before drawing a class diagram consider the three different perspectives of
the system the diagram will present; conceptual, specification, and
implementation. Try not to focus on one perspective and try see how they all
work together.
When designing classes consider what attributes and operations it will have.
Then try to determine how instances of the classes will interact with each
other. These are the very first steps of many in developing a class diagram.
However, using just these basic techniques one can develop a complete view
of the software system.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
39
This example is only meant as an introduction to the UML and use cases.
Interaction Diagrams
Interaction diagrams model the behavior of use cases by describing the way
groups of objects interact to complete the task. The two kinds of interaction
diagrams are sequence and collaboration diagrams. This example is only
meant as an introduction to the UML and interaction diagrams.
When to Use: Interaction Diagrams
Interaction diagrams are used when you want to model the behavior of
several objects in a use case. They demonstrate how the objects collaborate
for the behavior. Interaction diagrams do not give a in depth representation
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
40
of the behavior. If you want to see what a specific object is doing for several
use cases use a state diagram.
How to Draw: Interaction Diagrams
Sequence diagrams, collaboration diagrams, or both diagrams can be used
to demonstrate the interaction of objects in a use case. Sequence diagrams
generally show the sequence of events that occur. Collaboration diagrams
demonstrate how objects are statically connected. Both diagrams are
relatively simple to draw and contain similar elements.
Sequence diagrams:
Sequence diagrams demonstrate the behavior of objects in a use case by
describing the objects and the messages they pass. the diagrams are read
left to right and descending. The example below shows an object of class 1
start the behavior by sending a message to an object of class 2. Messages
pass between the different objects until the object of class 1 receives the
final message.
Below is a slightly more complex example. The light blue vertical rectangles
the objects activation while the green vertical dashed lines represent the life
of the object. The green vertical rectangles represent when a particular
object has control. The represents when the object is destroyed. This
diagrams also shows conditions for messages to be sent to other object. The
condition is listed between brackets next to the message. For example, a
[condition] has to be met before the object of class 2 can send a message()
to the object of class 3.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
41
The next diagram shows the beginning of a sequence diagram for placing an
order. The object an Order Entry Window is created and sends a message to
an Order object to prepare the order. Notice the names of the objects are
followed by a colon. The names of the classes the objects belong to do not
have to be listed. However the colon is required to denote that it is the
name of an object following the objectName:className naming system.
Next the Order object checks to see if the item is in stock and if the [InStock]
condition is met it sends a message to create an new Delivery Item object.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
42
The next diagrams adds another conditional message to the Order object. If
the item is [OutOfStock] it sends a message back to the Order Entry Window
object stating that the object is out of stack.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
43
This simple diagram shows the sequence that messages are passed between
objects to complete a use case for ordering an item.
Collaboration diagrams:
Collaboration diagrams are also relatively easy to draw. They show the
relationship between objects and the order of messages passed between
them. The objects are listed as icons and arrows indicate the messages
being passed between them. The numbers next to the messages are called
sequence numbers. As the name suggests, they show the sequence of the
messages as they are passed between the objects. There are many
acceptable sequence numbering schemes in UML. A simple 1, 2, 3... format
can be used, as the example below shows, or for more detailed and complex
diagrams a 1, 1.1 ,1.2, 1.2.1... scheme can be used.
The example below shows a simple collaboration diagram for the placing an
order use case. This time the names of the objects appear after the colon,
such as :Order Entry Window following the objectName:className naming
convention. This time the class name is shown to demonstrate that all of
objects of that class will behave the same way.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
44
State Diagrams
State diagrams are used to describe the behavior of a system. State
diagrams describe all of the possible states of an object as events occur.
Each diagram usually represents objects of a single class and track the
different states of its objects through the system.
When to Use: State Diagrams
Use state diagrams to demonstrate the behavior of an object through many
use cases of the system. Only use state diagrams for classes where it is
necessary to understand the behavior of the object through the entire
system. Not all classes will require a state diagram and state diagrams are
not useful for describing the collaboration of all objects in a use case. State
diagrams are other combined with other diagrams such as interaction
diagrams and activity diagrams.
How to Draw: State Diagrams
State diagrams have very few elements. The basic elements are rounded
boxes representing the state of the object and arrows indicting the transition
to the next state. The activity section of the state symbol depicts what
activities the object will be doing while it is in that state.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
45
All state diagrams being with an initial state of the object. This is the state of
the object when it is created. After the initial state the object begins
changing states. Conditions based on the activities can determine what the
next state the object transitions to.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
46
State diagrams can also show a super-state for the object. A super-state is
used when many transitions lead to the a certain state. Instead of showing
all of the transitions from each state to the redundant state a super-state can
be used to show that all of the states inside of the super-state can transition
to the redundant state. This helps make the state diagram easier to read.
The diagram below shows a super-state. Both the Checking and Dispatching
states can transition into the Canceled state, so a transition is shown from a
super-state named Active to the state Cancel. By contrast, the state
Dispatching can only transition to the Delivered state, so we show an arrow
only from the Dispatching state to the Delivered state.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
47
Activity Diagrams
Activity diagrams describe the workflow behavior of a system. Activity
diagrams are similar to state diagrams because activities are the state of
doing something. The diagrams describe the state of activities by showing
the sequence of activities performed. Activity diagrams can show activities
that are conditional or parallel.
48
Activity diagrams show the flow of activities through the system. Diagrams
are read from top to bottom and have branches and forks to describe
conditions and parallel activities. A fork is used when multiple activities are
occurring at the same time. The diagram below shows a fork after activity1.
This indicates that both activity2 and activity3 are occurring at the same
time. After activity2 there is a branch. The branch describes what activities
will take place based on a set of conditions. All branches at some point are
followed by a merge to indicate the end of the conditional behavior started
by that branch. After the merge all of the parallel activities must be
combined by a join before transitioning into the final activity state.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
49
Physical Diagrams
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
50
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
51
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
52
Activity 2
- What are the different diagrams used in UML
Activity
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
53
Feedback Activity 2
Feedback
Sequence Diagram
Collaboration Diagram
State Diagram
Activity Diagram
Physical Diagrams
Component Diagram
Deployment Diagram
Key Words/Terms
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
54
3. Object-oriented Design
The objective of this chapter is to introduce an approach to software design
where the design is structured as interacting objects. When you have read
this chapter, you will:
Objectives
Chapter 3
understand how a software design may be
represented as a set of interacting objects that
manage their own state and operations,
know the most important activities in a general
object-oriented design process,
understand different models that may be used to
document an object oriented design ,
have been introduced to the representation of these
models in the Unified Modeling Language (UML).
55
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
56
57
58
// in the buffer
v = circularBuffer.Get () ;
// Call the method associated with a thermostat object that sets
the
// temperature to be maintained
thermostat.setTemp (20) ;
In some distributed systems, object communications are implemented
directly as text messages which objects exchange. The receiving object
parses the message, identifies the service and the associated data and
carries out the requested service. However, when the objects co-exist in the
same program, method calls are implemented in the same way as procedure
or function calls in a language such as C or Ada.
When service requests are implemented in this way, communication
between objects is synchronous. That is, the calling object waits for the
service request to be completed. However, if objects are implemented as
concurrent processes or threads the object communication may be
asynchronous. The calling object may continue in operation while the
requested service is executing. I explain how objects may be implemented as
concurrent processes later in this section.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
59
60
budgets controlled by the manager and the date that the manager was
appointed to a particular management role. Similarly, the class Programmer
adds new attributes that define the project that the programmer is working
on and the programming language skills that they have. Objects of class
Manager or Programmer may therefore be used anywhere where an object of
class Employee is required.
Objects that are members of an object class participate in relationships with
other objects. These relationships may be modelled by describing the
associations between the object classes. In the UML, associations are
denoted by a line between the object classes that may optionally be
annotated with information about the association. This is illustrated in Figure
3.4 which shows the association between objects of class Employee and
objects of class Department and between objects of class Employee and
objects of class Manager. Association is a very general relationship and is
often used in the UML to indicate that either an attribute of an object is an
associated object or the implementation of an object method relies on the
associated object. However, in principle at least, any kind of association is
possible. One of the most common associations is aggregation which
illustrates how objects may be composed of other objects.
61
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
62
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
63
Figure 3.5 shows how an active object may be defined and implemented in
Java. This object class represents a transponder on an aircraft. The
transponder keeps track of the aircrafts position using a satellite navigation
system. It can respond to messages from air traffic control computers. It
provides the current aircraft position in response to a request to the
givePosition method.
This object is implemented as a thread where a continuous loop in the run
method includes code to compute the aircrafts position using signals from
satellites. Threads are created in Java by using the built-in Thread class as a
parent class in a class declaration. Threads must include a method called run
and this is started by the Java run-time system when objects that are defined
as threads are created. This is shown in Figure 3.5.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
64
Understand and define the context and the modes of use of the system
Design the system architecture
Identify the principal objects in the system
Develop design models
Specify object interfaces
65
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
66
Figure 3.6
Layered architecture for weather mapping system
In Figure 3.6, We have shown the different layers and have included the layer
name in a UML package symbol that has been denoted as a subsystem. A
UML package represents a collection of objects and other packages. I have
used it here to show that each layer includes a number of other components.
In Figure 3.7 We have expanded on this abstract architectural model by
showing that the components of the subsystems. Again, these are very
abstract and they have been derived from the information in the description
of the system. I continue the design example by focusing on the weather
station subsystem that is part of the data collection layer.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
67
68
Use-case Report
Data The weather station sends a summary of the weather data that
has been collected from the instruments in the collection period to the
weather data collection system. The data sent are the maximum
minimum and average ground and air temperatures, the maximum,
minimum and average air pressures, the maximum, minimum and
average wind speeds, the total rainfall and the wind direction as
sampled at 5 minute intervals.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
69
Comments Weather stations are usually asked to report once per hour
but this frequency may differ from one station to the other and may be
modified in future.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
70
When you model the interactions of a system with its environment you
should use an abstract approach that does not include too much detail of
these interactions. The approach that is proposed in the UML is to develop a
use-case model where each use-case represents an interaction with the
system. In use-case models, each possible interaction is named in an ellipse
and the external entity involved in the interaction is represented by a stick
figure. In the case of the weather station system, this external entity is not a
human but the data processing system for the weather data.
A use-case model for the weather station is shown in Figure 3.8. This shows
that weather station interacts with external entities for startup and
shutdown, for reporting the weather data that has been collected and for
instrument testing and calibration. Each of these use cases can be described
using a simple natural language description. This helps designers identify
objects in the system and gives them an understanding of what the system
is intended to do. We use a stylised form of this description that clearly
identifies what information is exchanged, how the interaction is initiated etc.
you can use any technique for describing use-cases so long as the is short
and easily understandable. You need to develop descriptions for each of the
use-cases that are shown in the model.
The use-case description helps to identify objects and operations in the
system. From the description of the Report use-case, it is obvious that
objects representing the instruments that collect weather data will be
required as will an object representing the summary of the weather data.
Operations to request weather data and to send weather data are required.
3.2 Architectural design
Once the interactions between the software system that is being designed
and the systems environment have been defined, you can then use this
information as a basis for designing the system architecture. Of course, you
need to combine this with your general knowledge of principles of
architectural design and with more detailed domain knowledge.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
71
72
these entities can be described separately but, of course, you may choose to
reveal the structure of the entities as I have done in Figure 3.7.
Object identification
By this stage in the design process, you will already have formulated some
ideas about the essential objects in the system that you are designing. In the
weather station system, it is clear that the instruments are objects and you
need at least one object at each of the architectural levels. This reflects a
general principle that objects tend to emerge during the design process.
However, you usually also have to look for and document other objects that
may be relevant.
Although I have headed this section object identification, in practice this
process is actually concerned with identifying object classes. The design is
described in terms of these classes. Inevitably, you have to refine the object
classes that you initially identify and revisit this stage of the process as you
develop a deeper understanding of the design. There have been various
proposals made about how to identify objects classes:
1. Use a grammatical analysis of a natural language description of a
system. Objects and attributes are nouns, operations or services are
verbs. (Abbott, 1983). This approach has been embodied in the HOOD
method for object-oriented design (Robinson, 1992) that has been
widely used in the European aerospace industry.
2. Use tangible entities (things) in the application domain such as aircraft,
roles such as manager, events such as request, interactions such as
meetings, locations such as offices, organisational units such as
companies, etc. (Shlaer and Mellor, 1988; Coad and Yourdon, 1990;
Wirfs-Brock, Wilkerson et al., 1990).Support this by identifying storage
structures (abstract data structures) in the solution domain that might
be required to support these objects.
3. Use a behavioural approach where the designer first understands the
overall behaviour of the system. The various behaviours are assigned
to different parts of the system and an understanding is derived of who
initiates and participates in these behaviours. Participants who play
significant roles are recognised as objects (Rubin and Goldberg, 1992).
4. Use a scenario-based analysis where various scenarios of system use
are identified and analysed in turn. As each scenario is analysed, the
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
73
team responsible for the analysis must identify the required objects,
attributes and operations. A method of analysis called CRC cards where
analysts and designers take on the role of objects is effective in
supporting this scenario based approach (Beck and Cunningham,
1989).
These approaches help you get started with object identification. In practice,
many different sources of knowledge have to be used to discover objects and
object classes. Objects and operations that are initially identified from the
informal system description can be a starting point for the design. Further
information from application domain knowledge or scenario analysis may
then be used to refine and extend the initial objects. This information may be
collected from requirements documents, from discussions with users and
from an analysis of existing systems.
I have used a hybrid approach here to identify the weather station objects. I
dont have space to describe all the objects but I have shown five object
classes in Figure 3.11. The Ground thermometer, Anemometer and
Barometer represent application domain objects and the WeatherStation and
WeatherData objects have been identified from the system description and
the scenario (use-case) description. These objects are related to the different
levels in the system architecture.
1. The WeatherStation object class provides the basic interface of the
weather station with its environment. Its operations therefore reflect
the interactions shown in Figure 3.8. In this case, I use a single object
class to encapsulate all of these interactions but, in other designs, it
may be more appropriate to use several classes to provide the system
interface.
2. The WeatherData object class encapsulates the summarised data from
the different instruments in the weather station. Its associated
operations are concerned with collecting and summarising the data
that is required.
3. The GroundThermometer, Anemometer and Barometer object classes
are directly related to instruments in the system. They reflect tangible
hardware entities in the system and the operations are concerned with
controlling that hardware.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
74
75
76
The UML provides for a large number of possible static and dynamic models
that may be produced to document a design. Booch et al. (Booch, Rumbaugh
et al., 1999) propose 9 different types of diagram to represent these models.
I dont have space to go into all of these and not all are appropriate for the
weather station example. The models that I will discuss in this section are:
1. Subsystem models that show logical groupings of objects into coherent
subsystems. These are represented using a form of class diagram
where each subsystem is shown as a package. Subsystem models are
static models.
2. Sequence models that show the sequence of object interactions. These
are represented using a UML sequence or a collaboration diagram.
Sequence models are dynamic models.
77
State machine models that show how individual objects change their state in
response to events. These are represented in the UML using statechart
diagrams. State machine models are dynamic models.
We have already discussed other types of model that may be developed
earlier in this chapter and in other chapters. Use-case models show
interactions with the system, object models describe the object classes,
generalisation or inheritance models show how classes may be
generalizations of other classes and aggregation models show how
collections of objects are related.
A subsystem model is, in my view, one of the most helpful static models as it
shows how the design may be organised into logically related groups of
objects. We have already seen examples of this type of model that showed
the subsystems in the weather mapping system. In the UML packages are
encapsulation constructs and do not reflect directly on entities in the system
that is developed. However, they may be reflected in structuring constructs
such as Java libraries.
Figure 3.12 shows the objects in the subsystems in the weather station. I also
show some associations in this model. For example, the CommsController
object is associated with the WeatherStation object and the WeatherStation
object is associated with the Data collection package. This means that this
object is associated with one or more objects in this package. A package
model plus an object class model should describe the logical groupings in the
system.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
78
79
80
in response to the different messages that it can process. To do this, you can
use a state machine model that shows how the object instance changes
state depending on the messages that it receives. The UML uses statecharts,
initially invented by Harel (Harel, 1987) to describe state machine models.
Figure 3.14 is a statechart for the WeatherStation object that shows how it
responds to requests for various services. You can read this diagram as
follows:
1. If the object state is Shutdown then it can only respond to a startup ()
message. It then moves into a state where it is waiting for further
messages. The unlabelled arrow with the black blob indicates that the
Shutdown state is the initial state.
2. In the Waiting state, the system expects further messages. If a
shutdown () message is received, the object returns to the shutdown
state.
3. If a reportWeather () message is received, the system moves to a
summarising state then, when the summary is complete, to a
transmitting state where the information is transmitted through the
CommsController. It then returns to a waiting state.
If a calibrate () message is received, the system moves to a calibrating state
then a testing state then a transmitting state before returning to the waiting
state. If a test () message is received, the system moves directly to the
testing state.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
81
82
83
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
84
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
85
Activity 3
- Draw a diagram to show an Association model
Activity
Feedback Activity 3
Feedback
KEY POINTS
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
86
Key Words/Terms
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
87
4.
Rapid Prototyping
Objectives
Chapter 4
- To describe the use of prototypes in different types
of development project
- To discuss evolutionary and throw-away
prototyping
- To introduce three rapid prototyping techniques high-level language development, database
programming and component reuse
- To explain the need for user interface prototyping
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
88
Prototyping process
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
89
Approaches to prototyping
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
90
Evolutionary prototyping
Evolutionary prototyping
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
91
Prototypes as specifications
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
92
Throw-away prototyping
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
93
Throw-away prototyping
Prototype delivery
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
94
Prototyping languages
Language
Smalltalk
Java
Prolog
Lisp
Type
Object-oriented
Object-oriented
Logic
List-based
Application domain
Interactive systems
Interactive systems
Symbolic processing
Symbolic processing
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
95
Database programming
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
96
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
97
Compound documents
Visual programming
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
98
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
99
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
100
Key points
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
101
Activity 4
- What is Evolutionary prototyping
- What is Throw-away prototyping
Activity
Feedback Activity 4
Feedback
- Evolutionary prototyping
An approach to system development where an initial
prototype is produced and refined through a number of
stages to the final system
- Throw-away prototyping
A prototype which is usually a practical implementation of
the system is produced to help discover requirements
problems and then discarded. The system is then
developed using some other development process
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
102
Visual programming
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
103
104
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
105
Specification techniques
106
Interface specification
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
107
Key Words/Terms
Chapter 5
- Understand a visual development environment in
the development of software
Objectives
Software Components
In the last ten years, software components gained a significant role in the
software development process. Although several different specifications
(usually referred to as component models) of what a software component
actually is were introduced, the basic idea behind the scene is more or
less the same. The main idea of the component-oriented approach is
splitting the code of an application into several, well-formed pieces
(usually called components), with well defined functionality (usually called
specification) and with unified access points (usually called interfaces).
The application development process naturally benefits from this
approach in several different ways, which will be described in the next
section in detail. The most important examples include reusability,
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
108
109
purposes. The main reason for using visual development tools is to simplify
and speed-up the development process. The advantage of a visual
development tool, over writing a source code, is even more significant when
dealing with a complicated code, when using a large count of reference to
the other parts of the code, or when describing an entity that could be rather
imagined or represented visually.
As an example important for this thesis, the textual description of a
composed component (e.g. using the Component Description Language) is
usually quite complex and does not provide human-perceivable
representation of the internal structure. However, the internal structure of a
composed component can be represented as a lucid, easily understandable
graphical diagram.
Here we describe a number of existing software development products And
we list the practices and concepts that might be useful in a visual
development environment for software components.
Visual Basic
The first visual development environment introduced is the Microsofts Visual
Basic. It offers a variety of visual controls, widgets that can be composed into
an application. The application is developed by choosing the desired types of
controls from the toolbox (refer to diagram below) and by placing them onto
a form (refer to diagram below), the container of the designed application.
The configuration and interconnection of the designed controls is performed
using the property sheet (refer to diagram below), a set of available
options for each designed control.
Form
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
110
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
111
Tool box
Property Sheet
Object Browser: A tool that can be used to browse classes and methods
contained in the libraries that were selected for use.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
112
113
More than ten modules are already present in the default distribution. The
core by itself already provides several tree-views of a file system, a tree-view
of the runtime nodes, and property sheets for performing various
configurations of the selected node.
Activity 5
- What are some of the useful concepts given by Visual
Basic
Activity
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
114
Feedback Activity 5
Feedback
Key Words/Terms
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
115
Objectives
Chapter 6
- Understand the importance of User Interfaces in
the process of Application Development
- To suggest some general design principles for user
interface design
- To explain different interaction styles
- To introduce styles of information presentation
- To describe the user support which should be builtin to user interfaces
- To introduce usability attributes and system
approaches to system evaluation
Description
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
116
Windows
Icons
Menus
Pointing
Graphics
GUI advantages
User-centered design
Software engineers need to pay attention to key issues underlying the design
rather than the implementation of user interfaces. User-centered design is an
approach to User Interfaces design where the needs of the user are
paramount and where the user is involved in the design process.
User Interface design always involves the development of prototype
interfaces.
User interface design process
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
117
Principle
Description
User familiarity
Consistency
Minimal surprise
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
118
Recoverability
User guidance
User diversity
Design principles
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
119
Direct manipulation
Menu selection
Form fill-in
Command language
Natural language
Interactio
n
styles
Direct
Manipulatio
n
Main
advantages
Menu
selection
Form fill-in
Main
disadvantage
Fast and
intuitive
interaction
Easy to learn
Avoids user
error
Little typing
required
Simple data
entry
May be hard to
implement
Only suitable
where there is a
visual metaphor
for tasks and
objects
Slow for
experienced
users
Can become
complex if many
menu options
Takes up a lot of
screen space
Application
Video games
CAD systems
Most general
purpose
systems
Stock control,
Personal loan
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
120
Command
language
Natural
language
Easy to learn
Powerful and
flexible
Accessible to
casual users
Easily
extended
Hard to learn
Poor error
management
Requires more
typing
Natural language
understanding
systems are
unreliable
processing
Operating
systems,
Library
information
retrieval
systems
Timetable
systems
WWW
Information
retrieval
systems
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
121
Menu systems
-
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
122
Form-based interface
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
123
Command interfaces
-
Command languages
-
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
124
Information presentation
- Information presentation is concerned with presenting system
information to system users
- The information may be presented directly (e.g. text in a word
processor) or may be transformed in some way for presentation (e.g. in
some graphical form)
- The Model-View-Controller approach is a way of supporting multiple
presentations of
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
125
Information presentation
Model-view-controller
Information presentation
-
Static information
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
126
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
127
Digital presentation
Compact - takes up little screen space
Precise values can be communicated
Analogue presentation
Easier to get an 'at a glance' impression of a value
Possible to show relative values
Easier to see exceptional data values
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
128
Textual highlighting
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
129
Data visualization
Colour displays
Colour adds an extra dimension to an interface and can help the user
understand complex information structures
Can be used to highlight exceptional events
Common mistakes in the use of colour in interface design include:
The use of colour to communicate meaning
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
130
User
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
131
Error messages
132
Context
Experience
Skill level
Style
Culture
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
133
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
134
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
135
Help
-
information
Should not simply be an on-line manual
Screens or windows don't map well onto paper pages.
The dynamic characteristics of the display can improve information
presentation.
- People are not so good at reading screen as they are text.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
136
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
137
User documentation
-
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
138
User document types
Document types
Functional description
Brief description of what the system can do
Introductory manual
Presents an informal introduction to the system
System reference manual
Describes all system facilities in detail
System installation manual
Describes how to install the system
System administrators manual
Describes how to manage the system when it is in use
User interface evaluation
-
Usability attributes
Attribute
Learnability
Description
How long does it take a new user to become productive
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
139
Speed of
operation
Robustness
Recoverability
Adaptability
Key points
- Interface design should be user-centered. An interface should be
logical and consistent and help users recover from errors
- Interaction styles include direct manipulation, menu systems form fillin, command languages and natural language
- Graphical displays should be used to present trends and approximate
values. Digital displays when precision is required
- Colour should be used sparingly and consistently
- Systems should provide on-line help. This should include help, Im in
trouble and help, I want information
- Error messages should be positive rather than negative.
- A range of different types of user documents should be provided
- Ideally, a user interface should be evaluated against a usability
specification
Activity 6
- Give examples of User Document Types
Activity
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
140
Feedback Activity 6
Feedback
Functional description
Brief description of what the system can do
Introductory manual
Presents an informal introduction to the system
System reference manual
Describes all system facilities in detail
System installation manual
Describes how to install the system
System administrators manual
Describes how to manage the system when it is in use
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
141
142
143
144
15.
Your design should be intuitable. In other words, if your
users dont know how to use your software, they should be able to
determine how to use it by making educated guesses. Even when the
guesses are wrong, your system should provide reasonable results
from which your users can readily understand and ideally learn.
16.
Dont create busy user interfaces. Crowded screens are
difficult to understand and, hence, are difficult to use. Experimental
results show that the overall density of the screen should not exceed
40 percent, whereas local density within groupings should not exceed
62 percent.
17.
Group things effectively. Items that are logically connected
should be grouped together on the screen to communicate they are
connected, whereas items that have nothing to do with each other
should be separated. You can use white space between collections of
items to group them and/or you can put boxes around them to
accomplish the same thing.
18.
Take an evolutionary approach. Techniques such as user
interface prototyping and Agile Model Driven Development (AMDD) are
critical to your success as a developer.
145
3.The visibility principle. Your design should keep all needed options
and materials for a given task visible without distracting the user with
extraneous or redundant information. Good designs dont overwhelm
users with too many alternatives or confuse them with unneeded
information.
4.The feedback principle. Your design should keep users informed of
actions or interpretations, changes of state or condition, and errors or
exceptions that are relevant and of interest to the user through clear,
concise, and unambiguous language familiar to users.
5.The tolerance principle. Your design should be flexible and tolerant,
reducing the cost of mistakes and misuse by allowing undoing and
redoing, while also preventing errors wherever possible by tolerating
varied inputs and sequences and by interpreting all reasonable
actions reasonable.
6.The reuse principle. Your design should reuse internal and external
components and behaviors, maintaining consistency with purpose
rather than merely arbitrary consistency, thus reducing the need for
users to rethink and remember.
The user interface of an application will often make or break it. Although the
functionality that an application provides to users is important, the way in
which it provides that functionality is just as important. An application that is
difficult to use wont be used. Period. It wont matter how technically
superior your software is or what functionality it provides, if your users dont
like it they simply wont use it. Dont underestimate the value of user
interface design nor of usability.
8 Golden rules of Interface Design
1. Strive for consistency. Consistent sequences of actions should be required in
similar situations; identical terminology should be used in prompts, menus,
and help screens; and consistent commands should be employed throughout.
2. Enable frequent users to use shortcuts. As the frequency of use increases, so
do the user's desires to reduce the number of interactions and to increase the
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
146
pace of interaction. Abbreviations, function keys, hidden commands, and
macro facilities are very helpful to an expert user.
3. Offer informative feedback. For every operator action, there should be some
system feedback. For frequent and minor actions, the response can be
modest, while for infrequent and major actions, the response should be more
substantial.
4. Design dialog to yield closure. Sequences of actions should be organized into
groups with a beginning, middle, and end. The informative feedback at the
completion of a group of actions gives the operators the satisfaction of
accomplishment, a sense of relief, the signal to drop contingency plans and
options from their minds, and an indication that the way is clear to prepare
for the next group of actions.
5. Offer simple error handling. As much as possible, design the system so the
user cannot make a serious error. If an error is made, the system should be
able to detect the error and offer simple, comprehensible mechanisms for
handling the error.
6. Permit easy reversal of actions. This feature relieves anxiety, since the user
knows that errors can be undone; it thus encourages exploration of unfamiliar
options. The units of reversibility may be a single action, a data entry, or a
complete group of actions.
7. Support internal locus of Control. Experienced operators strongly desire the
sense that they are in charge of the system and that the system responds to
their actions. Design the system to make users the initiators of actions rather
than the responders.
8. Reduce short-term memory load. The limitation of human information
processing in short-term memory requires that displays be kept simple,
multiple page displays be consolidated, window-motion frequency be
reduced, and sufficient training time be allotted for codes, mnemonics, and
sequences of actions.
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334
147
Key Words/Terms
Further Reading
Acknowledgements
Using UMI: Software Engineering with
Objects and Components
Learning to Program with Visual Basic
Copyright
Published by the International University of Management, Namibia, Windhoek, 2010. IUM Namibia. No part of this publication
may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise, without prior permission of the publishers
IUM WMS 334