Mscit 203 SLM
Mscit 203 SLM
Mscit 203 SLM
Babasaheb Ambedkar
BAOU
Educa on
for All
Open University
(Established by Government of Gujarat)
Master of Science
Informa on Technology
MSCIT - 203
27
2021
Object Oriented
Analysis and Design
using UML
Course Writer
ISBN: 978-81-942146-6-3
Acknowledgement: Block-3 and Block-4 in this book is modifications based on the work created and Shared
by the Saylor Academy of Unit-3for the course CS302 Software Engineering
(https://learn.saylor.org/course/view.php?id=73§ionid=18225) and used according to terms described in a
Creative Commons Attribution 3.0 Unported (CC BY 3.0) License: https://creativecommons.org/licenses/by/3.0/
Printed and published by: Dr. Babasaheb Ambedkar Open University, Ahmedabad While all efforts
have been made by editors to check accuracy of the content, the representation of facts, principles,
descriptions and methods are that of the respective module writers. Views expressed in the publication
are that of the authors, and do not necessarily reflect the views of Dr. Babasaheb Ambedkar Open
University. All products and services mentioned are owned by their respective copyrights holders, and
mere presentation in the publication does not mean endorsement by Dr. Babasaheb Ambedkar Open
University. Every effort has been made to acknowledge and attribute all sources of information used in
preparation of this learning material. Readers are requested to kindly notify missing attribution, if any.
Dr. Babasaheb MSCIT-203
Ambedkar Open
University
UNIT-1
Domain Analysis 02
UNIT-2
Models 26
UNIT-3
Object Oriented Design 45
UNIT-4
Design Patterns 65
UNIT-1
Introduction to Web Engineering 86
UNIT-2
Analysis for Web Application 105
UNIT-3
Design for Web Application 125
UNIT-4
Web Design 138
Block-3: Introduction to UML and UML Diagrams
UNIT-1
Fundamentals of UML 161
UNIT-2
Introduction to UML 169
UNIT-3
Fundamentals of UML Diagrams 178
UNIT-1
Collaboration Diagram 195
UNIT-2
Sequence Diagram 206
UNIT-3
Timing and Interaction Overview Diagram 223
iv
Block-1
Introduction to Object Oriented
Analysis
1
Unit 1: Domain Analysis
1
Unit Structure
1.1. Learning Objectives
1.9. Assignments
1.10. Activities
1.12. References
2
1.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
In OOP, program will be split into several small, manageable and reusable sub
programs. Each sub program has its own identity, data, logic and defined
communication with other sub programs.
Object
Something visible like car, spoon, banana, sparrow, bulb or ball etc.
Something that one cannot touch or abstract like bank account, date, error or
email.
Figure 1 - Objects
3
Each Object has its own attributesand behaviour.
Attributesare the characteristics or the properties of the object. For example, in case
of car, the attributes arecolour and manufacturer. The attributes of one object is
independent of another, so one can have a white car and other may have a red car.
Behaviour is something we can do with the object(actions); in case of car, car can
run. Another example, in case of bank-account, bank-account can be credited or
debited.
Class
A class is the type of data structurewhere you can define properties and behaviour.
Encapsulation
Benefits of Encapsulation:
4
Reuse: Data and the Operations that manipulate data, are merged in single
entity (class). This helps components reuse.
Interface among encapsulated objects are simplified: An object which is
using other object’s operations, need not be worried about implementation or
internal data structure.
Abstraction
Abstraction is the idea of focusing on the common properties and behaviours of the
object within some context, and ignore what’s unimportant or irrelevant within the
context.
For example, we might want to create an abstraction for a food object. In a health
context, its “nutritional value” would be part of anobject and “cost” can be
ignored.
Let's take the person class. What are the essential characteristics of a person that
we care about? Well, it's hard to say because person is so vague and we have
notdefinedthe purpose of our person class. The abstractions you create are relative
to some context. For example, if you are creating a driving app, you would care
about a person in the context of a driver.You can consider
driving_licence_number as an attribute. In another example, person in the
context of student. What are some of the essential characteristics of a student?
Here, you can include therole_number, courses_name and grades in each
course. These are basic attributes of a person in the context of student.
The attributes do not disappear over time although their values may change since
they are essential characteristics of a student. For a course, the student's grade
value may change but student always have a grade attribute. This means the actual
values of these attributes may change, but the attributes themselves do not.
Inheritance
Using Inheritance,one can create new classfrom existing class by extending and
refining its capabilities. The existing classis called base class/parent class/ super-
5
class and the newly created class is called derived class/child class/subclass. The
subclass can inherit or derive the attributes and methods of the super class, provided
that the super class allows so. Besides, the subclass may add its own attributes and
methods and may modify super-class methods.
Figure 3 - Inheritance
Note: If one makes a change in the Person class, it will automatically cascade down
and affect the inheriting classes.
Polymorphism
Polymorphism is originally a Greek word that means the ability to take multiple
forms.
Objects of classes belonging to the same hierarchical tree (inherited from a common
base class) may have functions with the same name, but each having different
behaviours.
For an example, there is a base class named Animalsand inheriting classesDog, Cat
and Duck. Each of the inheriting classes override the speak() method. With
polymorphism, each subclass may have its own way of implementation of
6
speak()method. So, when the speak()function is called in an object of the
Dogclass, the function might respond by displaying “Bark”on the screen. On the
other hand, when the same function is called onan object of the Catclass, “Meow”
might get displayed on the screen. In case of a Duck, it may be “Quack”.
The following table explains how the object-oriented approach differs from the
traditional structured approach
7
Figure 4 - The development life cycle of the software
The software development life cycle is typically starts from requirement analysis to
system design to Implementation and testing and finally to deployment.The earliest
stages of Object Oriented Analysis process are requirement analysis and system
design.The difference between analysis and design is often described as “What vs
How”.
In Object Oriented Analysis, developers work with customer and domain experts to
define what the system is supposed to do. Implementation details are supposed to
be ignored at this stage.
The purpose of OOA is to define all classes (that are required to develop system),
attributes and operation associated with classes, and relationships between classes.
To perform Object Oriented Analysis, a software engineer should perform the
following generic steps:
1. Define customer requirements for the system:Define what does the software
needs to do, and what is the problem the software is trying to solve.
2. Identify scenarios or use-cases:Describe the requirements, usually carried out
by using use cases (and scenarios) or user stories.
3. Select classes and objects using basic requirements as a guide.
4. Identify attributes and operations for each system class.
5. Define structures and hierarchies that organize classes.
6. Build an Object Relationship model.
7. Build an Object Behaviour model.
8. Review these models against use-cases or scenarios.
8
Summary:
Domain analysis is the first phase of Domain Engineering. It is a key method for
realizing systematic software reuse (common part).
The Domain is the general field of business or technology in which the clients will
use the software.A Domain Expert is a person who has a deep knowledge of the
domain.
• Faster development
• Better system
• Anticipation of extensions
9
Domain analysis is generallyperformed when an organization wants to create a
domain specific library of reusable classes (components).
Two teams (with same skill levels and experience) have been assigned to build a
new application which required to create 200 classes.
Team-One doesn’t have any class library hence they have to develop all 200
classes from scratch. Team-Two is using robust class library and they found that
100 classes can be reused from library.
Can you guess which team can do better and rapid development?
Probable result;
10
Figure 5 -Domain Analysis
Figure 5 shows key inputs and outputs for the domain analysis process. Domain
analysis is quite similar to knowledge engineering.
The Knowledge engineer investigates a specific area of interest to extract key facts
that may be of use in creating an expert system.
The domain analysis process can be characterized by a series of activities that begin
with the identification of the domain to be investigated and ends with a specification
of the objects and classes that characterize the domain. Berard [Ref-2] suggestedthe
following Activities:
The analyst must first define the domain to be investigated. Next, both Object
Oriented (OO) and non-OO components must be extracted.
The extracted items are organized into categories and naming conventions for each
item are defined.
The analyst must ensure that the application has items that fit into the categories that
have already been defined.
11
Analyse each application in the sample: The following steps are followed by the
analyst:
Develop an analysis model for the objects: The analysis model will serve as the
basis for design and construction of the domain objects.
In addition to these steps, the domain analyst should also create a set of reuse
guidelines and develop an example that illustrates how the domain objects could be
used to create a new application.
Dynamic Components: Focus on control and are sensitive to timing and event
processing. They define how one object interacts with other objects over time.
12
The following components are identified by Monarchi [Ref-3]:
Static view of Semantic classes:As part of the analysis model, requirements are
evaluated and classes are extracted. These classes persist throughout the life of the
application and are used based on the customer requirements.
Static view of Attributes:Each class will be explicitly described. The attributes and
operations associated with the class provide a description of the class.
Dynamic view of Control and Time: The nature and timing of events that change
states must be described.
The use cases and scenarios are two different techniques, but, usually they are used
together.
13
Use cases identifies interactions between the system and its users(using graphical
notations), while a Scenario is a textual description of one or more of these
interactions.
The modelling of the software begins, oncethe scenario of usage has been defined.
Usecases model the system from the end-user’s point ofview.Use-cases should
achieve following objectives:
1. Actors: Are those who interact with the system; human or other systems.
2. Use Case: A use case describes how actors uses a system to accomplish a
particular goal. Use cases are typically initiated by a user to fulfill goals
describing the activities.
3. Connection: Lines that links the actors and the interactions.
14
Here is the example of a use case scenario:
Description It shows how a student can register for a course and view
personal information.
Post-condition The student registered his/her course list for the semester.
15
1.5.2 Class-Responsibility-Collaborator (CRC) Modelling
Once we have some use cases / user stories, the next thing we can do is identify
candidate classes and indicate their responsibilities and collaborations.Class-
Responsibility-Collaborator (CRC) modelling provides a simple means foridentifying
and organizing the classes that are relevant to system or product requirements.
A CRC model is a collection of standard index cards that represent classes. A CRC
card has three sections. The top of the card has the class name. On the left are the
responsibilities of the class, and on the right, you list collaborators.
Responsibilities are the attributesand operations that are relevant for the class.
Stated simply, a responsibility is “anythingthe class knows or does”.
Collaborators are other classes that the class interacts with to fulfil its
responsibilities.
Classes / Objects
Objects will be in form of nouns. Those are the candidate objects, however, not
every potential object can be considered as final object. There are six selection
characteristics.
16
anysolution for the system will almost always be defined as objects in
therequirements model.
Remove any duplicates. We may find same objects with different names, but
they actually mean the same thing.
You may identify an attribute as an object instead. An attribute is a property or
characteristic of the object. For example, order_number is an attribute of
Order class.
Youmay identify a behaviour as an object instead. A behaviour is something
an object can do (responsibility). For example, when we say, “Check the
Order stats”, check here is a behaviour of the Order object.
17
Figure 10 - Refined Objects
Responsibilities
Every application's intelligence defines "what the system knows and what it can do".
This intelligence can be distributed across classes in a number of different ways. For
example, “Dumb” classes (those that have few responsibilities) can be modelled to
act as servants to a few “smart” classes (those having many responsibilities). It has a
few disadvantages: (1) it concentrates all intelligence within a few classes, making
changes more difficult. (2) It tends to require more classes, hence more development
effort.
18
3) Information and the Behaviour related to it should reside within the same
class.
This can be achieved using encapsulation(as discussed in section 1.2.2). Data and
the process that manipulate the data should be within the same class.
4) Information about one thing should be localized with a single class, not
distributed across multiple classes.
A single class should take on the responsibility for storing and manipulating a
specific type of information. This responsibility should not be shared across a
number of classes. If information is distributed, software becomes more difficult to
maintain and more challenging to test.
There are many cases in which a variety of related objects must all show the same
behaviour at the same time. As an example, consider a video game that must
display the following objects: player, player-body, player-arms, player-legs and
player-head. Each of these objects has its own attributes (e.g., position, orientation,
colour, speed) and all must be updated and displayed as the user manipulates a joy
stick. The responsibilities update and display must therefore be shared by each of
the objects. Player knows when something has changed and update is required. It
collaborates with the other objects to achieve a new position or orientation, but each
object controls its own display.
19
Collaborations
1) A class can use its own operations to manipulate its own attributes, thereby
fulfilling a particular responsibility.
2) A class can collaborate with other classes.
After relationship, identify object behaviours. Behaviours are the things/actions the
object can do. In other words, the responsibilities of an object, which will become the
methods in our object class.
So, we can go back to the use case and look for verbs and verb phrases to pick
responsibilities.
Things like verifies items, provides payment and address, process sale, validate
payment, confirm order, provide order number, check order status and send order
details email. Not all of these will become behaviours, some will be combined, some
will need to be split apart, some will just not be needed or be replaced by something
else, but they are a good starting point.
20
Figure 13 - Object behaviours
Class-Responsibility-Collaborator Modelling
Once basic usage scenarios have been developed for the system, it is time to
identify candidate classes and indicate their responsibilities and collaborations.
Class-Responsibility-Collaborator (CRC) modelling provides a simple means for
identifying and organizing the classes that are relevant to system or product
requirements.
A CRC is a collection of standard index cards that represent classes. The cards are
divided into three sections. On the top of the card you write the name of the class. In
the body of the card you list the class responsibilities on the left and the right side
has the other objects (collaborators) that has a relationship with the object.
21
Figure 15 - Class-Responsibility-Collaborator Modelling
They are small, easy to use, you can move them around to show the relationship,
you can modify them easily if there is a mistake.
This modus operandi continues until the use-case is finished. Until all use-cases (or
1.6LET US SUM UP
Object Oriented Analysis methods enable a software engineer to model a problem
by representing both static and dynamic characteristics of classes and their
relationships as the primary modelling components.
The Object Oriented Analysis process begins with the definition of use-cases /
scenarios that describe how the Object Oriented system is to be used. The Class-
Responsibility-Collaborator modelling technique is then applied to document classes
and their attributes and operations. It also provides an initial view of the
collaborations that occur among objects. The next step in the Object Oriented
Analysisprocess is classification of objects and the creation of a class hierarchy.
22
1.7CHECK YOUR PROGRESS: POSSIBLE ANSWERS
Question 1
A Car object has following properties – Manufacturer name, Model, Drive it, Lock it.
Identifywhich among the above properties represent behaviour of the object.
Answer: d)
Explanation: Manufacturer name and Model are the state of the object Car as they
are theattributes of the Object. Drive it, Lock it describes the behaviour of the object
Car. Behaviouris the set of things that an object can do on its own or are acted on.
Question 2
Answer: c), d)
23
Explanation: Multiple derived classes (Truck, Car and Bus) inherit from the same
class Vehicle.Similarly multiple derived classes then in turn inherit from Car.
1.8FURTHER READING
Books
Web sites
https://www.tutorialspoint.com/object_oriented_analysis_design/index.htm
https://en.wikipedia.org/wiki/Object-oriented_analysis_and_design
https://medium.com/omarelgabrys-blog/object-oriented-analysis-and-design-
introduction-part-1-a93b0ca69d36
1.9ASSIGNMENTS
1. Write a simple, one-line definition of each of the following key terms. Try to do
this without referring back to the notes if possible. For each term, give an
example.
Polymorphism
Encapsulation
Abstraction
Inheritance
Polymorphism
Domain expert
1.10ACTIVITIES
Do CRC modelling for ATM machine. You insert your bank debit card into the ATM
machine, the ATM machine will then ask you to enter a PIN authenticating you for
access. After that, you can choose to deposit, withdraw or check your balances.
24
1.11CASE STUDIES
Do a domain analysis for one of the following areas:
Be sure to isolate classes that can be used for a number of applications in the
domain.
1.12 REFERENCES
Ref-1: D.G., Object-Oriented Requirements Analysis and Logical Design,
Wiley, 1993
Ref-2:Berard-E.V., Essays on Object-Oriented Software Engineering,
Addison-Wesley, 1993
Re-3: Monarchi (D.E. and G.I. Puhr, “A Research Typology for Object-
Oriented Analysis and Design,” CACM, vol. 35, no. 9, September 1992, pp.
35–47)
Ref-4: [WIR90] Wirfs-Brock, R., B. Wilkerson, and L. Weiner, Designing
Object-Oriented Software, Prentice-Hall, 1990
25
Unit 2: Models
2
Unit Structure
2.1. Learning Objectives
2.2. Introduction
2.8. Assignments
2.9. Activities
2.11. References
26
2.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
Identify and model (represent) domain constraints on the objects and their
relationships.
Learn various modelling techniques to model different perspectives of object-
oriented software design.
2.2 INTRODUCTION
Software development life cycle start with requirement analysis. Requirements are
mostly defined in the form of tabular lists, use-cases, user stories or decision tables.
The written words are good way to communicate but it is not the best way to
represent the requirements for computer software. Modelling uses combination of
text and diagrams to represent requirements for data, function and behaviour in a
way that is easy to understand and easy to review for correctness, completeness
and consistency.
27
In previous unit, we have already discussed first two processes. We will cover Object
Relationship model and Object Behaviour model in this unit.
For example, a person or a car is an object. A person has attributes like; Name,
Address, Age, etc. A car has attributes like; Make, Model, Colour, etc.
Data objects are connected to one another in different ways. Considertwo data
objects, book and bookstore. These objects can be represented usingthe simple
notation illustrated in Figure 1. A connection is established betweenbook and
bookstore because the two objects are related.
But what are the relationships? First, we must understand the role of books and
bookstoreswithin the context of the software to be built. We can define a set
ofobject/relationship pairs that define the relevant relationships.
For example,
28
Figure 2 - Relationship between objects
Note: Object/relationship pairs are bidirectional. That is, theycan be read in either
direction. A bookstore orders books or books are ordered by abookstore.
Cardinality is: “The data model must be capable of representing the number of
occurrences of objects in a given relationship”.
Cardinality is the specification of the number of occurrences of one object that can
berelated to the number of occurrences of another object. Cardinality is usually
expressedas simply 'one' or 'many.'
For example, a husband can have only one wife (in most cultures),while a parent
can have many children. Taking into consideration all combinations of 'one' and
'many,' two objects can be related as;
• One-to-one (1:1) : An occurrence of object-A can relate to one and only one
occurrence of object-B and an occurrence of object-B can relate to only one
occurrence of object-A.
• One-to-many (1:N) : One occurrence of object-A can relate to one or many
occurrences of object-B but an occurrence of object-B can relate to only one
occurrence of object-A. For example, a mother can have many children, but a
child can have only one mother.
29
• Many-to-one (1:N) : One occurrence of object-A can relate to one
occurrences of object-B but an occurrence of object-B can relate to oneor
many occurrence of object-A. For example, multiple addresses belongs to a
customer.
• Many-to-many (M:M):An occurrence of object-A can relate to one or more
occurrences of object-B, while an occurrence of object-B can relate to one or
more occurrences of object-A. For example, an uncle can have many
nephews, while a nephew can have many uncles.
Cardinality notation:
Figure 3 - Cardinality
Figure 4 - Modality
Note: We can put both cardinality and modality on the same line.
30
Figure 5 – Cardinality and Modality
Figure 7 - Example
31
2.3 THE OBJECT-RELATIONSHIP MODEL
In the previous module, wehave discussed about Object Oriented Analysis and how
to complete a conceptual design using CRC cards.
A CRC is a collection of standard index cards that represent classes. The cards are
divided into three sections. On the top of the card you write the name of the class. In
the body of the card you list the class responsibilities on the left and the right side
has the other objects (collaborators) that has a relationship with the object.
1) Need to understand the responsibilities for each class. The CRC model index
card contains a list of all responsibilities.
2) Need to define those collaborator classes that help in achieving each
responsibility. This establishes the “connection” between classes.
A relationship exists between any two classes that are connected. Therefore,
collaboratorsare always related in some way. The most common type of relationship
is binary (a connection exists between two classes). A binary relationship has a
specific direction, which is defined based on role (client or server) of the class.
Rumbaugh and his colleagues [Ref-1] suggest that relationships can be derivedby
examining the stative verbs (expressing a state) or verb phrases in the statement of
scope or use-cases. Using a grammatical parse, the analyst isolates verbs that
indicatephysical location or placement (next to, part of, contained in),
32
communications (transmitsto, acquires from), ownership (incorporated by, is
composed of), and satisfactionof a condition (manages, coordinates, controls).
These provide an indication ofa relationship.
The Unified Modelling Language (UML) notation for the object-relationship model
has been adapted from the entity-relationship modelling techniques. Objects are
connected to other objectsusing named relationships. The cardinality of the
connection is specified.
The object relationship model (like the entity relationship model) can be derivedin
three steps:
1. Using the CRC index cards, a network of collaborator objects can be drawn.
Figure 9 represents the class connections for SafeHome objects. First the
objects are drawn, connected by unlabelled lines that indicate some
relationship exists between the connected objects.
2. Reviewing the CRC model index card, responsibilities and collaborators are
evaluated and each unlabelled connected line is labelled. To avoid ambiguity,
an arrow head indicates the “direction” of the relationship.
3. Once the labelled relationships have been established, each end is evaluated
to determine cardinality. As we discussed in introduction, four options exist: 0
to 1, 1 to 1, 0 to many or 1 to many. For example, the SafeHome system
contains a single control panel (the 1:1 cardinality notation indicates this). At
least one sensor must be present for polling by the control panel. However,
there may be many sensors present (the 1:m notation indicates this). One
sensor can recognize from 0 to many sensor events (e.g., smoke is detected
or a break-in has occurred).
The steps just noted continue until a complete object-relationship model has
beenproduced.
33
Figure 9 - SafeHome system - Relationships between objects
34
Multiplicity: it’s not always symmetrical. The relationship of B to A may not be the
same as A to B. For example, a system may create many audible alarms but each
audible alarms is created by only one system.
Description Syntax
The object behaviour model indicates how an Object Oriented system will respond to
external events.
To create the behaviour model, the analyst must perform the following steps:
1. Evaluate all use cases to fully understand the sequence of interaction within
the system.
2. Identify events that drive the interaction sequence and relate to specific
objects.
3. Create an interaction diagramfor each use-case.
4. Build a state diagram for the system.
35
5. Review the object-behaviour model to verify accuracy and consistency.
The use case represents a sequence of activities thatinvolves actors (user) and the
system. In general, an event occurs whenever an Object Orientedsystem and an
actor (an actor can be a person, a device, or even an external system)exchange
information.
Note:An event is Boolean. Event is different from information. Event shows that
information is exchanged or not.
Typical events;
36
- The event “password entered” doesn’t explicitly change the flow of control,
but the result of the event compare password (derived from the interaction
“password is compared with the valid password stored in the system”) will
have an explicit impact on the flow of control.
Once all events have been identified, they are allocated to the objects
involved.Objects can be responsible for generating events (e.g., homeowner
generates the “password entered” event)
Interaction diagrams are models that describe how a group of objects collaborate in
a single use case. The diagrams show a number of example objects and the
messages that are passed between these objects within the use-case.
Sequence models show the sequence of object interactions that take place;
37
Figure 10 - sequence diagram of SafeHome
In the context of the Object Oriented system, Objects can be in either state;
38
An event (sometimes called a trigger) must occur to force an object to make a
transition from one active state to another. Figure 12 shows basic state diagram.
Transitions:
39
Figure 13 - Transitions
States:
Figure 14 shows a simple representation of active states for the control panel object
in the SafeHome system.
40
Each arrow shown in Figure 14 represents a transition from one active state of an
object to another. The labels shown for each arrow represent the event that
triggersthe transition. Although the active state model provides useful insight into the
“life history” of an object, it is possible to specify additional information to provide
more depth in understanding the behaviour of an object. In addition to specifying the
event that causes the transition to occur, the analyst can specify a guard and an
action. A guard is a Boolean condition that must be satisfied in order for the
transition to occur. For example, the guard for the transition from the “at rest” state to
the “comparing state” in above Figure can be determined by examining the use-
case:
In general, the guard for a transition usually depends upon the value of one or more
attributes of an object. In other words, the guard depends on the passive state of the
object.
Once a complete event trace has been developed, all of the events that cause
transitionsbetween system objects can be collated into a set of input events and
outputevents (from an object). This can be represented using an event flow diagram.
41
2.5 LET US SUM UP
Object oriented Analysis methods help a software engineer to model a problem
byrepresenting both static and dynamic characteristics of classes and their
relationships as the primary modelling components. Like earlier Object
Orientedanalysis methods, theUnified Modelling Language builds an analysis model
that has the following characteristics:
Question 1:
Use the scenario described by “A customer can make many payments, but each
payment is made by only one customer” as the basis for an entity
relationshipdiagram (ERD) representation.
Answer:
42
2.7 FURTHER READING
Books
Web sites
2.8 ASSIGNMENTS
1. Write a simple, one-line definition of each of the following key terms. Try to do
this without referring back to the notes if possible. For each term, give an
example.
o Cardinality
o Modality
o Multiplicity
o State / transition / event / action
2. What role does cardinality play in the development of an object-relationship
model?
3. What is the difference between an active and a passive state for an object?
2.9 ACTIVITIES
Develop a simple presentation on one static or dynamic modelling diagramused in
UML. Present the diagram in the context of a simple example, but provideenough
detail to demonstrate most important aspects of the diagrammatic form.
43
2.10 CASE STUDIES
Describe the difference between static and dynamic viewsof an OO system in your
own words.
2.11 REFERENCES
44
Unit 3: Object Oriented Design
3
Unit Structure
3.1. Learning Objectives
3.2. Introduction
3.9. Assignments
3.10. Activities
3.12. References
45
3.1 LEARNING OBJECTIVES
After studying this unit student should be able to:
3.2 INTRODUCTION
Object Oriented Design (OOD) is the process of defining the objects and their
interactions to solve a problem that was identified and documented during the Object
Oriented Analysis (OOA). OOD is a design model that is considered as a blueprint
for software construction.
46
Object Oriented Design is built upon four software design concepts:
A. Abstraction
At the highest level abstraction, a solution is stated in higher level
terms using the language of the problem context.
The lower level of abstraction provides a more detailed description of
the solution.
A collection of data that describes a data object is a data abstraction.
B. Information hiding
Modules must be specified and designed so that the information like
algorithm and data presented in a module is not accessible for other
modules.
C. Functional independence
The functional independence is the concept of separation and related
to the concept of modularity, abstraction and information hiding.
The functional independence is accessed using two criteria: Cohesion
and coupling.
i. Cohesion
ii. Coupling
D. Modularity
A software is generally divided into named and addressable
components. Sometimes they are called as modules which integrate to
satisfy the problem requirements.
Modularity is the single attribute of a software that permits a program to
be managed easily.
47
OOD is divided into two majoractivities:
1) System design
2) Object design
System design involves the design of football ground, goal poles, grass on the
ground, location of the ground, length and width of the ground, putting line marks on
the ground, scoreboard etc.
Object design focus on the: how the games needs to be played is defined by set of
rules that need to be followed. Thus the players need to play game within the defined
rules. So the more the player knows those rules the better they can play the game
without making fowls. Similarly the rules for object oriented concept are inheritance,
composition, abstraction and encapsulation. Thus the better we know these
concepts the better design we can make.
48
1. Subsystem layer contains a representation of each of the subsystems that:
Enable the software to achieve its customer-defined requirements.
Implement the technical infrastructure that supports customer
requirements.
2. Class and object layer contains:
Class hierarchies that enable system to be created using
generalizations
Representations of each object.
3. Message layer:
Contains the design details that enable each object to communicate
with its collaborators.
Establishes the external and internal interfaces for the system.
4. Responsibilities layer contains the data structure and algorithmic design for
all attributes and operations for each object.
The design pyramid emphases the layers of the design for a specific product /
system.
However there exist another layer of design that forms the base on which the
pyramids rests. This foundation layer emphasis on the design of domain objects
(known as design patterns). Domain objects play a key role to provide support for
interface design, task and data management.
CRC index cards + Attributes, Operation, Collaboration Class & Object design
49
3.3.2 Design Issues
Bertrand Meyer [Ref-3] suggests five criteria for judging a design method's ability to
achieve modularity:
Figure 2 – Decomposability
Figure 3 - Composability
3. Understandability: The ease with which a program component can be
understood without reference to other information or other modules.
4. Continuity: A method satisfies modular continuityif, a small change in problem
specification will trigger a change in just one module or few modules.
50
5. Protection: A method satisfies modular protection if, the effect of an abnormal
condition occurring at run time in a module will remain limited to that module.
Example: exception handling
From these criteria, Meyer [Ref-3] suggests five basic design principles that can
bederived for modular architectures:
1. Linguistic modular units: Programming language should be capable of
supporting the modularity.
2. Few interfaces (low coupling): This principle states that the overall number
of communication between modules shouldbe as small as possible.
3. Small interfaces (weak coupling): If any two modules communicate, they
should exchange as little information as possible.
4. Explicit interfaces: If two modules communicate, it should be in an obvious
and direct way. If we change a module, we need to see what other
modules may be affected by these changes. A traceability matrix can be
used for this purpose.
5. Information hiding: All information (implementation) about a component
should be hidden from outside access.
51
These design steps are iterative and executed incrementally until a complete design
is produced.
1. System Design
Primary objective of UML system design is to represent the software
architecture:
Conceptual architecture is concerned with the structure of the static
class model and the connections between components of the model.
Module architecture describes the way the system is divided into
subsystems or modules and how they communicate by exporting and
importing data.
Code architecture defines how the program code is organized into files
and directories and grouped into libraries.
Execution architecture focuses on the dynamic aspects of the system
and the communication between components as tasks and operations
execute.
2. Object Design
UML object design focuses on a description of objects and their
interactions with one another.
Detailed specification of attribute data structures and a procedural design
of all operations are created.
Visibility for all class attributes is defined and interfaces between objects
are elaborated to define the details of a complete messaging model.
52
The system design process includes the following activities:
They may reside within the same product hardware, or they may manage the
same class of resources.
Subsystems are identified by their responsibilities (the services that it provides) [Ref-
4].
53
Subsystem should have a well-defined interface through which all
communication with the rest of the system occurs.
Classes within a subsystem should collaborate only with other classes within
the subsystem.
The number of subsystems should be kept low.
A subsystem can be partitioned internally to help reduce complexity.
When two subsystems communicate with one another, they can establish a
client/server link or a peer-to-peer link. Client / server link - each subsystem takes
on one of the roles (client or server). Service flows from server to client in only one
direction. In peer-to-peer link - services may flow in either direction.
54
3.4.2 Concurrency and Subsystem Allocation
Concurrent tasks are defined [Ref-4] by examining the state diagram for each object.
Applications must handle multiple tasks in a manner that simulates parallelism.
Coad and Yourdon [Ref-6] suggest the following strategy for the design of the
objects that manage concurrent tasks:
55
Once the characteristics of the task have been determined, need to define
coordinator task and associated objects.
Once the actor and its usage scenario are defined, a command hierarchy is
identified.
1. The command hierarchy defines major system menu categories (the menu
bar or tool bar) and all sub-menus.
2. The command hierarchy is refined iteratively until every use-case can be
implemented by navigating the hierarchy of functions.
56
A Database management system is often used as a common data store for all
subsystems. The objects required to manipulate the database are:
Subsystem may use different resources like disk drive, processor, database etc.
The following design steps can be applied to specify a contract for a subsystem
[Ref-7]:
57
3. Considering one contract at a time, create a table of the form shown
below table.
For each contract, the following entries are made in the table:
Type—the type of contract (i.e., client/server or peer-to-peer).
Collaborators—the names of the subsystems that are parties to the
contract.
Class—the names of the classes (contained within a subsystem) that
support services implied by the contract.
Operation—the names of the operations (within the class) that
implement the services.
Message format—the message format required to implement the
interaction between collaborators.
Object design is concerned with the detailed design of the objects and their
interactions. It is completed within the overall architecture defined during system
design and according to agreed design guidelines and protocols. Object design is
particularly concerned with the specification of attribute types, how operations
function, and how objects are linked to other objects.
58
A design description of an object (an instance of a class or subclass) can take one of
two forms [Ref-9]:
//Call a method associated with a buffer object that returns the next value
// in the buffer
v = circularBuffer.Get () ;
//Call the method associated with a thermostat object that sets the
// temperature to be maintained
thermostat.setTemp (20) ;
59
Representations contained in the analysis model and the system design provide a
specification for all operations and attributes.
Once the basic object model is created, optimization should occur. Rumbaugh and
his colleagues [Ref-4] suggest three major thrusts for OOD design optimization:
60
Program should be implemented in an object-oriented language like C++, Java, and
ADA etc.
Like Object Oriented Analysis, there are many different Object Oriented Design
methods. UML is an attempt to providea single approach to OOD that is applicable in
all application domains. UML and other methods approach the design process
through two levels of abstraction—design ofsubsystems (architecture) and design of
individual objects.
a) OOA is concerned with translating the initial model into a specific model that
can be implemented by a software.
b) OOD is concerned with translating OOA model into a specific model that can
be implemented by a software.
61
Answer: b)
Answer: a), b)
Answer: b), c)
a) Uses, cases
b) People, classes and objects
c) People, computer
d) Actors, use cases
Answer: d)
62
Software Engineering by Roger S. Pressman 6thEdition McGraw Hill
Publications.
Web sites
https://en.wikipedia.org/wiki/Object-oriented_design
https://en.wikipedia.org/wiki/Object-oriented_analysis_and_design
https://www.tutorialspoint.com/object_oriented_analysis_design/
3.9 ASSIGNMENTS
Question 1: Discuss how the use-case can serve as an important source of
information for design.
3.10 ACTIVITIES
Write a simple, one-line definition of each of the following key terms. Try to do this
without referring back to the notes if possible. For each term, give an example.
Cohesion
Coupling
Decomposability
Continuity
Describe the difference System Design process and Object design process in your
own words
3.12 REFERENCES
63
• Ref-2: Fichman, R. and C. Kemerer, "Object-Oriented and Conceptual
Design Methodologies," Computer, vol. 25, no. 10, October 1992, pp. 22–
39.
• Ref-3: Meyer, B., Object-Oriented Software Construction, 2nd ed., Prentice-
Hall, 1988.
• Ref-4: Rumbaugh, J., et al., Object-Oriented Modeling and Design, Prentice-
Hall, 1991.
• Ref-5: Buschmann, F., et al., A System of Patterns: Pattern Oriented
System Architecture, Wiley, 1996.
• Ref-6: Coad, P. and E. Yourdon, Object-Oriented Design, Prentice-Hall,
1991.
• Ref-7: Wirfs-Brock, R., B. Wilkerson, and L. Weiner, Designing Object-
Oriented Software, Prentice-Hall, 1990.
• Ref-8: Bennett, S., S. McRobb, and R. Farmer, Object Oriented System
Analysis and Design Using UML, McGraw-Hill, 1999.
• Ref-9: Goldberg, A. and D. Robson, Smalltalk-80: The Language and Its
Implementation, Addison-Wesley, 1983.
64
Unit 4: Design Patterns
4
Unit Structure
4.1. Learning Objectives
4.2. Introduction
4.8. Assignments
4.9. Activities
65
4.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
4.2 INTRODUCTION
Each of us has encountered a design problem and always thought: I wonder if
anyone has developed a solution for this? The answer is almost always— yes!
The problem is finding the solution; ensuring that it does fit the problem we have
encountered; understanding the constraints that may restrict the manner in which the
solution is applied; and finally, translating the proposed solution into design
environment.
For software design, context allows the reader to understand the environment in
which the problem resides and what solution might be appropriate within that
environment.
A person wanted to travel from Ahmedabad to Mumbai. Here the context is,
travelling within India and using available transportation infrastructure (like roads,
railway, flight). What are all constrains that will affect this travel problem? Let’s point
out some of them.
66
Time - how fast the person wants to reach Mumbai.
Purpose - will trip include site-seeing? Or business trip.
Others - like person wants to travel by his own car.
Based on above constrains, we can define the problem (travelling from Ahmedabad
to Mumbai) more effectively. Let’s consider different scenarios.
In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John
Vlissidespublished a book titled “Design Patterns - Elements of Reusable Object-
Oriented Software” which initiated the concept of Design Pattern in Software
development.
These authors are collectively known as Gang of Four (GOF). According to these
authors design patterns are primarily based on the following principles of object
orientated design.
67
because it will affect all programmers using the library. On the other
hand they can change the implementation as much as they like.
o As a programmer, you should code with interface rather than concrete
implementation. So any change in code will not break integration. So
benefits of the interface are;
1. It hides the things you do not need to know thus making the
object simpler to use.
2. It provides the contract of how the object will behave so you can
depend on that.
Favour object composition over inheritance
o Inheritance is referred as “is-a” relationship, and composition is
referred as “has-a” relationships.
o In composition, a class, which desire to use functionality of an existing
class, doesn't inherit, instead it holds a reference of that class in a
member variable.
68
• The pattern has a significant human component (minimize human
intervention). All software serves human comfort or quality of life; the best
patterns explicitly appeal to aesthetics and utility.
A design pattern saves us from “reinventing the wheel,” or worse, inventing a “new
wheel” that is slightly out of round. If used effectively, Design patterns will always
make us a better software designer.
Architectural design patterns describe high level design problems that are solved
using a structural approach.
Data patterns describe data modelling solutions that can be used to solve frequent
data-oriented problems.
Interface design patterns describe common problems related to user interface and
the solution within context of specific characteristics of end users
In design patterns book, Gamma and his colleagues (GoF) [Ref-1] focuses on three
categories of patterns in which various design patterns can be categorized. (in
context of Object Oriented Design): Creational design patterns, Structural design
patterns and Behavioural design patterns.
69
2) Hide how instances of concrete classes are created and combined.
Design patterns can be classified by scope, which specifies whether the pattern
applies primarily to classes or to objects:
Class pattern deals with relationship between classes and their subclasses.
These relationship are established through inheritance, so they are static.
Object pattern deals with object relationship, which can be changed at run-
time and are more dynamic.
Creational patterns emphasize the automatic creation of objects within code, rather
than requiring you to instantiate objects directly. So here we are abstracting object
creation code from business logic (caller function). It will be easy to modify object
70
creation whenever it is required without any change or modification in business logic
or calling function.
Factory:
Define an interface for creating an object, but let subclasses decide which class to
instantiate. The Factory method lets a class defer instantiation it uses to subclasses.
Figure 2 – Factory
Real life example: Vehicle factory, which returns car models based on
manufacturer.
71
Figure 3- Abstract Factory
Real life example: Providing data access to two different data sources (e.g. a
SQL Database and a XML file). You have two different data access classes (a
gateway to the data store). Both inherit from a base class that defines the
common methods to be implemented (e.g. Load, Save, Delete).Which data
source shall be used shouldn't change the way client code retrieves its data
access class. Your Abstract Factory knows which data source shall be used
and returns an appropriate instance on request. The factory returns this
instance as the base class type.
Builder:
Builder pattern is used to construct an object step by step and the final object is
returned in last step. The object constructed by Builder patterns are usually a
complex object. The process of constructing an object should be generic so that it
can be used to create different behaviour of the same object runtime.
Real life example: Consider construction of a house. House is the final end
product (object) that is return as the output of the construction process. It will
72
have many steps, like floor construction, wall construction, windows and door
construction. Finally the whole house object is returned. Here using the same
process we can build houses with different properties.
Prototype:
When creation of an object is time consuming, costly and if we have similar object
instance in hand, then we should go for prototype pattern. Instead of going through
a time consuming process to create a complex object, just copy the existing similar
object and modify it according to our needs.
Real life example: There is basic bike object with four gears. If suppose
someone wants to make a different object say super bike with 6 gears,
Instead of creating object from the scratch one can copy the existing instance
and make required changes to the copied instance. Thus the prototype design
pattern is implemented.
Singleton:
There are two points in the definition of a singleton design pattern,
As per GoF[Ref-1], “Ensure a class has only one instance, and provide a global point
of access to it”.
As per Wikipedia [Ref-6], “structural design patterns are design patterns that ease
the design by identifying a simple way to realize relationships among entities”.
The structural design patterns simplifies the structure by identifying the relationships.
Structural design patterns are concerned with how classes and objects can be
composed, to form larger structures.
73
Adapter:(=Wrapper)
Adapter pattern works as a link between two incompatible interfaces. This pattern
combines the capability of two autonomous interfaces.Adapter lets classes work
together that couldn’t otherwise because of incompatible interfaces.
Figure 4 - Adaptor
Real life example:The travel power adapter.American socket and plug are
different from British one. Their interface are not compatible with one another.
British plugs are cylindrical and American plugs are rectangular. You can use
an adapter in between to fit an American (rectangular) plug in British
(cylindrical) socket.
Bridge:
As per GoF [Ref-1], “Decouple an abstraction from its implementation so that the two
can vary independently”. Bridge design pattern is a modified version of the notion of
“prefer composition over inheritance”.
Composite:
74
As per GoF [Ref-1], “Compose objects into tree structures to represent part-whole
hierarchies. Composite lets clients treat individual objects and compositions of
objects uniformly.”
Decorator:
Decorator pattern allows a user to add new functionality to an existing object without
altering its structure.This pattern creates a decorator class which wraps the original
class and provides additional functionality keeping class methods signature intact.
Figure 5 - Decorator
75
Real life example:A Pizza billing. Pizza shop sell few pizza varieties and
provide toppings in the menu. As per the decorator pattern, we need to
implement toppings as decorators and pizzas will be decorated by those
toppings' decorators. Practically each customer would want toppings of his
desire and final bill-amount will be composed of the base pizzas and
additionally ordered toppings. Each topping decorator would know about the
pizzas that it is decorating and its price. GetPrice() method of Topping
object would return cumulative price of both pizza and the topping.
Facade:
As per GoF [Ref-1], definition for facade design pattern is, “Provide a unified
interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level
interface that makes the subsystem easier to use.”
Figure 6 - Facade
Real life example: Start button / key of car. Starting a car involves multiple
steps. Imagine how it would be if we had to adjust multiple valves and
controllers. The facade we have is just a key hole. On turn of a key it send
instruction to multiple subsystems and executes a sequence of operation and
completes the objective. All we know is a key turn which acts as a facade and
simplifies our job.
76
Proxy:
Proxy means ‘in place of’ or ‘Representing’ or ‘in place of’ or ‘on behalf of’ are literal
meanings of proxy and that directly explains proxy design pattern.
Real life example:ATM. ATM is holding proxy objects for bank information
that exists in the remote server.
Chain of Responsibility:
77
Command:
Interpreter:
Interpreter design pattern gives the ability to define a language grammar with an
interpreter, where in that interpreter uses that definition to interpret sentences of that
language.Typically, each symbol is defined by one class, and then a syntax tree is
used to parse (interpret) the overall sentence.
Figure 8 - Interpreter
Mediator:
Generates a third party object (mediator) that acts as a go-between for interactions
between two other similar objects (colleagues). Commonly, this is used when
multiple objects need to communicate, but do not (or should not) be aware of the
others respective implementation or behaviour.
78
If ATC is not there all the flights have to interact with one another and
managing communication becomes quite difficult.
Memento:
Stores the state of an object, allowing for restoration (rollback) of the object to a
previous state. This behaviour is well-known when using word processors that
implement the undo (Ctrl + Z) feature.
Observer:
In observer design pattern multiple observer objects registers with a subject for
change notification. When the state of subject changes, it notifies the observers.
Objects that listen or watch for change are called observers and the object that is
being watched for is called subject.
State:
Allows for the behaviour of a class to change based on the current state. While these
states are often changed throughout execution, the implementation of each possible
state is typically defined by a unique class interface.
Real life example:The DVD player. Let’s assume that the DVD player has
two buttons: play and menu. The DVD player will behave differently when you
push these button according to its current state. When we press play button,
the state of button change and now it will act as “stop” button.
Template:
79
Template method design pattern is to define an algorithm as skeleton of operations
and leave the details to be implemented by the child classes. The overall structure
and sequence of the algorithm is preserved by the parent class.
The pattern name is a handle we can use to describe a design problem, its
solutions and consequences in a word or two. Naming a pattern immediately
increases the design vocabulary of programmers. Having a vocabulary for
patterns enables to talk about patterns with other programmers, in the
documentation, etc.
The problem describes when to apply the pattern. It explains the problem and
its context. It might describe specific design problems such as how to
represent algorithms as objects. Sometimes the problem includes also a list of
conditions that must be met before it makes sense to apply the pattern.
The solution describes the elements that make up the design, their
relationships, responsibilities, and collaborations. The solution doesn’t
describe a particular concrete design or implementation, because a pattern is
like a template that can be applied in many different situations. Instead, the
pattern provides an abstract description of a design problem and how a
general arrangement of elements (classes and objects) solves it.
The consequences are the results and trade-offs of applying the pattern.
They may address language and implementation issues as well. Since reuse
is often a factor in object-oriented design, the consequences of a pattern
include its impact on a system’s flexibility, extensibility, or portability.
80
The Gang of Four (GoF) [Ref 2] used a consistent format to describe patterns. They
developed a template for describing a design pattern. The template provides a
uniform structure to the information and make design patterns easier to learn,
compare and use. This template describes a design pattern with:
We should be careful when we define pattern name. Because biggest technical issue
is finding existing pattern from pattern repository. If we give meaningful pattern
name, it will help us to find “right” pattern.
Pattern template provides a standard for describing a design pattern and capture
characteristics which can be searched easily.
81
developers faced during software development. These solutions were obtained by
trial and error by many software developers over quite an extensive period of time.
Design patterns provide an organised mechanism for describing problems and their
solutions in given context. Design patterns help the software engineering community
to understand design knowledge and way to reuse it.
Note: It is very critical to use correct design patterns to solve the specific problem.
Design patterns are a double-edge sword, if used in the wrong context, they can
make things worse. If use correctly, they help us to solve problem effectively.
(a) Adapter
(b) Decorator
(c) Delegation
(d) Proxy
Answer: b
(a) Adapter
(b) Decorator
(c) Delegation
(d) Proxy
Answer: d
Question 3: You have a class that accepts and returns values in unit kilometre, but
you need to use mile as unit. The design pattern that would best solve your problem
is ;
(a) Adapter
(b) Decorator
(c) Delegation
82
(d) Proxy
Answer: A
Web sites
https://www.tutorialspoint.com/design_pattern/
https://en.wikipedia.org/wiki/Software_design_pattern
https://javapapers.com/design-patterns/builder-pattern/
4.9 ASSIGNMENTS
Question 1: Write three “parts” of a design pattern and provide an example of each
parts.
Question 2: How do Creational design patterns are different from Behavioural design
pattern?
4.10 ACTIVITIES
Activity 1: Develop a complete pattern description for any one design pattern (you
can use design pattern template discussed in section 11.4).
83
4.11 CASE STUDIES
Build a pattern-organizing table for the patterns we learn in this unit.
4.12 REFERENCES
84
Block-2
Introduction to Web Engineering
85
Unit 1: Introduction to Web
Engineering
1
Unit Structure
2.1. Learning Objectives
2.2. Introduction
2.8. Assignments
2.9. Activities
2.11. References
86
1.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
1.2 INTRODUCTION
The World Wide Web (WWW) and the Internet that empowers it are perhaps the
most significant developments in the history of computing. These technologies have
drawn all of us (with many more who will sooner or later follow) into the information
age. WWW and Internet has great impact on our lives and became integral part of
our life. As the web became widespread the span of application also increased from
normal static web pages to advanced dynamic applications and arise the need of
approach that engineer such applications efficiently and thus Web engineering
evolved.
In this unit we will discuss Web Application and Web Engineering. We will explore
Web Engineering and understand concepts behind it. We will also explore various
aspects and attributes of Web Engineering, Web Engineering layers and Web
engineering process. We will also discuss about Web-Engineering team in details.
87
World Wide Web was originally designed to present information to Web surfers using
simple web sites that contained primarily of hyperlinked text documents. However,
as web 2.0 evolves, WebApps are evolving into sophisticated computing
environments that not only provides stand-alone features, computing functions and
content to the end users, but also are integrated with corporate databases and
business applications. Modern WebApps are mostly large-scale software
applications for e-commerce, information distribution, entertainment, collaborative
working and numerous other activities. WebApps run on distributed hardware
platforms, implemented in several languages and styles, interfaced with other
websites and databases.
Note: Even though WebE uses Software Engineering principles, concepts and
methods, it involves modified, improved or different methodologies, tools,
techniques, and guidelines to meet the unique requirements of WebApps
Development.
It is important to note that even though most of the WebApps are unique and
different from each other, there are a few attributes that any good WebApps
architecture should display. According to Powell the following attributes are
encountered in the vast majority of WebApps [Ref-2].
Network intensiveness.
88
Web), Intranet (communication within a single organization) or an Extranet (inter-
intranet communication).
Concurrency.
Unpredictable load.
Performance.
Availability.
WebApps user always asks for 100% availability (24 hours in a day / 7 days in
week / 365 days in year). In order to serve different range of customers,
WebApps should have high availability.
Data driven.
WebApps commonly process or use information that exists on databases that are
not an integral part of the Web-based environment. WebApps like e-commerce or
financial applications commonly use databases to access information.
Content sensitive.
89
An important element of WebApps is quality of content. The quality and artistic
(look and feel) nature of content is an important factor of the quality of a WebApp.
Continuous evolution.
Immediacy.
Security.
Aesthetics.
Aesthetics is WebApp’s look and feel. Look and feel are equally important as
technical design. This attribute gets affected by user’s cultural background,
education, class or personal choice, and these may influence his or her
judgments of aesthetic value. One need to consider these aspects in order to
90
match them with the appropriate web application design. Thus, as aesthetics
involves multiple dimensions of a target users, it demands insight into diverse
areas relevant to an applications distribution, including foreign market
considerations. Here look and feel does not only mean the use of images,
graphics or the audio-visual interface intensively but interactivity and easiness to
the user, which makes the application easy to access and provides value added
features.
Above discussed are some general attributes applicable to the web applications but
their influence and impact may vary from application to application.
91
1.3.3 WebApp Engineering Layers
Process
In Web Application even when cycle time is rapidly changing and it dominate
development thinking, it is important to understand that the problem must still need
to be analysed carefully, an appropriate design should be developed, implementation
should advance in an incremental fashion, and well-planned testing strategy must be
initiated. In short, process is often agile and is almost always incremental. However,
these framework activities must be defined within a process that:
A. Accept change.
B. Encourages the creativity and independence of development staff and
strong interaction with WebApp stakeholders.
C. Builds systems using small development teams.
D. Emphasizes incremental development using short development cycles
[Ref-4].
Methods
The WebE methods are fundamentally a set of technical tasks that helps a Web
engineer to conceptualize, characterize, and then build a high-quality WebApp.
Communication methods
92
These methods provides a basis for understanding “what needs to be done”.
By this methods one can understand content to be delivered by a WebApp,
and the methods of interaction that individual class of user will entail as
navigation through the WebApp occurs.
Design methods
Design methods incorporates a series of design techniques that address
WebApp content, application and information architecture design, interface
design, and navigation structure.
Testing methods
Testing methods incorporate formal technical reviews of the content and
design model and a wide range of testing techniques that tests and validates
component level and architectural issues. Testing methods also includes
various types of testing, for example, usability testing, navigation testing,
security testing, performance testing, configuration testing etc.
These are the tools and technologies covering a wide array of content description
and modelling languages (for example, HTML, XML), component based
development resources, programming languages, browsers, multimedia tools,
database connectivity tool, servers and servers utilities, site management & analysis
tools and many others used by WebE teams.
The attributes of Web applications have a deep impact on the WebE process that is
chosen. The Web engineer chooses a process model based on the attributes of the
web application that is to be developed.
93
analysis, modelling and design). Many a times a parallel activities are carried out to
save time and expedite development process that involve a team of both technical
and non-technical members (like web engineer, copywriters and graphic designers).
1. WebApps are often delivered incrementally. That is, framework activities will
occur repeatedly as each increment is engineered and delivered.
2. Changes will occur frequently. These changes may occur as a result of the
evaluation of a delivered increment or as a consequence of changing
business conditions.
3. Timelines are short. This mitigates against the creation and review of large
engineering documentation, but it does not prevent the simple reality that
critical analysis, design, and testing must be recorded in some manner.
With these points in mind, let’s discuss the WebE within generic process framework.
Planning: Establishes an incremental plan for the WebE project. The plan consists
of a task definition and a timeline schedule for the time period which is usually in
weeks.
Modelling: This include the construction of the models that assist the developer and
the customer to better understand WebApp requirement and the design. The main
intention of the task is to develop rapid analysis and design model that define
requirements.
94
Construction: Here WebApp is constructed using web engineering tools and
technologies as modelled (for example, this combines both the generation of HTML,
XML, Java and similar code). Once the web increment is constructed a round of
rapid testing is carried out to uncover errors in the code or design.
Below Figure 1, depicts WebE framework activities that are applied using an
incremental process flow.
Web engineering teams sometimes take short-cuts due to time pressure and result
in more development effort. To build industry quality WebApps, we need to define a
set of best practices.
95
Many WebApp developers starts development even requirements / objectives
of WebApp is not clear. It is not a good practice to start work when
requirements are not clearly understood.
2. Describe how users will interact with the WebApp using a scenario-
based approach.
Customer should be convinced to describe use-cases to reflect actual
business requirements. These scenarios can be used for project planning and
analysis & design modelling.
3. Always develop a Project Plan, even if it is very brief.
The project should be scheduled and tracked on a daily basis.
4. Spend some time for modelling – what you are going to build.
UML diagrams (like class diagrams, sequence diagrams and state diagrams)
may provide valuable vision.
5. Review the models for consistency and quality
To develop high quality WebApp, formal technical reviews should be
conducted throughout a WebE project.
6. Use tools and technologies that enable to construct reusable
components
Reusable components help developer to do rapid development and less
errors.
7. Test first, then deploy
Design comprehensive tests and execute them before releasing the project to
customer.
96
begin understanding web engineering, it is essential that you know about some
important roles that will be part of web engineering team.
At high level Web engineering teams are organized in much the same way as
conventional software teams. However, the players and their roles are often quite
different. Some of the skill sets that WebE team must possess as a whole and must
be distributed across WebE team members are component-based software
engineering, networking, architectural and navigational design, Internet
standards/languages, human interface design, graphic design, content layout, and
WebApp testing.
The following roles should be distributed among the members of the WebE team;
97
Web publisher. As we discussed above, content is created by content
developer/provider. Web publisher incorporates these content in to web app in
structured and organized way. In addition, Web Publisher act as bridge between
engineering staff who have technical background and non-technical content
developer/providers. So, Web Publisher must have good understanding of Web
technologies and content.
Web engineer. It’s believed that “From the minute someone enter in to web
application, until the moment they complete their work with web application, they
are in the web engineer's world”. Web engineer is a role which is using various
technological knowledge to improve application and user experience. A Web
engineer usually gets involved in a broad range of activities during the
development of a WebApp, some of them are eliciting requirements, analysing
models, various design including navigational, architectural and interface
designs, actual implementation or coding and testing. To carry out these works
efficiently web engineer must possess good technical knowledge and conceptual
understanding of component technologies, client/server architectures,
HTML/XML, Client side scripting (for example, JavaScript, or JavaScript-based
tools like jQuery) and server side scripting (for example, PHP, Python, Ruby,
ASP.NET, or compiled languages like C++ or Java), database technologies and
most of the time current trends in web app development. In addition, it is
desirable for web engineer to possess basic understanding of hardware and
software platforms, security, multimedia concepts and Web app sustaining
issues.
Business domain experts. A business domain expert is a person with special
knowledge or skills in a particular area of business domain. Domain expert
possess deep understanding of the real business and issues related to it.
Theoretically Business domain experts should be able to answer all the questions
related to the business like, business goals, objectives and requirements
associated with the WebApp.
Support specialist.In general terms responsibilities of support specialist include
resolving customer queries, recommending solutions and guiding product users
through features and functionalities. This role is responsible for continuing
WebApp support. As we know that WebApps evolves continuously, the support
98
specialist is responsible for rectifications, adaptations, and enhancements to the
WebApp, including content updates, implementation of new procedures and
forms, and changes to the navigation pattern.
Administrator. Behind the successful running of WebApp are experts who
carries out maintenance tasks and other essential tasks. A general term that
would refer to these specialists is a “WebMaster”. This role has responsibility for
the day-to-day operation of the WebApp, some of them are development and
implementation of policies for the operation of the WebApp, establishment of
proper support and feedback procedures, implementation of security and access
rights, measurement and analysis of Web-site traffic, harmonization of change
control procedures. Significant portion of a professional webmaster’s time is
dedicated to maintaining the WebApp. Many a times webmaster may get involved
in the technical activities along with web engineer and support specialist.
Following are the Guidelines for building successful web engineering teams;
99
Respect for individual talents is critical. Teams are made up of diversified
talents and not everyone is good at everything. The best teams make is the
one which makes use of individual’s strengths and help each other to grow
and realize project goals. The best team promotes and improves creativity
and talent.
Effective Communication is essential. Efficient teams must hold open lines
of communication. Communication must be truthful and flow amid all team
members equally. Team members who accepts each other's unique
communication styles, or who decide on a single style of communication from
the starting, are more likely to move the team in a positive and productive
direction that every team member appreciates and supports. Team members
must never be hesitant to communicate with any other members about
difficulties, issues and concerns, as well as novel ideas or personal
observations.
Every member of the team should be committed.
It's easy to get started, but it's very hard to sustain momentum. The best
teams never let an "insurmountable" problem stop them. Team members
develop an optimum solution and proceed, hoping that the momentum of
forward progress may lead to an even better solution in the long term. In
practical situation Team strategies, goals, workflows, tasks, technologies and
even members can change over the life of the team. Team members should
be able to rally together and face new challenges head-on.
Web based systems are essentially different from other categories of computer
software. They are content driven, network intensive and continuously evolving. The
immediacy that drives their development, the superseding need for security in
operation, and high demand for aesthetic as well as functional content delivery are
100
additional characteristics. There are various criteria based on which one can
evaluate web based systems some of them are quite similar to conventional software
systems like usability, reliability, functionality, efficiency, maintainability, security,
availability, scalability, and time to market.
There are three layers of WebE, Process, methods and tools or technology. The
WebE process adopts the agile development philosophy that accentuates a "lean"
engineering approach that leads to the incremental delivery of the system to be built.
The generic process framework includes communication, planning, modelling,
construction, and deployment is applicable to WebE processes. Further these
activities are sub-divided into a set of WebE tasks that are adapted to the needs of
each project. Also a set of umbrella activities similar to those applied during software
engineering work - SQA, SCM, project management can be applied to all WebE
projects.
a) Unpredictable load
b) Performance
c) Concurrency
d) Network intensiveness
Answer: c)
Question 2: Which web app attribute is defined by the statement: “The quality and
aesthetic nature of content remains an important determinant of the quality of a
WebApp”?
a) Availability
b) Data driven
c) Continuous evolution
d) Content sensitive
Answer: d)
101
Question 3: Which process model should be used in virtually all situations of web
engineering?
a) Incremental Model
b) Waterfall Model
c) Spiral Model
d) None of the mentioned
Answer: a)
Question 4: Web development and software development are one and the same
thing. True or False?
a) True
b) False
Answer: b)
Explanation: They are different due to the nature and distinct requirements of Web-
based systems.
Question 5: Which of the following statements are incorrect with reference to web-
based systems?
Answer: a)
102
a) Informational
b) Interactive
c) Transaction-oriented
d) Workflow-oriented
Answer: c)
Web sites
https://en.wikipedia.org/wiki/Web_engineering
https://www.tutorialspoint.com/web_developers_guide/web_basic_concepts.ht
m
https://www.tutorialspoint.com/web_development_tutorials.htm
1.10 ASSIGNMENTS
Question 1: What is a Web Application? List the attributes of WebApps.
Question 3: What are the WebE methods within the process Framework?
1.11 ACTIVITIES
Define Web Engineering.
103
Write any four best practices of Web Engineering with simple example.
1.13 REFERENCES
104
Unit 2: Analysis for Web
Application
2
Unit Structure
2.1. Learning Objectives
2.2. Introduction
2.13. Assignments
2.14. Activities
2.16. References
105
2.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
2.2 INTRODUCTION
The development process of web applications is quite different from the process of
developing traditional software. In traditional software development, we are using
different software process models for software development. These models cannot
be used for the development of web application because the content of web
application frequently changes. The traditional software engineering process needs
some changes for the development of web applications.
The web applications are developed to deliver functionalities for the large group of
end users and the modifications are done frequently to adapt new changes. It is not
possible to collect all the requirements at the beginning itself. The web applications
always keep its information up-to-date and hence making the changes is a
continuous process.
WebApps have ashort development cycle and a volatility so Web-Engineer has less
time to do detailed analysis and designing.
106
Comparison between Software Engineering and Web Engineering.
Traditional Software System has small WebApps has large user range.
user range.
A Web engineering team should include analysis modelling when one or more of the
following conditions are met:
107
2) Requirements gathering: During requirements gathering, functional
requirements and content are listed and Use-case scenarios developed.
3) Analysis modelling: The purpose of analysis modelling is, to establish a
basic understanding of why the WebApp is to be built, what problems it will
solve for end-users and who will use it.
As part of the formulation and requirements gathering tasks, the categories of end-
users (communicate with the WebApp) are identified.
Figure 1 shows sample user hierarchy. General users for web site are:
Guestuser: Visits the site but doesn’t register. Guest users are often search common
information / comparison of content / interested in free content.
First-time Customer: User who are doing first time registration and consume
WebApp services which required registration.
Existing Customer: A registered user who own the services and can contact
customer care or take technical support from WebApp.
Customer service staff: They are special users, they assist customers who have
contacted for support.
108
We have already discussed about Use-case in Block#1_Unit1#Section 1.5.1.
Use-case diagrams are created for each user category explained in the user
hierarchy.
Figure 2 shows a UML use case diagram for first time customer. Each oval represent
a use case that explain a precise communication between first-time customer and
the WebApp. First communication is defined by the log-in (to web-site) use case.
In figure 2, key WebApp functionality and all relevant use cases arecombined into
boxes. These boxes are called a "packages" inUML. Figure 2 has two packages:
customization and e-commerce.
109
Use-cases are structured into functional packages.
110
The data collected in above four analysis tasks should be reviewed properly. After
required modification, it should be organized into a model and can be handed over to
WebApp designer.
The content model (content objects and analysis classes) is obtained using use
cases.
External entities (e.g., other systems, databases, people) that produce or consume
information to be used by the WebApp.
Things (e.g., reports, displays, video images) that are part of the information domain
for the problem.
Occurrences or events (e.g., a quote or an order) that occur within the context of a
user’s interaction with a WebApp.
Roles (e.g., retail purchasers, customer support, salesperson) played by people who
interact with the WebApp.
Organizational units (e.g., division, group, and team) that are relevant to an
application.
111
Places (e.g., manufacturing floor or loading dock) that establish the context of the
problem and the overall function of the WebApp.
Structures (e.g., sensors, monitoring devices) that define a class of objects or related
classes of objects.
Majority time, a list of content objects (with brief description) is enough to define the
requirements for content. Sometime, we require entity relationship diagram or data
tree [Ref-3] to show the relationships between content objects.
Figure 3 shows sample data tree diagram. As per above data, “description” id
defined by five content objects (darker rectangle).
As we know, analysis classes are derived from use case. Let’s take an example:
Select following use case scenario and underline all potential objects.
112
Figure 4 - Sample use case scenario
This process repeat for all use cases to get analysis classes and content object.
1. Use cases,
2. Sequence diagrams,
3. State diagrams
4. A user interface prototype
Use-cases: Use-cases arekey element of the interaction model for WebApps. Use
cases define the major interaction between end users (actors) and the system.
113
cases. So sequence diagrams define a link among the actions mentioned in the use
case and the analysis classes (structural entities).
Figure 6 shows a sequence diagram for the seminar enrolment use case. The
vertical line of the diagram represents actions that are defined within the use-
case.The horizontal line identifies the analysis classes. Objects are labelled in the
standard UML format name:ClassName, where “name” is optional (objects without
name are called anonymous objects). For example, in Figure 6, we can see the
Student object has the name aStudent, this is called a named object, whereas the
instance of Seminar is an anonymous object. The instance of Student was given a
name because it is used in several places as a parameter in messages, whereas the
instance of the Seminar did not need to be referenced anywhere else in the diagram
and thus could be anonymous. The X at the bottom of an activation box, an example
of which is presented in Figure 6, is a UML convention to indicate an object has been
removed from memory. In languages such as C++ where we need to manage
memory and need to invoke an object's destructor, typically modelled a message
with the stereotype of <<destroy>>. In languages such as Java or C# where memory
is managed for us and objects that are no longer needed are automatically removed
from memory (referred to as garbage collection).
114
Sequence diagrams can be created for each use-case once analysis classes are
defined for the use-case.
State diagrams
The State diagram define dynamic behaviour of the WebApp. The state diagram can
be represented at various level of abstraction. Figure 7 shows high level state
diagram for the Bank Automated Teller Machine (ATM).
ATM is initially turned off. After the power is turned on, ATM performs start up action
and enters into Idle state.In this state ATM waits for customer for interaction.The
ATM state changes from Idle to Active when the customer inserts banking or credit
card in the ATM's card reader. The transition from Active state back to the Idle state
could be triggered once customer is done with the transaction. In case of service /
technical issue, the ATM state changes from Idle to Out of Service. After fixing the
issue, state changes back to Idle.
All three diagrams (use case, sequence and state) represent related information,
then why we need these diagrams? In some scenarios, all three diagrams are not
essential. Only use cases are enough. But use cases define one dimensional view of
the interaction. Sequence diagrams provide another dimension that is more dynamic
in nature. State diagrams gives third dimension which is more behavioural and give
information about navigation. So it is always beneficial for large / complex WebApps
to define interaction model that includes all three diagrams.
115
User interface prototype
Below points are very critical for user satisfaction and acceptance of the WebApp:
116
Figure 8 Activity diagram for process shopping order
The UML activity diagram defines processing details. Figure 8 shows an activity
diagram for theprocessing shopping order. Requested order is input parameter of the
activity. Once order is accepted and all essential details is filled in, payment is
accepted and order is shipped.
Note, that this business flow allows order shipment before invoice is sent or payment
is confirmed.
The activity diagram is similar to the flowchart. It is showing the processing flow and
logical decisions with the flow.
Client side software (like browser) offers the infrastructure which allows access of
the WebApp from the client’s location. Normally, browser is used to access the
117
WebApp content and functionality from the server. So, the WebApp must be properly
tested within every browser which is mentioned into configuration model.
Sometime, the configuration model is just a list of Server side and Client side
attributes. But, for complex WebApps, different type of configuration required (like
load balancing with multiple servers, caching mechanism, multiple databases,
distributed application components etc.).
RNA provides systems analysts with a systematic technique for determining the
relationship structure of an application, helping them to discover all potentially useful
relationships in application domains. These later may be implemented as links. RNA
also helps determine appropriate navigational structures on top of these links. RNA
enhances system developers' understanding of application domains by broadening
and deepening their conceptual model of the domain. Developers can then enhance
their implementation by including additional links, meta-information, and navigation.
118
• Relationship analysis: Describes the relationships that exist among the
WebApp elements.
• Navigation analysis: Examines how users might access individual elements or
groups of elements.
• Evaluation analysis: Considers practical issues (e g., cost/benefit) associated
with implementing the relationships defined earlier.
We have already discussed first two steps in this unit. Let’s discuss remaining three
steps.
Yoo and Bieder [Ref-4]have suggested a list of questions that a Web engineer or
systems analyst should ask about each element (content object or function) that has
been identified within the analysis model.
119
• Can the element be associated with a specific formulation goal or objective?
With a specific WebApp requirement?
• Does this element always appear at the same time as other elements appear?
If so, what are the other elements?
• Does this element always appear in the same place (e.g., same location of
the screen or page) as other elements? If so, what are the other elements?
The answers of above questions help the Web engineer to arrange the elements
within the WebApp and to create relationships within elements.
After relationships have been developed within elements defined, the Web engineer
must analyse that how each user category will navigate from one element to another
element. As part of design, developer should consider overall navigation
requirements.
120
• Can a user "store" his previous navigation through the WebApp to expedite
future usage?
• For which user category should optimal navigation be designed?
• How should links external to the WebApp be handled? Overlaying the existing
browser window? As a new browser window? As a separate frame?
The Web engineering team and stakeholders should also define overall
requirements for navigation. Navigation helps user to understand entire WebApp
structure (example “Site Map”). Navigation analysis help Web engineer to create
“guided tour” of WebApp which will highlight the most important elements.
Use cases are the most critical for all requirements analysis and modelling activities.
Use cases can be structured into functional packages, and each package is
evaluated to make sure that it is comprehensible, cohesive, loosely coupled and
hierarchically shallow.
For creating complete analysis model, required to understand four analysis activities:
1) content analysis identifies the full range of content to be delivered by the WebApp;
2) interaction analysis describes the way in which the user interacts with the
WebApp; 3) functional analysis defines the operations that will be used by WebApp
content and describes other processing functions that are independent of content but
essential to the end-user, and 4) configuration analysis describes the environment
and infrastructure in which the WebApp resides.
The content model define the range of content objects that are to be formed into a
WebApp. These content objects must be developed or acquired for integration into
the WebApp architecture. A data tree can be used to represent a content object
121
hierarchy. Analysis classes are derived from use case. Analysis classes provide
another way to representing key objects that the WebApp will manipulate.
The interaction model is created from use-cases, UML sequence diagrams, and
UML state diagrams to describe the “conversation’' between the user and the
WebApp. In addition, an interface prototype may be built to assist in developing
layout and navigation requirements.
The functional model describes user observable functions and class operations
using the UML activity diagram. The configuration model describes the environment
that the WebApp will require on both the server side and the client side of the
system.
Guest user
Customer service staff user
Content object
122
2.12 FURTHER READING
Books
Web sites
https://www.uml.org/
Wikipedia : https://en.wikipedia.org/wiki/Web_engineering
Web basic concepts:
https://www.tutorialspoint.com/web_developers_guide/web_basic_concepts.ht
m
UML standard diagrams:
https://www.tutorialspoint.com/uml/uml_standard_diagrams.htm
2.13 ASSIGNMENT
Explain three major tasks of Requirements analysis.
2.14 ACTIVITIES
In which scenarios, Web engineering team should include analysis modelling?
Explain with a simple example.
Take any simple user case scenario and create Analysis classes (refer
section 1.5.3).
123
2.16 REFERENCES
124
Unit 3: Design for Web
Application
3
Unit Structure
3.1. Learning Objectives
3.2. Introduction
3.8. Assignments
3.9. Activities
3.11. References
125
3.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
3.2 INTRODUCTION
As stated by Jakob Nielsen [Ref-2]: "There are essentially two basic approaches to
design: the artistic ideal of expressing yourself and the engineering ideal of solving a
problem for a customer."
During the first decade of Web development, developers used to choose artistic
design. This kind of designs were usually carried out in form of HTML pages and
occurred in ad hoc manner. Design evolved out of an artistic vision that itself evolved
as WebApp construction occurred.
So in simple words, we can state that Design matters, because it can reflect how
clients and potential customers see and feel about WebApp, Design gives an overall
126
impression about web application; make a bad impression and you lose a potential
conversion; Make a good one and you gain a customer; Make a great impression,
and you can potentially gain and retain a customer for life .
As a basic concept we know that better design leads to a high-quality product. This
leads us to a recurring question that is encountered in all engineering disciplines:
What is quality? In this section, we will examine the answer within the Web
engineering context.
The quality is the parameter that has two aspects in this context. Quality from user’s
perspective and quality from technical perspective. As we know users are the actual
127
evaluators of the application and every user is different from other, users may have
different choices about look and feel, about simple and complex content, about
simple or flashy graphics and many other aspects. Every user has his or her own
criteria about what actually makes a “good” WebApp and that is what should matter
most, as users are likely to accept web application which is “good” in their criteria.
So, perception of user might be more important than technical quality aspect of
WebApp.
Now the obvious question comes that how this quality can be stated? What are the
attributes that makes WebApp good for end-users and at the time shows technical
characteristics of quality so that Web engineer can correct, adapt, enhance, and
support the application for long time period?
Following are some software quality characteristics which are also relevant for
measuring quality of Web application.
Functionality
Reliability
Usability
Efficiency
Maintainability
128
Figure 1 – Quality requirement tree [Ref-3]
Offutt [Ref-4] further extended quality attributes noted in Figure 1and added few
more attributes:
Security. As we saw in earlier discussion that in last few years WebApps grown
from simple to complex one. Many of such WebApps have become heavily
integrated with critical corporate and government databases. Many WebApps
functions involves financial transactions. E-commerce applications extract and then
store sensitive customer information. For all of these and many other reasons,
WebApp security is extremely critical in many circumstances. The important
measure of security is the ability of the WebApp and its server environment to
prohibit unauthorized access and to prevent malicious attacks or activities.As
security is very deep and broad subject, detail discussion is not included here.
Availability. User always expect WebApp to be available always. So Even the best
WebApp will not meet users' needs if it is unavailable. From a technical perspective
availability is measure of the percentage of time that a WebApp is available for use.
The typical end-user expects WebApps to be available 24 X 7 X 365. But "up-time" is
not the only indicator of availability. For example, you made application which is up
all the time but application is compatible to only ‘X’ browser/platform but what if user
access your application using browser/platform ‘Y’, in this case your application is
129
not available for user who is using browser/platform ‘Y’. This all should be
considered while considering Availability.
As we know that billions of Web pages are available on the World Wide Web. Even
well-framed and well-targetedweb searches result in a huge number of contents.
With so many sources of information, how does the one measure the qualityof the
content that is presented within a WebApp? Tillman [Ref-5] suggests a set of criteria
for measuring the quality of content:
Scope: Can the scope and depth of content be easily determined to ensure that it
meets the user's needs?
Authority: Can the background and authority of the content's authors be easily
identified?
Currency: Currency of the WebApp refers to: how current the information presented
is?And how oftenthe site is updated or maintained?
Stability: Is the content and its location stable (i.e., will it remain at the referenced
URL)?
Uniqueness: Is content unique? That is, does the WebApp provide some unique
benefit to those who use it?
130
Relevance: Is content valuable to the targeted user community?
The above checklist is just an example quality related questions but in reality, web
engineer should consider all the aspects of quality and develop a WebApp that
positively address all these quality related questions.
Jean Kaiser[Ref-6] suggests a set of design goals that are applicable to almost every
WebApp irrespective of application domain, size, or complexity:
Consistency. This design goal applies to virtually every element of the design model
and this design goal may sound like a simple concept, but there are many examples
out there that exhibit a lack of consistency in their designs and result in to customer
dissatisfaction. Content should be constructed consistently, this can be achieved by
using consistent layouts, using same text formatting and text styles, creating
consistent visual elements, using standardized colour and style etc. Graphic design
should ensure a consistent look across all parts of the WebApp.Architectural design
should establish templates that lead to a consistent hypermedia structure. Interface
design should outline consistent navigation, content display and mode of interaction.
Identity. Entire design of a WebApp must be in line with the application domain for
which it is to be built. An e-commerce WebApp will definitely have different design as
well as look and feel than the WebApp that provides financial services.Graphical
design, navigational design, Interface design should be compatible and appropriate
for Objective of WebApp. A Web engineer along with all other design
contributorsshould work to establish an identity for the WebApp through the design.
131
Robustness. From any reliable WebApp user expect robust content and function
that are relevant to user and able to fulfil user’s need.Robustness is an important
design goal and should be attained efficiently.
Navigability. This is like guiding the user on the webpage without even compelling
them to do so. As we already discussed that navigation should be simple and yet
interesting. At the same time intuitive for users to figure out how to get around a
WebApp easily and efficiently. This goal emphasis on the design where user should
be able to move about the WebApp with minimum possible instruction.
Visual appeal.Visual Appeal is the colours, shapes, pictures, fonts, white space, and
overall visual balance of a WebApp. Web applications are indisputably the most
visual, the most dynamic, and the most aesthetic amongst all software categories.
As we all know beauty is contextual but there are certain parameters like style,
graphics and aesthetics that increase visual appeal of the WebApp. Visual Appeal is
important in making initial impression of a WebApp.
Figure 2 depicts a design pyramid for Web engineering. Each level of the pyramid
represents one of the following design activities:
132
Figure 2 - The WebE Design Pyramid
133
• Component design — Component design describes detailed processing logic
essential to implement functional components.
In this Unit we understood WebE design from a very high level. We discussed about
WebE Design Issues in details. The quality of a WebApp defined in terms of
usability, functionality, reliability, efficiency, maintainability, security, scalability, and
time-to-market is introduced during design. To achieve these quality attributes, a
good WebApp design should exhibit simplicity, consistency, identity, robustness,
navigability, visual appeal and compatibility.
Then we discussed WebE design Pyramid and various design from very high level.
Interface design mainly describes the structure and organization of the user
interface. Aesthetic design describes the overall "look and feel" of the WebApp.
Content design defines layout, structure, and outline for all the content. Navigation
design encompasses navigational flow within different functions and content of
WebApp.Architecture design identifies the overall hypermedia structure of the
WebApp,and Component design describes detailed processing logic.
134
result of faults in the software.
The capability of the software to maintain a
Fault Tolerance specified level of performance in case of software
faults or of infringement of its specified interface.
The capability of the software to reestablish its
Recoverability level of performance and recover the data directly
affected in the case of a failure.
The capability of the software product to enable the
user to understand whether the software is
Understandability
suitable, and how it can be used for particular
tasks and conditions of use.
The capability of the software product to enable the
Usability Learnability
user to learn its applications.
The capability of the software product to enable the
Operability
user to operate and control it.
The capability of the software product to be liked
Attractiveness
by the user.
The capability of the software to provide
appropriate response and processing times and
Time Behavior
throughput rates when performing its function
under stated conditions.
Efficiency
The capability of the software to use appropriate
Resource resources in an appropriate time when the
Utilization software performs its function under stated
condition.
The capability of the software product to be
diagnosed for deficiencies or causes of failures in
Analyzability
the software or for the parts to be modified to be
identified.
The capability of the software product to enable a
Changeability
Maintainability specified modification to be implemented.
The capability of the software to minimize
Stability unexpected effects from modifications of the
software.
The capability of the software product to enable
Testability
modified software to be validated.
135
3.6 CHECK YOUR PROGRESS: POSSIBLE ANSWERS
Question 1: Write a simple one-line definition of each of the following key terms. Try
to do this without referring back to the notes if possible.
Interface design
Aesthetic design
Fault Tolerance
Scalability
Time-to-market
Web sites
https://en.wikipedia.org/wiki/Web_engineering
3.8 ASSIGNMENTS
Explain Design Issues of Web Engineering in details.
3.9 ACTIVITIES
What is meaning of Agile? Describe advantages and disadvantages of Agile?
136
3.11 REFERENCES
137
Unit 4: Web Design
4
Unit Structure
4.1. Learning Objectives
4.2. Introduction
4.14. Assignments
4.15. Activities
4.17. References
138
4.1 LEARNING OBJECTIVE
After studying this unit student should be able to:
4.2 INTRODUCTION
WebApp design is an essential activity. It decides what and how the information
presented to the users.It includes several different aspects, including webpage
layout, content production and graphic design. While the terms web design and web
development are often used interchangeably, web design is technically a subset of
the broader category of web development.
Easy to use
Easy to learn
Easy to navigate
Intuitive
Consistent
Efficient
Error-free
Functional.
Interface design begins with a careful examination of the end user requirements. A
user hierarchy is createdduring analysis modellingfor WebApp. Each user category
may have separate needs. Each category may need to communicate with the
139
WebApp in different ways, and may require exclusive functionality or different
content.
Web engineer must design an interface so that it answers three primary questions
for the end-user [Ref-8]:
Where am I?
The interface should always guide the user to recognise his current options -
what functionalities are available, what links are live and what content is
relevant.
Effective interfaces are visually attractive and simple to use. Effective interfaces
should not expose the internal working to the user. End-user’s work continuously
saved, give undo option for the user to reverse any activity any time. Effective
application and services perform maximum work and requesting minimum of
information from users.
Anticipation: A WebApp should be designed so that it predict the user's next move.
For example, a user is searching for printer driver. The designer of the WebApp
should anticipate that the user might request a download of the driver.
140
Communication: The interface should communicate the status of activity initiated by
the user.
Consistency: The use of navigation controls, menus, icons and aesthetics (like
colour, shape and layout) should be consistent throughout the WebApp. For
example, if underlined blue text indicates a navigation link, content should never
incorporate blue underlined text for any other purpose.
Controlled autonomy: The interface should facilitate user movement throughout the
WebApp, but it should manage authentication and authorization effectively. For
example, secure web-pages should be accessed after valid user id and password.
There must not be any navigation path which bypass this validation.
Efficiency:The design of the WebApp and its interface should optimize the user's
work efficiency.
Focus:The WebApp interface and the content it presents should stay focused on the
user task(s) at hand.
Fitt's Law: This is a principle that can be applied to user interface design because
his calculation included factors such as the time it takes the average person to select
a control in relation to size and motion. In web design terms, this means that by
increasing the size of an icon, it is possible to decrease the time it takes to select an
item from a menu. Regular sized icons are faster than smaller icons and there is an
obvious benefit in placing icons at the top of a page than at the bottom.
141
Latency reduction:
Latency can often be hidden from users using multi-tasking techniques.Letting user
continue with their work while transmission and computation (like downloading a
complex graphical image) take place in the background.
Metaphors:On the web, we use images and icons to symbolize different things.
When we visit a webpage, we scan to try and find what we need as fast as possible,
and images are used to help speed up that process. We can interpret something
much faster with familiar styling and images. For example, we can instantly
recognize an error when there's something like an exclamation mark, or a yellow or
red colour.
142
experienced this kind of frustrating content lost due to an error. To avoid this, a
WebApp should be designed to auto-save all user specific data.
Track state:When appropriate, the state of the user interaction should be traced and
stored. That way user can continue his/her work after login again. In general, cookies
can be designed to store state information.
In addition to these design principles, Nielsen and Wagner [Ref-3] suggest a few
realistic interface design guidelines:
• Reading speed on a monitor is around 25% slower than reading speed for
printed copy. Hence, we should not force end-user to read huge amounts of
text explaining operation or in navigation.
• Avoid "under construction"pages.They increase expectations and create
disappointing link.
• Users prefer not to scroll. Key information should be positioned within the
sizes of a browser window.
• Navigation menus and head-bars should be designed consistently and should
be available on all pages that are available to the end-user. The design
should not depend on browser.
• Aesthetics should never be substitute of functionality. For example, a simple
button might be a better navigation option than an attractive, but ambiguous
image or icon whose intent is unclear.
• Navigation options should be clear for all user. The user shouldn't have to
search the page for navigation.
143
4.3.2 Interface Control Mechanisms
To design a consistent interface, the designer must use aesthetic design (Section
4.4) to create a clear look for the interface. Then, required to highlight the layout
and navigation. For navigation options, the designer should select any
interaction mechanism from below list:
Note: one or more of these control mechanisms should be provided at every level of
the content hierarchy.
4.4AESTHETIC DESIGN
Aesthetic design is also known as “Look and Feel”. It is making a WebApp more
attractive.
Each Web-page has limited amount of space that can be used for information
content, navigation features (menu), non-functional aesthetics etc. The design of this
space is planned during aesthetic design.
There are no defined rules for screen layout design. However, we should consider
general layout guidelines:
Don’t be afraid of white space: It is not advisable to fill up each pixel of a Web-page
with content. It creates confusion for the user.
144
Emphasize content: Nielsen [Ref-4] recommends that the Web-page should have
80% content. Remaining space dedicated to navigation and other features.
Group navigation, content, and function geographically within the page: Humans look
for patterns in almost all things. User frustration is likely, if there are no visible
patterns in the Web-page.
Don't extend your real estate with the scrolling bar:Users would prefer not to scroll. It
is always better to reduce page content to avoid scrolling bar. We should use
multiple pages if required to present more content.
Consider resolution and browser window size when designing layout:The design
should be responsive rather than defining fixed sizes within a layout.
Graphic design inspects each and every characteristic of the look and feel of a
WebApp. The graphic design process includes:
4.5CONTENT DESIGN
Content design solves two design issues. Each issue required different skill sets to
resolve it.
145
The relationship between content objects defined as part of the WebApp analysis
model (Block#2-Unit#2-Figure-3). A content objects has attributes which include
content specific information.
As content objects are designed, they are "chunked" (divide into multiple files) [Ref-
5] to form WebApp pages due to:
146
The number of content objects incorporated into a single page is a function of
user needs.
Constraints forced by download speed of the Internet connections.
Restrictions forced by the amount of scrolling that the user will tolerate.
The design can choose from four different content structures [Ref-5]:
147
Linear structures: Asshown in Figure 3, a linear website is a type of website that has
a linear-style method of navigation. Website navigation refers to the order of the
web-pages that user access when they visit that site. A simple example is a tutorial
or e-book presentation.
148
For example, consider a scenario where an e-commerce site selling holiday
packages. The horizontal dimension of the grid sows the travel agencies. The
vertical dimension shows the holiday packages. So, a user can navigate the grid
horizontally to find the travel agency and then vertically to search the offering
provided by travel agency.
Hierarchical structures: These are the most common types of website structures.
Hierarchical structuresbegin with a high level of information display at parent
pages.Then, filters down into more detailed information shown at child pages.
Sometimes these structures are called trees, and they are very similar to
organizational charts in corporations. Figure 5, shows Hierarchical structures.
Applications should be built using layers in which different concerns are taken into
account; in particular, application data should be separated from the page's contents
149
(navigation nodes) and these contents, in turn, should be clearly separated from the
interface look-and-feel (pages).
Jacyntho and his colleagues [Ref-11] has suggested a three layer design
architecture. It decouples user interface from navigation controlling and application
behaviour. Three layer architecture simplifies implementation and improves reuse.
150
As shown in Figure 6, user requests are handled by the controller. Based on type of
request, a behaviour request is transmitted to the model. The model object
implements the functionality required to serve the request. The model object can
access database. The controller selects the view object based on the user request.
The data created by the model must be formatted by the respective view object.
Response generated from the view is sent back to the client browser.
4.7NAVIGATION DESIGN
The designer must define navigation paths that enable users to access WebApp
content and functions. For Navigation design, the designer should:
Navigation design begins with consideration of the user hierarchy and related use-
cases developed for each category of user (actor). Each actor may use the WebApp
somewhat differently and therefore have different navigation requirements.In
addition, the use-cases developed for each actorwill define a set of classes that
encompass one or more content objects or WebApp functions. As each user
interacts with the WebApp, she encounters a series of navigation semantic units
(NSUs) - "a set of information and related navigation structures that collaborate in
the fulfilment of a subset of related user requirements” [Ref-9].
As design proceeds, the method of navigation are defined. Among many possible
options are:
• Individual navigation link: Text-based links, icons, buttons and switches, and
graphical metaphors.
151
• Horizontal navigation bar: Lists major content or functional categories in a bar
containing appropriate links. In general, between four and seven categories
are listed.
• Vertical navigation column: (l) lists major content or functional categories, or
(2) lists virtually all major content objects within the WebApp. If the second
option is chosen, such navigation columns can "expand" to present content
objects as part of a hierarchy.
• Tabs: A metaphor that is nothing more than a variation of the navigation bar
or column, representing content or functional categories as tab sheets that are
selected when a link is required.
• Site maps: Provide an all-inclusive table of contents for navigation to all
content objects and functionality contained within the WebApp.
In addition to choosing the method of navigation, the designer should also establish
appropriate navigation agreements and helps. For example, icons and graphical
links should look "clickable" by angle the edges to give the image a 3-dimensional
look. Audio or visual response should be given the user with an indication that a
navigation option has been chosen. For text based navigation, colour should be used
to indicate navigation links and to provide an indication of links already travelled.
These are few design conventions that make navigation user-friendly.
To achieve above capabilities, the Web engineer must design and construct program
components similar to software components for conventional software.
152
4.9 HYPERMEDIA DESIGN PATTERNS
Design patterns that are used in Web engineering includes two major classes:
Design patterns are a generic approach for solving similar small design problem. In
the context of Web-based systems German and Cowan [Ref-10] suggest the
following patterns categories:
Architectural patterns. These patterns help in the design of content and WebApp
architecture.
Navigation patterns. These patterns help in the design of navigation links and the
overall navigation flow of the WebApp.
1) Conceptual design
153
2) Navigational design
3) Abstract interface design
4) Implementation
The subsystems
Classes
Relationships
UML can be used to create appropriate diagrams (like class diagrams, aggregations
and composite class representations, collaboration diagrams).
OOHDM uses a predefined set of navigation classes like nodes, links, anchors, and
access structures [Ref-7].
The abstract interface design to specify the separation of the user interface from the
application component. A formal model of interface objects, known as an abstract
data view (ADV). ADV is used to represent the relationship between interface objects
and navigation objects.
The OOHDM implementation activity define a design iteration that is particular to the
environment in which the WebApp will function. Classes, navigation, and the
interface are each categorised in a manner that can be constructed for the
154
client/server environment, operating systems, support software, programming
languages, and other environmental characteristics that are relevant to the problem.
Interface design begins with a careful examination of the end user and user
hierarchy. Effective interfaces are visually attractive and simple to use. The
objectives of a WebApp interface are to establish a consistent window to user. To
guide the user over a series of interactions with the WebApp and to organize the
navigation options and content available to the user.
Aesthetic design describes the "look and feel" of the WebApp and includes colour
schemes, layout, menu, text size, font and placement, the use of graphics, and
related aesthetic decisions. There are no defined rules for design. However, a set of
graphic design guidelines provides the basis for a design approach.
Content design defines a design representation for content objects and define
relationships to one another. It is also representation of information specific to
content object.
Architecture design identifies the overall hypermedia structure for the WebApp and
includes both content architecture and WebApp architecture.
Navigation design represents the path between content objects and for each
category of users. Navigation design begins with consideration of the user hierarchy
and related use-cases developed for each category of user (actor).
Patterns for WebApp design include generic design patterns which apply to all types
of software and hypermedia patterns which are particularly relevant for WebApps.
Architecture, navigation, component, presentation, and behaviour/user design
patterns have been discussed.
155
4.12 CHECK YOUR PROGRESS: POSSIBLE ANSWERS
Question 1: Write a simple one-line definition of each of the following key terms. Try
to do this without referring back to the notes if possible.
Anticipation
Communication
Consistency
Efficiency
Flexibility
Learnability
Readability
Question 3:What is white space and how does it affect content on the web?
Web sites
https://en.wikipedia.org/wiki/Web_design
https://www.tutorialspoint.com/struts_2/basic_mvc_architecture.htm
4.14 ASSIGNMENTS
Explain what is linear structures, Grid structures and Hierarchical structures?
What is role and responsibility of the web designer?
156
4.15 ACTIVITIES
What is web designing? Explain in your own words.
4.17 REFERENCES
157
Ref-9: Cachero, C., et al„ "Conceptual Navigation Analysis: a Device and
Platform Independent Navigation Specification," Proc. 2nd inti. Workshop on
Web-Oriented Technology, June 2002, download from
www.dsic.upv.es/~west/iwwost02/papers/cachero.pdf.
Ref-10: (GER00| German, D., and D. Cowan, "Toward a Unified Catalog of
Hypermedia Design Patterns," Proc. 33rd Hawaii Inti. Conf. on System
Sciences, IEEE, vol. 6, Maui, Hawaii, June 2000, download from
www.turingmachine.org/~dmg/research/papers/dmg_hicss2000.pdf
Ref-11: Jacyntho, D., D. Schwabe, and G. Rossi, "An Architecture for
Structuring Complex Web Applications," 2002, available at
http://www2002.org/CDROM/altemate/478/.
Ref-12: Krasner, G., and S. Pope, "A Cookbook for Using the Model-View
Controller User Interface Paradigm in Smalltalk-80," Journal of Object-
Oriented Programming, vol. 1, no. 3, August/September 1988, pp. 26-49.
Block-3
Introduction to UML and
UML Diagrams
158
Unit 1: Fundamentals of UML
1
Unit Structure
1.1. Learning Objectives
1.3. Introduction
1.10. Assignments
159
1.1 Learning Objective
After studying this unit student should be able to:
1.3Introduction
The norm for engineering field is to model first before implementation. Modelling can
be mathematically or graphically, This unit presents a Unified Modelling Language as
a language to model object-oriented artifacts.
For many years, the term object oriented (OO) was used to denote a software
development approach that used one of a number of object-oriented programming
languages (e.g., Java, C++). Today, the OO paradigm encompasses a complete
view of software engineering.
The norm for engineering analysis and design systems emphasizes modelling of the
system first before implementation. Modelling is a proven and well-accepted
160
engineering technique. Modelling can be done mathematically or by any other
common notation understood by many engineers of the same field worldwide.
Software Engineering had lacked such a notation. Between 1989 and 1994, more
than 50 software modelling languages were in common use – each of them carrying
their own notations. Each language contained syntax peculiar to itself, whilst at the
same time, each language had elements which bore striking similarities to the other
languages, and bad enough neither of these languages were complete.
1.4UML Background
In the mid 1990's, three methods emerged as the strongest. Ariadne Training (2001)
state that these three methods had begun to converge, with each containing
elements of the other two. Each method had its own particular strengths:
Booch was excellent for design and implementation. Grady Booch had been a major
player in the development of Object Oriented techniques for the language.
Object Modelling Technique (OMT) was best for analysis and data-intensive
information systems.
So, the Unified Modelling Language (UML) is largely the product of three well known
software engineers, - Grady Booch, Ivar Jacobson and James Rumbaugh. In 1994,
James Rumbaugh, the creator of OMT joined Grady Booch at Rational Corp. The
aim of the partnership was to merge their ideas into a single, unified method. By
1995, the creator of OOSE, Ivar Jacobson, had also joined Rational, and his ideas
(particularly the concept of “Use Cases”) were fed into the new Unified Method –
now called the Unified Modeling Language (Ariadne Training, 2001).
161
1.5What is UML?
Booch et al, (2005) defines the Unified Modelling Language (UML) to be a language
for: Specifying, Visualizing, Constructing and Documenting the artifacts of a
software-intensive system. It is a standard language for writing software blueprints. It
is a graphical language for capturing the artifacts of software development. UML is
the de-facto standard for Object Oriented modelling.
Specifying means of building models that are precise, unambiguous, and complete.
In particular, the UML addresses the specification of all the important analysis,
design, and implementation decisions that must be made in developing and
deploying a software-intensive system.
The UML is not a visual programming language, but its models can be directly
connected to a variety of programming languages. This means that it is possible to
map from a model in the UML to a programming language such as Java, C++, Visual
Basic or PHP, or even to tables in a relational database or the persistent store of an
object-oriented database.
Things that are best expressed graphically are done so graphically in the UML,
whereas things that are best expressed textually are done so in the programming
language. This mapping permits forward engineering: The generation of code from a
UML model into a programming language.
162
Depending on the development culture, some of these artifacts are treated more or
less formally than others. Such artifacts are not only the deliverables of a project,
they are also critical in controlling, measuring, and communicating about a system
during its development and after its deployment.
The UML addresses the documentation of a system's architecture and all of its
details. The UML also provides a language for expressing requirements and for
tests. Finally, the UML provides a language for modelling the activities of project
planning and release management.
The UML can also be a Language for Communication. That is communication with
customers has proven to be equally problematic. Graphical modelling can make
people (technical and nontechnical) understand the artifacts of the software system
expected. In software development, some of the things that require communication
include requirements, design, implementation, and deployment. UML is a language
designed to communicate these things.
As with any language, the UML has its own notation and syntax. It does not tell you
how to develop software. It can be applied in any software development processes;
waterfall model, spiral model, iterative, incremental frameworks. Its notation
comprises a set of specialized shapes for constructing different kinds of software
diagrams. Each shape has a particular meaning. UML is a generic, broad language
enabling the key aspects of a software development to be captured on paper
163
1.6UML with Modelling
Modelling is a central part of all the activities that lead up to the deployment of good
software. We build models to:
There are many elements that contribute to a successful software organization; one
common thread is the use of modeling. Modeling is a proven and well-accepted
engineering technique. There are three basic building blocks: Elements which are
main "citizens" of the model, relationships i.e. relationships that tie elements together
and Diagrams which are mechanisms to group interesting collections of elements
and relationships. These elements are used to represent complex structures.
164
1.7Let us sum up
2 Which of the following is best for analysis and data-intensive information system?
A. OMT
B. OOSE
C. Both OMT and OOSE
D. Neither OMT nor OOSE
5 UML does not tell you how to develop software. True / False
6 The UML addresses the documentation of a system's architecture and all of its
details. True / False
165
1.8Let us sum up
1.9Further Reading
https://www.duhoctrungquoc.vn/edu/en/UML
https://shms.sa/authoring/53030-unified-modeling-language/view
https://learn.saylor.org/mod/page/view.php?id=32969
https://www.duhoctrungquoc.vn/edu/en/UML
1.10Assignments
What is UML?
Define: Modeling
Define: Diagram
What are the goals of UML?
List various Open Source Tools for Modelling
166
Unit 2: Introduction to UML
2
Unit Structure
2.1. Learning Objectives
2.2. Introduction
2.3. History
2.4. Definition
2.13. Assignments
167
2.1 Learning Objective
After studying this unit student should be able to:
2.2 Introduction
UML is managed as a de facto industry standard by the Object Management Group
(OMG). This unit includes a review about UML History, Definition and its main
diagrams.
2.3History
UML was invented by James Rumbaugh, Grady Booch and Ivar Jacobson. After
Rational Software Corporation hired James Rumbaugh from General Electric in
1994, the company became the source for the two most popular object-oriented
modelling approaches of the day: Rumbaugh's Object-modelling technique (OMT),
which was better for object-oriented analysis (OOA), and Grady Booch's Booch
method, which was better for object-oriented design (OOD). They were soon
assisted in their efforts by Ivar Jacobson, the creator of the object-oriented software
engineering (OOSE) method. Jacobson joined Rational in 1995, after his company,
Objectory AB, was acquired by Rational.
168
2.4Definition
It is important to distinguish between the UML model and the set of diagrams of a
system. A diagram is a partial graphic representation of a system's model. The
model also contains documentation that drive the model elements and diagrams.
Static (or structural) view: emphasizes the static structure of the system using
objects, attributes, operations and relationships. The structural view includes
class diagrams and composite structure diagrams.
Dynamic (or behavioural) view: emphasizes the dynamic behaviour of the
system by showing collaborations among objects and changes to the internal
states of objects. This view includes sequence diagrams, activity diagrams
and state machine diagrams.
2.6Diagrams Overview
In UML 2.2 there are 14 types of diagrams divided into two categories. Seven
diagram types represent structural information, and the other seven represent
general types of behaviour, including four that represent different aspects of
interactions. These diagrams can be categorized hierarchically as shown in the
following diagram:
169
2.7Structure Diagrams
Structure diagrams emphasize the things that must be present in the system being
modelled. Since structure diagrams represent the structure, they are used
extensively in documenting the software architecture of software systems.
170
Profile diagram: operates at the metamodel level to show stereotypes as
classes with the <<stereotype>> stereotype, and profiles as packages with
the <<profile>> stereotype. The extension relation (solid line with closed, filled
arrowhead) indicates what metamodel element a given stereotype is
extending.
2.8Behaviour Diagrams
Behaviour diagrams emphasize what must happen in the system being modelled.
Since behaviour diagrams illustrate the behaviour of a system, they are used
extensively to describe the functionality of software systems.
2.9Interaction Diagrams
Sequence diagram: shows how objects communicate with each other in terms
of a sequence of messages. Also indicates the lifespans of objects relative to
those messages.
Communication diagram: shows the interactions between objects or parts in
terms of sequenced messages. They represent a combination of information
taken from Class, Sequence, and Use Case Diagrams describing both the
static structure and dynamic behaviour of a system.
Interaction overview diagram: provides an overview in which the nodes
represent communication diagrams.
171
Timing diagrams: a specific type of interaction diagram where the focus is on
timing constraints.
To draw UML diagrams, all you need is a pencil and a piece of paper. However, for a
software engineer that seems a little outdated, hence most of us will use tools. The
simplest tools are simply drawing programs, like Microsoft Visio or Dia. The
diagrams generated this way look nice, but are not really that useful, since they do
not include the code generation feature.
Hence, when deciding on a UML modelling tool (sometimes also called CASE tool)
you should make sure, that it allows for code generation and even better, it should
also allow for reverse engineering. Combined, these two are also referred to as
round-trip engineering. Any serious tool should be able to do that. Finally, UML
models can be exchanged among UML tools by using the XMI interchange format,
hence you should check that your tool of choice supports this.
Since the Rational Software Corporation so to say 'invented' UML, the most well-
known UML modelling tool is IBM Rational Rose. Other tools include Rational
Rhapsody, Visual Paradigm, Magic Draw UML, StarUML, ArgoUML, Umbrello,
BOUML, PowerDesigner, Visio and Dia. Some of popular development environments
also offer UML modelling tools, i. e. Eclipse, NetBeans, and Visual Studio.
172
Eclipse – with Eclipse Modeling Framework (EMF) and UML 2.0 (meta model
without GUI) projects.
Fujaba – UML and Java development platform; Eclipse version available.
Gaphor [3] – a GTK+/GNOME UML 2.0 modeling environment written in
Python.
GenMyModel Online UML modeler – cloud-based, UML 2.0 with code
generators written in Javascript and HTML5.
JUDE/Community – Object-Oriented Analysis and Design. JUDE/Community.
though free to use, does not provide open source.
MetaUML – Textual notation for UML. Diagram-rendering based on MetaPost,
suitable for LaTeX typesetting.
MonoUML – based on the latest Mono, GTK+ and ExpertCoder.
NetBeans – with NetBeans IDE 5.5 Enterprise Pack.
Poseidon for UML (Community Edition) – Commercial tool based on
ArgoUML. A cost-free version can be used to view, create, and edit models,
but the export options are not available without a rent subscription
StarUML – a UML/MDA platform for Microsoft Windows, licensed under a
modified version of GNU GPL, mostly written in Delphi
Software Ideas Modeler – a universal software and data modeling platform
with UML support for Microsoft Windows, free edition Standard (for non-
commercial use)
Taylor - model-driven architecture on rails (licensed under the GNU LGPL)
Umbrello UML Modeller – part of KDE.
UML Pad – a UML modeller written in C++/wxWidgets (licensed under the
GNU GPL)
UML Pad – a UML tool for PalmOS
UMLet – a Java-based UML tool (licensed under the GNU GPL)
Visual Paradigm SDE Community Edition - Visual Paradigm SDE integrates
with all leading IDEs (Visual Studio®, Eclipse/WebSphere®, Borland
JBuilder®, NetBeans/Sun™ ONE, IntelliJ IDEA™, Oracle JDeveloper, BEA
WebLogic Workshop™)
173
2.11Let us Sum Up
A. OMT
B. OMG
C. OOT
D. OBC
A. Sequence diagram
B. Interaction overview diagram
C. Timing Diagram
D. Communication Diagram
174
diagrams
A. Sequence diagram
B. Interaction overview diagram
C. Timing Diagram
D. Communication Diagram
2.13Assignment
2.14Further Reading
https://www.duhoctrungquoc.vn/edu/en/UML
https://shms.sa/authoring/53030-unified-modeling-language/view
175
Unit 3: Fundamentals of UML
Diagrams
3
Unit Structure
3.1. Learning Objectives
3.2. Introduction
3.16. Assignments
176
3.1 Learning Objective
After studying this unit student should be able to:
3.2 Introduction
A diagram is the graphical presentation of a set of elements, most often rendered as
a connected graph of vertices (things) and arcs (relationships). You draw diagrams
to visualize a system from different perspectives, so a diagram is a projection into a
system. UML has a lot of different diagrams (models). The reason for this is that it is
possible to look at a system from different viewpoints. UML being a graphical
language includes nine such diagrams models):
1. Class diagram
2. Object diagram
3. Use case diagram
4. Sequence diagram
5. Collaboration diagram
6. Statechart diagram
7. Activity diagram
8. Component diagram
9. Deployment diagram
177
UML nine diagrams can be divided into two categories
Class Diagram
Object Diagram
Component Diagram
Deployment Diagram
In Object Oriented design and development terms, a class has a name, a set of
methods (also known as operations) and related data members (also known as
attributes) as shown in Figure. Class by itself is not very useful. A large software
system may have thousands of classes, Modelling the relationships (association,
inheritance, composition or aggregation) between them really defines systems
behaviour.
Class diagrams shows a set of classes, interfaces, and collaborations and their
relationships. Class diagrams are the most common diagrams found in modelling
object-oriented systems. It is an essential aspect of any Object-Oriented Design
method.
Class diagrams address the static design view of a system. They are used at the
analysis stage as well as design. Class diagrams that include active classes address
the static process view of a system. Class Diagram syntax are being used to draw a
plan of the major concepts for anyone to understand. This is called the Conceptual
Model. Together with use cases, a conceptual diagram is a powerful technique in
requirements analysis. Figure shows an example of a class diagram.
178
Figure: An Example of a Class Diagram
3.4Object Diagram
Object Diagrams show a set of objects and their relationships. They are static
snapshots of element instances found in class diagrams. Figure 2.3 shows an
example of an object diagram.
Use cases are versatile and valuable techniques for describing user requirements. A
use case is a high-level description of a major user requirement. It represents the
functionality of the system. It is a description of the system’s behaviour from a user’s
179
viewpoint and constitutes a complete interaction with the system initiated by a user
or another system.
Use case diagrams address the static use case view of a system. The different types
of people and/or devices (called actors) that interact with the system are identified
along with the functions that they perform or initiate. A Use Case diagram shows a
set of use cases and actors (a special kind of class) and their relationships.
These diagrams are especially important in organizing and modelling the behaviors
of a system. They are valuable aid during analysis, since developing Use Cases
helps to understand requirements. Use Cases and a Conceptual Model are the
powerful techniques in requirement analysis. Notations used when representing use
case diagrams include:
The Actor represents a user of the system, or any external system that interacts with
the system. The Usecase represents a piece of functionality that is important to the
user. Mostly we see the actor as a human user, but it can also represent a system or
other nonhuman artifact. Figure shows the basic notation of a use case diagram.
This feature encourages re-use. If a use-case needs the functionality of another use-
case in order to perform its task, it "uses" the 2 nduse case. The relationship is drawn
as a line with arrowhead pointing to the use case that is being "used" as shown in
Figure.
180
Figure: A < > Relationship in a Use Case Diagram
The "extends" notation extends the functionality of a use case to deal with errors or
exceptions. "extends" relationship as shown in Figure 2.6 is being used when there
is one use case that is similar to another but does a bit more. The relationship is
drawn as a line with arrowhead pointing to the major use case.
"include" relationship as shown in Figure can be used for making up a big use case
from simpler ones.
181
Figure: An < > Relationship in a Use Case Diagram
They are very useful for describing the procedural flow through many objects.
Interaction diagrams consisting of a set of objects and their relationships,
including the messages that may be dispatched among them
Both are interaction diagrams which address the dynamic view of a system
They are models that describes how a group of objects collaborate in some
behaviour, typically a single use case
3.8Sequence Diagrams
182
requirements. In this form objects are shown as vertical lines with the messages as
horizontal lines between them. The sequence of messages is indicated by reading
down the page (read left to right and descending). Sequence Diagrams are about
deciding and modelling "how" the system will achieve "what" we described in the Use
Case model.
Although there is no fixed recipe for developing Sequence Diagrams, we can follow
an approach that will result in a logical sequence diagram. This is as follows:
Take the Use Case description and turn it into simple pseudo code running
down the right-hand side of the State Diagram.
Guess which classes you think might be involved - based on the content of
the Use Case description. Simple noun analysis is as good a way to start as
any.
For each of the steps in your pseudo code decides which of the classes
should have the responsibility for doing that task.
For each of those tasks you may want to go back and decide to break them
down into a number of simpler tasks.
Add in probes that correspond to the "uses (includes)" and "extends"
relationships in the Use Case diagram.
Consider any important errors you might have to handle that perhaps weren't
covered in the Use Case model.
Consider whether anything you have discovered needs to be fed-backed into
the Use Case model.
183
iii. A focus of control (Figure (c))
3.9Collaboration Diagram
184
Figure: Example of a Collaboration Diagram
State chart is a diagram that shows all possible object states. Some objects can at
any particular time be in a certain state. A State chart or simply a state diagram
shows a state machine, consisting of states, transitions, events, and activities. State
chart diagrams address the dynamic view of a system. UML State charts are not
normally needed. They are needed when an object has a different reaction
dependent on its state an example of a State chart diagram is shown in Figure.
An activity diagram is a special kind of a state chart diagram that shows the flow
from activity to activity within a system. They are used to show how different work
flows or processes in a system are constructed, how they start, the many decision
paths that can be taken from start to finish and where parallel processing may occur
during execution. Activity diagrams address the dynamic view of a system. They are
185
especially important in modelling the function of a system and emphasize the flow of
control among objects. An activity diagram as shown in Figure 2.12 generally does
not model the exact internal behaviour of a software system (like a Sequence
diagram does) but rather it shows the general processes and pathways at a high
level.
3.11Package Diagrams
186
Any non-trial system needs to be divided up in smaller, easier to understand
"chunks". A package is basically a logical container into which related elements can
be placed, "like a folder or directory in an operating system". We can display groups
of packages and relationships between then on the UML package diagram.
Packages does not show actually what is inside the package, it provides a very
"high-level" view of the system. Some case tools allow the user to double-click on
the package icon in order to open-up the package and explore the contents. The
common use of a package is to group related classes together, sometimes group
related use cases.
3.12Component Diagrams
A component diagram is similar to the package diagram. It works in the same way as
the package diagram, showing the organizations and dependencies among a set of
components. Component diagrams address the static implementation view of a
system. Component diagrams emphasize the physical software entity e.g. files
headers, executables, link-libraries etc, rather than the logical partitioning of the
package diagram. It is based heavily on the package diagram, but has added ".dll" to
handle I/O, and has added a test harness executable. Not heavily used, but can be
187
helpful in mapping the physical, real life software code and dependencies between
them. Figure 2.14 shows a symbol used for a software component.
3.13Deployment Diagrams
Deployment diagram shows the configuration of run-time processing nodes and the
components that live on them. Deployment diagrams address the static deployment
view of an architecture. They are related to component diagrams in that a node
typically encloses one or more components. Figure shows a node symbol used in
deployment diagram.
3.14Let us Sum Up
188
In this unit, you have learnt about UML diagrams and their use context. Each
diagram in UML provides a certain view of the software under development. When
creating a diagram, the following can be a guide question for each:
Use Cases – How will our system interact with the outside world?
Statechart (or state) Diagram – What states should our objects be in?
b)Object diagrams
c) Class diagrams
d) Both b&c
a)Use-case
b)state
c)class
d)activity
189
a) Use-case
b)Activity
c)Sequence
a)Statechart
b)Activity
c)Use-case
d)Sequence
3.16Assignment
3.17References
https://www.duhoctrungquoc.vn/edu/en/UML
https://shms.sa/authoring/53030-unified-modeling-language/view
https://learn.saylor.org/mod/page/view.php?id=32969
190
1- d)Both b & c
2- a) Use – Case
3- d) All of these
4- d) Activity
Block-4
UML Interaction Diagram
191
192
Unit 1: Collaboration Diagram
1
Unit Structure
1.1. Learning Objectives
1.2. Introduction
1.11. Assignments
193
1.1 Learning Objective
After studying this unit student should be able to:
1.2Introduction
As its name might suggest, an interaction diagram is a type of UML diagram that's
used to capture the interactive behaviour of a system. Interaction diagrams focus on
describing the flow of messages within a system, providing context for one or more
lifelines within a system. In addition, interaction diagrams can be used to represent
the ordered sequences within a system and act as a means of visualizing real-time
data via UML.
194
1.3Benefits of using an interaction diagram
Communication diagram
Sequence diagram
Timing diagram
Interaction overview diagram
195
Communication diagrams show much of the same information as sequence
diagrams, but because of how the information is presented, some of it is easier to
find in one diagram than the other. Communication diagrams show which elements
each one interacts with better, but sequence diagrams show the order in which the
interactions take place more clearly.
196
Figure: A Object Sequence Diagram for makePayment(cashTendered) Operation
Instances: is the same object but the name is being underlined and it has to
always preceded by a colon.
Links: this is a connection path between two objects to show some form of
navigation and visibility instances.
197
Message: messages are represented using an arrow on the link line.
Messages are numbered to show the sequential order in which the message
are sent.
Parameter: Parameters are shown within parentheses following the message.
A collaboration diagram has more notations which can be used when need comes as
follows:
Some message sent to an object may require a returning message. A return value
may be shown by preceding the message with a return value variable name and an
assignment operator (':=') as shown in Figure. The standard syntax for messages is:
Representing iteration
An object may repeatedly send a message to another object a number of times. This
is indicated by prefixing the message with a start ('*') as in Figure.
198
message can optionally take parameters when some attributes of the object to be
created need to be set an initial value
199
Sometimes, a message may be guarded and can be sent from one object to another
only when a condition holds. At a point during the execution of an object, a choice of
several messages, guarded by different conditions, will be sent. In a sequential
system, an object can send one message at a time and thus these conditions must
be mutually exclusive. When we have mutually exclusive conditional messages, it is
necessary to modify the sequence expressions with a conditional path letter.
Note that:
Representing multiobjects
200
Figure 4.8: Multiobject and Message to Multiobject
Collaboration diagrams should be used when the relationships among objects are
crucial to display. A few examples of instances where collaboration diagrams might
be helpful include:
In UML, the two types of interaction diagrams are collaboration and sequence
diagrams. While both types use similar information, they display them in separate
ways. Collaboration diagrams are used to visualize the structural organization of
objects and their interactions. Sequence diagrams, on the other hand, focus on the
201
order of messages that flow between objects. However, in most scenarios, a single
figure is not sufficient in describing the behavior of a system and both figures are
required.
1.8Let us sum up
Collaboration diagrams are mainly used in object-oriented design phase. They are
flexible to add new concepts in two dimensions hence occupy less space. In design
phase objects are supposed to be provided with operations to perform.
Collaborations are easily used for this purpose with the help of a Pattern which
facilitate assigning responsibility to objects.
a) Communication diagram
b)Sequence diagram
c)Timing diagram
a)Instances
b)Links
c)Message
d)Parameter
https://en.wikipedia.org/wiki/Interaction_overview_diagram
https://www.tutorialspoint.com/uml/uml_interaction_diagram.htm
https://www.lucidchart.com/pages/uml-interaction-diagram
202
https://www.techtarget.com/searchsoftwarequality/definition/collaboration-
diagram
1.11.Assignments
203
Unit 2: Sequence Diagram
2
Unit Structure
2.1. Learning Objectives
2.2. Introduction
2.12. Assignments
2.13. References
204
2.1 Learning Objective
After studying this unit student should be able to:
2.2 Introduction
During the requirements analysis phase, the system can be treated as a single
"black box", which means that we can look at the system's behavior (what it does)
without explaining how it does it. This is called a system sequence diagram.
This unit will guide you on how to identifying objects or concepts and make them
relate to each other and finally create a conceptual or domain diagram.
205
2.4Sequence Diagram Notations
Actors – An actor in a UML diagram represents a type of role where it interacts with
the system and its objects. It is important to note here that an actor is always outside
the scope of the system we aim to model using the UML diagram.
We use actors to depict various roles including human users and other external
subjects. We represent an actor in a UML diagram using a stick person notation. We
can have multiple actors in a sequence diagram. For example – Here the user in
seat reservation system is shown as an actor where it exists outside the system and
is not a part of the system.
206
standard in UML for naming a lifeline follows the following format – Instance Name :
Class Name
Figure – lifeline
We display a lifeline in a rectangle called head with its name and type. The head is
located on top of a vertical dashed line (referred to as the stem) as shown above. If
we want to model an unnamed instance, we follow the same pattern except now the
portion of lifeline’s name is left blank. Difference between a lifeline and an actor – A
lifeline always portrays an object internal to the system whereas actors are used to
depict objects external to the system. The following is an example of a sequence
diagram:
207
Figure – a sequence diagram with different types of messages
Synchronous messages – A synchronous message waits for a reply before the
interaction can move forward. The sender waits until the receiver has completed the
processing of the message. The caller continues only when it knows that the receiver
has processed the previous message i.e. it receives a reply message. A large
number of calls in object oriented programming are synchronous. We use a solid
arrow head to represent a synchronous message.
208
Asynchronous Messages – An asynchronous message does not wait for a
reply from the receiver. The interaction moves forward irrespective of the
receiver processing the previous message or not. We use a lined arrow head
to represent an asynchronous message.
Create message – We use a Create message to instantiate a new object in the
sequence diagram. There are situations when a particular message call requires the
creation of an object. It is represented with a dotted arrow and create word labelled
on it to specify that it is the create Message symbol. For example – The creation of a
new order on a e-commerce website would require a new object of Order class to be
created.
209
Delete Message – We use a Delete Message to delete an object. When an object
is de-allocated memory or is destroyed within the system we use the Delete
Message symbol. It destroys the occurrence of the object in the system.It is
represented by an arrow terminating with a x. For example – In the scenario below
when the order is received by the user, the object of order class can be
destroyed.
210
Reply Message – Reply messages are used to show the message being sent from
the receiver to the sender. We represent a return/reply message using an open
arrowhead with a dotted line. The interaction moves forward only when a reply
message is sent by the receiver.
211
Figure – found message
It can be due to multiple reasons and we are not certain as to what caused the
hardware failure.
212
the user or other software/object that the lifeline is interacting with. Since the
destination is not known before hand, we use the Lost Message symbol.
Guards – To model conditions we use guards in UML. They are used when we
need to restrict the flow of messages on the pretext of a condition being met.
Guards play an important role in letting software developers know the constraints
attached to a system or a particular process. For example: In order to be able to
withdraw cash, having a balance greater than zero is a condition that must be met
as shown below.
213
2.5 Example of Sequence Diagram
214
2.6System Sequence Diagrams and Operations
We need to identify the operations that the system needs to perform and in what
order the system need to perform these operations to carry out a use case, and the
effect of such an operation on the system, i.e. on the objects of the systems.
A use case defines a class of conversations between the actors and the system, and
an individual conversation of this class is a realization of the use case. Obviously,
there may be many realizations for a use case. A scenario of a use case is a
particular instance or realized path through the use case, i.e. a particular realization
of the use case. `
This topic is intending to introduce system sequence diagrams which are used to find
system events and system operations. Latter we will see how to create a contract of
system operations.
When an actor interacts with the system for a certain use case, events are being
generated to a system. This event is requesting the system to perform some
operations in response. Liu, indicate that events generated by actors are very tightly
related to operations that the system can perform. This implies that we identify
system's operations by identifying events that actors generate.
Some system operations also generate output events to the actors to prompt the
next system event that an actor can perform; and A system event is either an input
event or an output event.
Therefore, a system input event triggers a system operation, and a system operation
response to a system input event.
215
the use case of Make Phone Calls for a telephone system, which involves two
actors, Caller (initiator) and Callee. The following sequence of events is a scenario of
this use case:
Figure: Telephone system event trace diagram for the "Make Phone Calls"
216
We can represent the set sequence of events is a scenario using event tracer
diagram as shown in Figure:
For example, the typical course of events in the Make Phone Calls indicates that the
caller and callee generate the system input events that can be denoted as
liftReceiver, dialPhoneNumber, answersPhone, hangsUp. In general, an event takes
parameters.
UML Trace diagram is very useful in identifying the system operations, as in Figure
which show, for a particular course of events within a use case, the external actors
that interact directly with the system, the system (as a black box), and the system
input events that the actors generate. A simplified trace diagram which shows only
system input events is called a system sequence diagram. A system sequence
diagram (SSD) for the Make Phone Calls use case can be illustrated as in Figure.
Figure: A System Sequence Diagram for the Make Phone Calls of a Telephone
System
217
System operations are the operations that system needs to perform to carry out a
use case and the effects of these operations on the system. In this case, use cases
– use case diagram and use case descriptions are inputs of this activity.
If the sequence of events changes, it can cause delays, or the system may crash. It’s
important to select the notation that matches the particular sequence within your
diagram.
218
2.10Let us sum up
In this unit we have learned about what is sequence diagram, Benefits of using
sequence diagram, Sequence Diagram Notations, System Sequence Diagrams and
Operations and System Input Events and System Operations. How to draw a System
Sequence Diagram.
1 _______ in a UML diagram represents a type of role where it interacts with the
system and its objects.
a) Actor
b) Message
c)Self message
d)Synchronous messages
2 A Synchronous message does not wait for a reply from the receiver. True/False.
a) Actor
b) Guards
c)Lost message
d)Found message
4 Certain scenarios might arise where the object needs to send a message to
itself. Such messages are called ______Messages and are represented with a
U-shaped arrow.
a)Delete message
b)Self message
c)Found message
d)Reply message
219
2.12 Assignment
Explain sequence diagram with example
Explain timing diagram with suitable example
Define Interaction Diagram
Explain symbols and terminology used for Interaction diagram
220
Unit 3: Timing and Interaction
Overview Diagram
3
Unit Structure
3.1. Learning Objectives
3.2. Introduction
3.10. Assignments
221
3.1 Learning Objective
After studying this unit student should be able to:
3.2 Introduction
In this unit we will lean about timing diagram and interaction overview diagram with
example. We will also discuss advantages and disadvantages of it. We will look at
the Interaction diagram symbols and terminology and How to draw an interaction
diagram
3.3Timing diagram
Another diagram option can be to use timing diagrams. These are visuals used to
depict the state of a lifeline at any instance in time, denoting the changes in an object
from one form to another. Waveforms are used within timing diagrams to visualize
the flow within the software program at various instances of time.
You should also consider these potential downsides of using a timing diagram:
222
3.4Interaction overview diagram
The interaction overview diagram provides a high-level view of an interaction model.
The diagram acts as an overview of the flow of control from interaction to interaction,
as well as the flow of activity from diagram to diagram.
Although interaction diagrams are fairly intuitive, they do require branching and
interactions to follow certain behaviors, which can be restrictive.
Here are some common terms and symbols you’ll come across in an interaction
diagram:
223
Lifeline: A lifeline depicts a single participant in a given interaction, describing how
an instance of a specific classifier participates in an interaction.
Name: Used to refer to the lifeline in a specific interaction. Lifeline names are
optional.
Type: Names the classifier of which the lifeline represents an instance.
Selector: Used as a Boolean condition to select a particular instance that
satisfies the requirement.
1. Synchronous message: The message sender keeps waiting for the receiver
to return control from the message execution.
2. Asynchronous message: The message sender continues the execution of
the next message without waiting for a return from the message receiver.
3. Return message: The receiver of a previous message returns the focus of
control to the sender.
4. Object creation: The message sender creates an instance of a classifier.
5. Object destruction: The message sender destroys the created instance.
6. Found message: The message sender is outside the scope of interaction.
7. Lost message: The message is lost in the interaction and never reaches the
destination.
224
Break (break): If the condition is true or false, the loop is broken, and the next
instruction is executed.
Ref (reference): This operator refers to another interaction.
Par (parallel): All operands are executed in parallel with one another.
Branching: These are some of the most crucial terms in an interaction diagram. To
represent branching within an interaction diagram, guard conditions are added to
individual messages. These guard conditions are used to verify if a message can be
sent forward or not. Only if a message’s guard conditions are true can it be sent
forward. A message can have multiple guard conditions, and multiple messages can
carry the same guard conditions.
Parallel iteration specifiers are used to show that messages are being sent in
parallel. This is denoted by *//. In UML, iteration is achieved by using a loop operator.
Follow these steps to ensure that you have the necessary information to begin
creating your interaction diagram:
225
6. Within your UML diagram software, select the appropriate shapes, nodes, and
lines to create the flow of activity within your diagram. Or, select a template
and customize your diagram from there.
7. Label each shape, node, and line to represent each event, interaction, and
message within your system.
Note that your diagram’s design will vary when creating a sequence, timing, or
communication diagram, as each diagram focuses on a different aspect of a
system’s behavior.
3.8Let us sum up
In this unit we have learned about what is interaction diagram, Benefits of using an
interaction diagram, Types of Interaction Diagram, Communication Diagram or
Collaboration Diagram, Sequence diagram, Timing Diagram and Interaction
Diagram.
226
We have also discussed Interaction diagram symbols and terminology, How to draw
an interaction diagram, Interaction Diagram Example.
a) Name
b) Type
c)Selector
a)Opt(option)
b)Alt(alternative)
c)Break(break)
d)Loop(loop)
4 A timing diagram offers allow for forward and reverse engineering. True/False
3.10 Assignment
Explain sequence diagram with example
Explain timing diagram with suitable example
Define Interaction Diagram
Explain symbols and terminology used for Interaction diagram
227
3.12Possible Answers to Check Your Progress
1 – True
2 –d) All of these
3 – a) Opt(option)
4 – True
228
___________
BAOU
Educa on
for All