SE-FULL Notes
SE-FULL Notes
Engineering and
Management
[21CS61]
Department of AI &ML
Page 1
Module-1:Introduction
What is software?
A program is a set of instructions that performs a specific
task. Software is a set of programs that accomplish a collective
functionality.
Properties of software differ from the properties of physical
constructs. The abstract and intangible nature of the software
makes it different. Software could be complex, difficult to
understand and expensive to change depending on the type of
software being developed. Depending on the context of its
operation different types of software require different
approaches for development. It is also possible that software
can fail. The failure of software could be due to:
1)Increase in demand and
2)Low expectation
Page 2
run, to use software engineering methods and techniques for
software systems.
Software products can be categorised into:
1. Generic products: These are stand-alone systems that are
marketed and sold to any customer who wishes to buy them.
Examples – PC software such as graphics programs, project
management tools; CAD software; software for specific markets
such as appointments systems for dentists.
2. Customized products: Software that is commissioned by a
specific customer to meet their own needs. Such products are
generally used to solve a problem in a specific domain.
Examples – embedded control systems, air traffic control
software, traffic monitoring systems.
The attributes of good software are:
Maintainability –Every software developed should be able to
meet the changing needs of customers.
Dependability and security- Software developed for any
situation should not cause physical or economic damage in the
event of system failure. Care should be taken that malicious
users should not be able to access or damage the system.
Efficiency – Depending on the context, the developed software
would be evaluated based on its responsiveness, processing
time and memory utilisation
Acceptability- Any software developed should be
understandable, usable and compatible with other systems in
the context that work in unison with it.
Software crisis
It is obvious to note that it is very difficult to write efficient
software within the right time specified. This could be due to
various reasons such as
Page 3
1. Heterogeneity –increasingly, systems are required to
operate as distributed systems across networks that
include different types of computer and mobile devices.
2. Business and social change: Business and society are
changing incredibly quickly as emerging economies
develop and new technologies become available. They
need to be able to change their existing software and to
rapidly develop new software.
Security and trust also plays a very important role in
developing a software module. As software is intertwined with
all aspects of our lives, it is essential that we can trust that
software. Hence appropriate security measures need to be
taken to safeguard the software from external attack.
Page 4
existing components for software development, the
components is available for use as per IPR.
d) Computer misuse- Using the computer provided by the
employer for personal use is misconduct and misuse of
the system. Watching videos, playing songs, browsing
social networking sites all mark the misuse of computer.
Page 5
Fig 1: Architecture of insulin pump control system
Page 6
Fig 2: Architecture of
MHC-PMS The system is expected to
support the following functionality:
1. Individual care management
2. Patient monitoring
3. Administrative reporting
4. Other Aspects that need to be considered other than
functional are:
Privacy - patient information is confidential. At
most care need to be taken to protect the privacy of the
patient and his illness details.
Safety - prescribe the correct medication to
patients.
Software Processes
Software processes are a integral part of software process
models. Various process activities that are carried out during
every phase of development form the software activities. To
define technically, A software process is a structured set of
activities required to develop a software system. The activities
by and large include:
1. Specification – defining what the system should do;
2. Design and implementation – defining the organization of
the system and implementing the system;
Page 7
3. Validation – checking that it does what the customer
wants;
4. Evolution – changing the system in response to changing
customer needs.
Page 8
Fig 3: Requirements Engineering Process
Once the feasibility study has been completed a feasibility
report is generated. It is observed that the requirements
elicitation and analysis, requirements specification and
requirements validation are iterative activities. Based on the
analysis it is required to decide on a system model that needs
to be incorporated as a part of requirements document. The
requirements specification activity gives the complete user and
system requirements. The requirements validation process
checks if the system performs the required functions and the
requirement specification covers all functionalities to be
provided by the system. The outcome of each activity is an
input to the requirements document.
Page 9
Model of the design process
Implementation
Translate this structure into an executable program. This
requires the use of a programming language. The choice of
programming language is based on the complexity of the
software, the requirements specification of the software, the
reusability of components in the software etc.
Software validation
Validating the software involve checking for conformation of
the system to its specification. This also involves checking and
review processes and system testing. System testing involves
Page 10
executing the system with test cases. The system testing
involves Component testing and acceptance testing.
Component testing involves testing of each component that is
used to build the software. The interfaces between the
components and the working of components with the existing
system code needs to be tested. The process activities involved
in testing and its iterations are shown in Fig 5. Every
individual component is tested and then system is tested as a
whole. Acceptance testing is done to determine if the system is
functioning well in the domain of its application.
Testing phases
Page 11
Fig 6: Phases of testing
As and when the requirements specification is complete the
acceptance test plan is also parallel written because the
acceptance testing involves testing of the software in its
working domain. Acceptance test cases are written at this
stage. The test plan gets its input from both requirements
specification as well as system specification activities. The
system integration test plan is an output of system
specification and design. Workings of individual components,
testing for interfaces between them are all a part of system
integration testing. Once the detailed design is available the
sub system integration test plan is also drafted. Later on the
tests are accomplished by making use of the test plan.
This is also called as V-model for test plan driven software
development process.
Software Evolution
Page 12
Fig 7: Activities in software evolution
It is obvious that software is inherently flexible and can
change. As requirements change through changing business
circumstances, the software that supports the business must
also evolve and change. Although there has been a
demarcation between development and evolution
(maintenance) this is increasingly irrelevant as fewer and fewer
systems are completely new. Fig 7 depicts the activities
involved in software evolution. Existing system is continuously
assessed based on the system requirements. If any change has
been proposed the system needs to be modified and a new
system is then released. This is an iterative process and
continues until the required outcome has been obtained.
Page 13
Process activities
Processes are inter-leaved sequences of activities with the
overall goal of specifying, designing, implementing and testing
a software system. The four basic process activities of software
development are organized differently in different development
processes depending on the application being developed. The
activities are: specification, development, validation and
evolution. Each of these is explained in detail in the rest of the
chapters.
Software specification
The specification of the software requires answering the
following questions:
a) What are the services required by the software? – To get
the functionalities of the software to be developed.
b) What are the constraints on system operation?- To get
the domain information of the software to be developed.
Models
a) The waterfall model: This is a plan-driven model. There
are separate and distinct phases of specification and
development.
b) Incremental development: This is model where the
specification, development and validation are
interleaved. Incremental development may follow either
plandriven approach or agile approach.
c) Reuse-oriented software engineering: The system is
assembled from existing components. This approach
also may be plan-driven or agile.
There is no hard rule on the model chosen for
developing a particular application. In practice, most large
systems are developed using a process that incorporates
elements from all of these models. Each of these models are
described in detail below:
Page 14
Water fall model
Fig 8: Waterfall
model The phases of Waterfall model
depicted in Fig 8 are:
a) Requirements analysis and definition – Gathering the
requirements and defining the functionality of each
requirement. This could be done through various
techniques discussed in the next section.
b) System and software design- Design and architecting the
software as a whole. The components involved, the
interface between them and other design considerations
are depicted as diagrams. UML diagrams are most
frequently used design representations.
c) Implementation and unit testing – Developing the system
and testing each module one by one as a single unit.
Every component developed or reused are individually
tested.
d) Integration and system testing- The components are
integrated together and the system is tested as a whole.
Page 15
The interfaces and communication modules between the
systems are tested here.
e) Operation and maintenance- Once the system is put into
use, the functionality of the system in the operational
domain needs to be taken care of. The maintenance and
operation of the system at the client end is important.
Page 16
Incremental development involves developing the system in
increments and evaluating each increment before proceeding
to the development of the next increment. This is the normal
approach used in agile methods. The evaluation of software
developed using incremental approach is done by
user/customer proxy.
Incremental delivery involves deploying an increment for use
by end-users. This is a more realistic evaluation about
practical use of software. It is difficult to implement for
replacement systems as increments have less functionality
than the system being replaced.
Advantages and disadvantages
Cost of accommodating changing customer requirements is
reduced. Customer feedback on the development is obtained
as and when an increment is ready to be released. Rapid
delivery and deployment of useful software can be
accomplished by making use of this approach.
The Problems with this approach is that the process is not
visible. Also, it is inevitable that system structure tends to
degrade as new increments are added.
Page 17
Fig 10: Boehm‟s spiral model
Fig 10 shows the Boehm‟s spiral model. Here the process is
represented as a spiral rather than as a sequence of activities
with backtracking. Each loop in the spiral represents a phase
in the process. There are no fixed phases such as specification
or design. The loops in the spiral are chosen depending on
what is required. Risks are explicitly assessed and resolved
throughout the process. Spiral model has been very influential
in helping people think about iteration in software processes
and introducing the risk-driven approach to development. In
practice, however, the model is rarely used as published for
practical software development.
Sectors of spiral model
The following are the sectors of the spiral model:
1. Objective setting -Specific objectives for the phase are
identified.
2. Risk assessment and reduction-Risks are assessed and
activities put in place to reduce the key risks.
Page 18
3. Development and validation-A development model for the
system is chosen which can be any of the generic
models.
4. Planning-The project is reviewed and the next phase of
the spiral is planned.
Requirements Engineering
Requirements engineering definition: The process of
establishing the services that the customer requires from a
system and the constraints under which it operates and is
developed. The requirements themselves are the descriptions
of the system services and constraints that are generated
during the requirements engineering process. A requirement
may range from a high-level abstract statement of a service or
of a system constraint to a detailed mathematical functional
specification. This is inevitable as requirements may serve a
dual function as described in the following scenarios:
1) May be the basis for a bid for a contract - therefore must
be open to interpretation;
2) May be the basis for the contract itself - therefore must be
defined in detail;
3) 3) Both these statements may be called requirements.
Types of requirements:
Requirements can be basically categorised into:
1. User requirement which are statements in natural
language plus diagrams of the services the system
provides & its operational constraints. Basically specifies
external system behavior. These are the requirements
which are written for customers
2. Systems Requirements are a structured document
setting out detailed descriptions of the system‟s
functions, services & operational constraints. It is
Page 19
necessary that the systems requirements should reflect
accurately what the customer wants and should also
precisely define what should be implemented. This could
be a part of a contract between client and contractor
Example of a user requirement:
In a Library management system, the following functionalities
are expected to be present
1. The system will maintain records of all library items
including books, serials, newspapers, magazines, video
and audio tapes, reports, collections of transparencies,
computer discs and CD-ROMs.
2. Paper-based library items are stored on open shelves in
the library and the system records their reference
position in the library.
3. No item will be removed from the library without the
details of its borrowing being recorded in the system.
4. All items will have a bar code containing a unique
reference number by which an item can be identified
within the system.
For the same application the example of a System requirement
could be:
1. The system will permit all users to search for an item by
title, by author or by ISBN
2. Staff will be able to search for an item by bar code ref.
number
3. Books can be borrowed for 15 days while CD-ROMs,
Audio tapes & reports can be borrowed only for 3 days
4. Borrowed items that are one day overdue in their return
will cause a reminder letter to be printed
5. Librarian should be able to find out details like Number
of books & materials borrowed (on a given day, by a
given client)
6. Selected items may be temporarily blocked by authorized
staff
Page 20
Readers of different types of requirements
specification
Page 21
timing constraints, constraints on the development
process, standards, etc.
3. These requirements often apply to the system as a whole
rather than individual features or services.
4. Domain requirements: Constraints on the system from
the domain of operation of the final system.
Each of the above requirements is explained in detail.
Functional Requirements:
Describe functionality or system services and depend on the
type of software, expected users and the organization where
the software is used. This could be high-level statements of
what the system should do. However, it should describe all the
system services in detail which could include its inputs, its
Outputs, exceptions and so on. Such requirements are
generally described in fairly abstract but precise way.
Non-Functional Requirements:
Define system properties and constraints e.g. reliability,
response time and storage occupancy, Security, etc..
Alternatively they may define platform constraints like, I/O
devices capability, data representations. Process requirements
may also be specified mandating a particular CASE system,
programming language or development method. These
requirements arise through organizational policies, budget
limits, interoperability needs etc. They may be considered to be
more critical than functional requirements because if these are
not met, the system will be useless.
Non-functional requirements can be further classified as
shown in Fig 12
Page 22
Fig 12: Classification of
Non-functional requirements The classification can
be described as given below:
1. Product requirements: Requirements which specify that
the delivered product must behave in a particular way
e.g. execution speed, reliability, etc.
2. Organisational requirements: Requirements which are a
consequence of organisational policies and procedures
e.g. process standards used, implementation
requirements, etc.
3. External requirements: Requirements which arise from
factors which are external to the system and its
development process e.g. interoperability requirements,
legislative requirements, etc.
Non-functional requirements may affect the overall
architecture of a system rather than the individual
components. For example, to ensure that performance
requirements are met, you may have to organize the system to
minimize communications between components.
A single non-functional requirement, such as a security
requirement, may generate a number of related functional
Page 23
requirements that define system services that are required. It
may also generate requirements that restrict existing
requirements.
Page 24
as possible, it should be a set of what the system should do
rather than how it should do it.
Fig 13 shows the users of a requirements document. The
illustration is self-explanatory. It should be noted that
requirements specification is not just for end users or for
developers.
It is for all those entities who are involved through out the
software development process.
Page 25
IEEE structure of a requirements document
The table below describes the various chapters and its
description for a standard requirements document. This is
given by the IEEE. All software do not necessarily follow this
exact structure. But a standard structure tuned to the needs
of the application is required to be followed.
Page 26
anticipated system architecture, showing the
distribution of functions across system modules.
Architectural components that are reused should be
highlighted.
System requirements This should describe the functional and
nonfunctional requirements in specification more detail. If
necessary, further detail may also be added to the nonfunctional
requirements. Interfaces to other systems may be defined.
System models This might include graphical system models showing
the relationships between the system
components and the system and its environment.
Examples of possible models are object models,
data-flow models, or semantic data models.
System evolution This should describe the fundamental
assumptions on which the system is based, and
any anticipated changes due to hardware
evolution, changing user needs, and so on. This
section is useful for system designers as it may
help them avoid design decisions that would
constrain likely future changes to the system.
Appendices These should provide detailed, specific information that
is related to the application being developed; for
example, hardware and database descriptions.
Hardware requirements define the minimal and
optimal configurations for the system. Database
requirements define the logical organization of
the data used by the system and the
relationships between data.
Page 27
Notation Description
Natural The requirements are written using
numbered sentences in language natural language. Each
sentence should express one requirement.
Structured The requirements are written in natural
language on a standard natural form or template. Each
field provides information about an language aspect of
the requirement.
Design This approach uses a language like a
programming language, description but with more
abstract features to specify the requirements by
languages defining an operational model of the system.
This approach is
now rarely used although it can be
useful for interface specifications.
Graphical Graphical models, supplemented by text
annotations, are used to notations define the functional
requirements for the system; UML use case and
sequence diagrams are commonly used.
Mathematical These notations are based on
mathematical concepts such as specifications finite-state
machines or sets. Although these unambiguous
specifications can reduce the ambiguity in a
requirements document, most customers don‟t
understand a formal specification. They cannot check
that it represents what they want and are reluctant to
accept it as a system contract
Page 28
If down arrow
pressed
scroll the
addresses
else
If any “Alpha key pressed
Display the first address starting from that
alpha
End if
Endif
2. Form Based approach: Creates a standard format for
specifying requirements.
Typically can have entries like :
1. Definition of the function or entity.
2. Description of inputs and where they come from.
3. Description of outputs and where they go to.
4. Indication of other entities required.
5. Pre and post conditions (if appropriate )
This method eliminates problems of natural language. This
also brings in uniformity & comprehensiveness. Not always
useful Example specifying interactions)
3. Tabular Model
This is also used to supplement natural language.
This is particularly useful when you have to define a
number of possible alternative courses of action.
Example:
Page 29
Condition Action
Sugar level falling (r2 < r1) CompDose = 0
Sugar level stable (r2 = r1) CompDose = 0
Sugar level increasing and rate of CompDose = 0
increase decreasing ((r2-r1)<(r1-r0)) CompDose = round ((r2-r1)/4)
Sugar level increasing and rate of If rounded result = 0 then
increase stable or increasing. ((r2-r1) ≥
(r1-r0)) CompDose = MinimumDose
4. Graphical Model ( like sequence diagram of UML)
This is most useful when state changes need to be depicted
OR Sequence of actions & interactions need to be described.
Sample Requirements Document
A typical SRS would look like the following example taken from
a weblink free to download document.
To be strictly used for Educational purpose only:
A document of Global Digital Megacorp Student Information
Management System available on:
web.uvic.ca/~cloke/Seng321Designer/SENG321-2008_Group
4_RS1.0.doc
Requirements Engineering (RE) processes
The processes used for RE vary widely depending on the
application domain, the people involved and the organisation
developing the requirements. However, there are a number of
generic activities common to all processes which are:
1. Feasibility Study
2. Requirements elicitation;
3. Requirements analysis;
4. Requirements validation;
5. Requirements management.
In practice, RE is an iterative activity in which these processes
are interleaved.
The spiral view of requirements engineering process is shown
in Fig 14
Page 30
Fig 14: Spiral view of Requirements
engineering process
1. Feasibility Study : Decides whether or not the proposed system
is worthwhile attempting. A short focused study that checks
the following:
a) If the system contributes to organisational
objectives;
b) If the system can be engineered using current
technology and within budget;
c) If the system can be integrated with other systems
that are used
d) If the system can fit into the cultural framework of
the organizational culture and acceptable to all the
stake-holders
Information collection is done by asking questions to the
stake-holders of the system Typical Questions could be:
a) What if the system wasn‟t implemented?
Page 31
b)What are current process problems?
c)How will the proposed system help?
d)What will be the integration problems?
e)Is new technology needed? What skills?
f)What facilities must be supported by the proposed
system?
2. Requirement Elicitation
Involves Interacting with technical staff working with
customers to find out about
the application domain, the services that the system should
provide and the system‟s operational constraints. This may
involve stakeholders like end-users, managers, Engineers
involved in maintenance, domain experts, trade unions, etc.
Domain requirements are also discovered at this stage.
Domain Requirements are derived from the application domain
rather than specific needs of a customer in that domain. They
usually refer to specialized domain terminology / concepts.
They describe system characteristics & features that reflect
the domain. Domain requirements could be
1. New functional requirements,
2. Constraints on existing requirements or
3. Define specific computations.
If domain requirements are not satisfied, the system may be
unworkable.
The requirements elicitation and analysis process
Fig 15 shows the process of requirements elicitation and
analysis.
Page 32
Fig 15: Requirements elicitation and analysis process
Requirements Elicitation is done through
1. Interviewing: The RE team puts questions to
stakeholders about the system that they use and the
system to be developed. There are two types of
interviews:
Closed interviews where a pre-defined set of
questions are answered.
Open interviews where there is no pre-defined
agenda and a range of issues are explored with
stakeholders.
Normally a mix of closed and open-ended
interviewing is good for getting an overall understanding
of what stakeholders do & how they interact with the
system. This method is not good for understanding
domain requirements
2. Observation & study: Observation (in-situ): The RE team
observes the manual process in action, in-situ and infers
required information. This is good for process oriented
systems. Minimal disturbance to user staff.
Study- Additional information is gathered from
study of documents, forms manuals , rulebooks and
other artifacts used by the actors of the system . Here
the analyst must be well experienced with the domain
Problems with Requirement Elicitation
1. Stakeholders don‟t know what they really want.
2. Stakeholders express requirements in their own terms.
3. Different stakeholders may have conflicting
requirements.
4. Organisational and political factors may influence the
system requirements.
5. The requirements change during the analysis process
Page 33
6. New stakeholders may emerge and the business
environment change
Activities of Requirement Analysis
1. Requirements classification and organisation : Grouping
related requirements and organising them into coherent
clusters
2. Prioritisation and negotiation: Prioritising requirements
and resolving requirements conflicts requirements
documentation
3. Requirements are documented and input into the next
round of the spiral Requirements validation
This is concerned with demonstrating that the requirements
define the system that the customer really wants.
Requirements error costs are high so validation is very
important. Fixing a requirements error after delivery may cost
up to 100 times the cost of fixing an implementation error.
Requirements checking
To check the requirements for a software, the following
parameters need to be considered:
1. Validity. Does the system provide the functions which
best support the customer‟s needs?
2. Consistency. Are there any requirements conflicts?
3. Completeness. Are all functions required by the
customer included?
4. Realism. Can the requirements be implemented given
available budget and technology
5. Verifiability. Can the requirements be checked?
Requirements validation techniques
Various ways exist for validating the requirements:
1. Requirements reviews: This involves systematic manual
analysis of the requirements.
2. Prototyping: This involves using an executable model of
the system to check requirements.
Page 34
3. Test-case generation: Developing tests for requirements
to check testability.
Requirements reviews
It is essential that regular reviews should be held while the
requirements definition is being formulated. Both client and
contractor staff should be involved in reviews. Reviews may be
formal (with completed documents) or informal. Good
communications between developers, customers and users can
resolve problems at an early stage.
Review checks
Parameters for review checks consist of checking for the
following:
1. Verifiability: Is the requirement realistically testable?
2. Comprehensibility: Is the requirement properly
understood?
3. Traceability: Is the origin of the requirement clearly
stated?
4. Adaptability: Can the requirement be changed without a
large impact on other requirements?
Requirements management
Process of understanding and controlling the changing
requirements during the requirements engineering process
and system development forms the major activity of
requirements management. Requirements are inevitably
incomplete & inconsistent. New requirements emerge during
the process as business needs change and a better
understanding of the system is developed. Different viewpoints
have different requirements and these are often contradictory.
All this needs reconciliation & management.
Reasons for change in Requirements
1. The business and technical environment of the system
always changes after installation. New hardware may be
introduced, it may be necessary to interface the system
with other systems, business priorities may change (with
consequent changes in the system support required),
Page 35
and new legislation and regulations may be introduced
that the system must necessarily abide by.
2. The people who pay for a system and the users of that
system are rarely the same people. System customers
impose requirements because of organizational and
budgetary constraints. These may conflict with end-user
requirements and, after delivery; new features may have
to be added for user support if the system is to meet its
goals.
3. Large systems usually have a diverse user community,
with many users having different requirements and
priorities that may be conflicting or contradictory. The
final system requirements are inevitably a compromise
between them and, with experience, it is often discovered
that the balance of support given to different users has
to be changed.
Requirements management planning
This activity establishes the level of requirements management
detail that is required. It is essential that Requirements
management decisions need to be taken for the following
purposes:
1. Requirements identification- Each requirement must be
uniquely identified so that it can be cross-referenced
with other requirements.
2. A change management process -This is the set of
activities that assess the impact and cost of changes. I
discuss this process in more detail in the following
section.
3. Traceability policies- These policies define the
relationships between each requirement and between
the requirements and the system design that should be
recorded.
Page 36
4. Tool support- Tools that may be used range from
specialist requirements management systems to
spreadsheets and simple database systems.
Page 37
Module 2 :System
Models
Introduction
The aim of this Session is to introduce system modeling
concepts that may be developed as part of the requirements
engineering and system design processes.
At the end of the session, the students will:
1. Understand What is Modelling
2. Justify why Modeling is required before building a
software system
3. Appreciate fundamental system modeling perspectives of
context, interaction, structure, and behavior
4. Be aware of the ideas underlying model-driven
engineering, Difference between structural and
behavioral models
✔ Software Systems are abstract and intangible and hence
tend to be complex
✔ A Model represents essential characteristics of a complex
system
✔ System modeling is the process of developing (abstract)
models of a system, with each model presenting a view of
that system
✔ A system model represents aspects of a system and its
environment
✔ Modeling Helps Understand Information systems
What is a Model
A Model is a simplified representation of either reality or
vision. Since “a picture is worth a thousand words,” most
models use pictures to represent the reality or vision. Usually,
the system model becomes the blueprint for designing and
constructing an improved system.
A Model is a simplified representation of a complex system
Page 38
System Modeling
System modeling is the process of developing abstract models
of a system, with each model presenting a different view or
perspective of that system.
Since “a picture is worth a thousand words,” most models use
some kind of graphical notation representing a system, which
is now almost always based on notations in the Unified
Modeling Language (UML).
Model-driven analysis is a problem-solving approach that
emphasizes the drawing of graphical or pictorial system
models to document and validate both existing and/or
proposed system.
Benefits of System Modeling
1. Ease project management tasks.
2. Can provide complete views of a system, as well as
detailed views of subsystems.
3. Clarify structures and relationships.
4. Offer a communication framework for ideas within and
between teams.
5. Can generate new ideas and possibilities.
6. Allow quality assurance and testing scenarios to be
generated.
7. Are platform independent.
Why Modeling
Modeling is required to
1. Understand the existing software application to do any
enhancement
2. Derive the requirements for a New software application
3. Discuss Different Design proposals to optimize the
solution architecture
4. Document a Software Systems Structure and Operations
to create Manuals
5. To Create Test Cases early in the Software Development
Life Cycle
Page 39
6. Modeling is used to
i.
Conceptualize, ii.
Page 40
How to represent a Model
1. System Models are Usually represented graphically and
so are the software system Models.
2. Graphical models are very popular because they are
easy to understand and construct.
3. The Unified Modeling Language (UML) provides a
standard for the artifacts of development (semantic
models, syntactic notation, and diagrams
4. UML is a general-purpose, developmental, modeling
language in the field of software engineering, that is
intended to provide a standard way to visualize the
design of a system.
5. The creation of UML was originally developed by Grady
Booch, Ivar Jacobson and James Rumbaugh at Rational
Software in 1996.
6. In 2005 UML was also published by the International
Organization for Standardization (ISO) as an approved
ISO standard.
7. The UML standard is being periodically revised
Page 41
Universal Modeling Language
In building a visual model of a system, many different
diagrams are needed to represent different views of the
system. The UML provides a rich notation for visualizing our
models. This includes the following key diagrams:
1. Use Case diagrams to illustrate user interactions with
the system.
2. Class diagrams to illustrate logical structure.
3. Object diagrams to illustrate objects and links.
4. State diagrams to illustrate behavior.
5. Component diagrams to illustrate physical structure of
the software.
6. Deployment diagrams to show the mapping of software
to hardware configurations.
7. Interaction diagrams (i.e., collaboration and sequence
diagrams) to illustrate behavior.
8. Activity diagrams to illustrate the flow of events in a use
case.
Page 42
Fig 1.3 : UML Diagrams at different stages
of SDLC
Context Models
• A context model is a model that shows how a system fit
into the context of the environment.
• Shows the scope and boundaries of a system at a glance
including the other systems that interface with it
• No technical knowledge is assumed or required to
understand the diagram
• Easy to draw and amend due to its limited notation
• Easy to expand by adding related systems
Page 43
• Can benefit a wide audience including stakeholders,
business analyst, data analysts, developers
• Context models provide an overview (abstraction) of an
entire system, and shows the most important aspects.
• Details are not included.
• Context models are most useful in the requirements
analysis and design stages.
• A context model is a model that shows how a system fit
into the context of the environment.
• Context models provide an overview (abstraction) of an
entire system, and shows the most important aspects.
• Details are not included.
• Context models are most useful in the requirements
analysis and design stages.
Process Models
• Context models simply show the other systems in the
environment, NOT how the system being developed is
used in that environment.
• Process models reveal how the system being developed is
used in broader business processes.
• UML activity diagrams may be used to define business
process models.
Page 44
Activity Diagrams
Activity diagrams are intended to show the activities
that make up a system process and the flow of control
from one activity to another.
▪ The start of a process is indicated by a filled circle;
the end by a filled circle inside another circle.
▪ Rectangles with round corners represent activities,
which are subprocesses that must be carried out.
▪ A solid bar is used to indicate activity
coordination.
When the flow from more than one activity leads to a solid bar
then all of these activities must be complete before progress is
possible.
When the flow from a solid bar leads to a number of activities,
these may be executed in parallel. Arrows may be annotated
with guards that indicate the condition when that flow is
taken.
Page 45
Interaction Models
• Interaction Models help to identify user requirements.
• Interaction Modeling helps to understand the
communication process between system-to-system
interaction
• Modeling system interaction helps us understand and
improve the system performance and dependability.
• Use case diagrams and sequence diagrams may be used
for interaction modelling.
Use Case Modeling
Page 46
• Modelling the actors helps to define a system by
identifying the objects within the system and those on its
boundary
• An actor is directly connected to the system
• An indirectly connected object is not an actor and
should not be included as part of the system model
• Any interaction with an indirectly connected object must
pass through actors Examples
• Customer and Repair Technician are actors of a vending
machine
• Traveler, Agent and Airline are actors of a travel agency
system
• User and Administrator are actors for a computer
database system
• Actors can be persons, devices and other systems
(anything that interacts directly with the system)
• the Dispatcher of repair technicians from a service
bureau is not an actor of a vending machine
lines
connect
use
Page 47
cases
to participating actors
Sequence Models
Sequence models show the sequence of object
interactions that take place between the actors and the
objects within a system
Sequence diagrams are part of the UML and are used
to represent the sequence model.
• The objects and actors involved are listed along the top
of the diagram, with a dotted line drawn vertically from
these.
• Time is represented vertically so models are read top to
bottom
• Interactions are represented by labelled arrows, Different
styles of arrow represent different types of interaction
• A thin rectangle in an object lifeline represents the time
when the object is the controlling object in the system
Drawing Sequence Diagrams
i. Determine the context of the sequence diagram ii.
Identify the object that are participate in the
sequence iii. Set of the lifeline for each object iv. Lay
out of messages from the top to the bottom of the
diagram based on the order in which they sent
v. Add the execution occurrence
to each object‟s lifeline vi. Validate the
sequence diagram
Sequence Diagram of a Patient Information System
Page 48
Structural Models
Structural models show the organization of a system
in terms of the components that make up that system and
their relationships. Structural models may be
• Static models, which show the structure of the
system design, or
• Dynamic models, which show the organization of
the system when it is executing.
Structural models are created during discussion and
designing the system architecture
Class Diagrams
Class diagrams are used when developing an object-oriented
system model to show the classes in a system and the
associations between these classes.
An object class can be thought of as a general definition of one
kind of system object. An association is a link between classes
that indicates that there is some relationship between these
classes.
Page 49
When you are developing models during the early stages of the
software engineering process, objects represent something in
the real world, such as a patient, a prescription, doctor, etc.
UML Classes and Associations
Generalizations
Complexity is managed by Generalization Technique.
Instead of detailed characteristics of every event that
we experience, we generalise these experiences into general
classes (animals, cars, houses, etc.) and learn the
characteristics of these classes.
As different members of these classes have some
common characteristics (e.g. squirrels and rats are
rodents), it will be easier to understand (and design) similar
events by co-relating the events and rebuilding the
scenario.
In modeling systems, one of the common technique is
to identify the features of classes with scope for
generalization. If changes are proposed, then there will be
no need to look at all classes in the system to see if they are
Page 50
affected by the change. In object-oriented languages, such
as Java, generalization is implemented using the class
inheritance mechanisms built into the language.
In a generalization, the attributes and operations
associated with higher-level classes are also associated with
the lower-level classes.
The lower-level classes are subclasses and inherit the
attributes and operations from their superclasses. These
lower-level classes then add more specific attributes and
operations.
A Generalization Heirarchy
Page 51
Object Class Aggregation Models
Behavioral Models
Behavioral models are models of the dynamic behavior of a
system as it is executing. They show what happens or what
is supposed to happen when a system responds to a
stimulus from its environment.
These stimuli may be of two types:
i. Data Some data arrives that has to be processed by
the system, (Data Driven) ii. Events Some event happens
that triggers system processing. Events may have
associated data, although this is not always the case.
(Event Driven)
Data Driven Modeling
Many business systems are data-processing systems that
are primarily driven by data. They are controlled by the
data input to the system, with relatively little external event
processing.
Data-driven models show the sequence of actions
involved in processing input data and generating an
associated output.
They are particularly useful during the analysis of
requirements as they can be used to show end-to-end
processing in a system.
Page 52
Data Flow Modeling
Data-flow models are used to show how data flows
through a sequence of processing steps. For example, a
processing step could be to filter duplicate records in a
customer database.
The data is transformed at each step before moving on
to the next stage.
These processing steps or transformations represent
software processes or functions when data-flow diagrams
are used to document a software design.
They are simple and intuitive
Page 53
Fig Order Processing Sequence Diagram
Event-driven Modeling
Real-time systems are often event-driven, with
minimal data processing. For example, a landline phone
switching system responds to events such as „receiver off
hook‟ by generating a dial tone.
Event-driven modeling shows how a system responds to external
and internal events.
It is based on the assumption that a system has a
finite number of states and that events (stimuli) may cause
a transition from one state to another.
Page 54
Microwave Oven Operation
Page 55
Waiting The oven is waiting for input. The display shows the current time.
Half power The oven power is set to 300 watts. The display shows „Half power‟.
Full power The oven power is set to 600 watts. The display shows „Full power‟.
Set time The cooking time is set to the user‟s input value. The display shows
the cooking time selected and is updated as the time is set.
Disabled Oven operation is disabled for safety. Interior oven light is on.
Display shows „Not ready‟.
Enabled Oven operation is enabled. Interior oven light is off. Display shows
„Ready to cook‟.
Operation Oven in operation. Interior oven light is on. Display shows the timer
countdown. On completion of cooking, the buzzer is sounded for five
seconds. Oven light is on.
Display shows „Cooking complete‟ while buzzer is sounding.
Model-driven Engineering
Model-driven engineering (MDE) is an approach to software
development where models rather than programs are the
principal outputs of the development process. The
programs that execute on a hardware/software platform
are then generated automatically from the models.
Proponents of MDE argue that this raises the level of
abstraction in software engineering so that engineers no
longer have to be concerned with programming language
details or the specifics of execution platforms.
Model Driven Architecture
Model-driven engineering is still at an early stage of
development, and it is unclear whether or not it will have a
significant effect on software engineering practice. Pros
▪ Allows systems to be considered at higher levels of
abstraction
▪ Generating code automatically means that it is
cheaper to adapt systems to new platforms.
Cons
Page 56
▪ Models for abstraction and not necessarily right for
implementation.
▪ Savings from generating code may be outweighed by
the costs of developing translators for new platforms.
Types of Models
A computation independent model (CIM)
These model the important domain abstractions
used in a system. CIMs are sometimes called domain
models.
A platform independent model (PIM)
These model the operation of the system without
reference to its implementation. The PIM is usually
described using UML models that show the static
system structure and how it responds to external and
internal events.
Platform specific models (PSM)
These are transformations of the platform-independent
model with a separate PSM for each application platform. In
principle, there may be layers of PSM, with each layer
adding some platform-specific detail.
MDA Transformations
Page 57
MDA Platform Specific Models
Page 58
Domain models that identify the principal concerns
in a system. They are defined using UML class
diagrams and include objects, attributes and
associations.
Class models in which classes are defined, along
with their attributes and operations.
State models in which a state diagram is
associated with each class and is used to describe the
life cycle of the class.
The dynamic behavior of the system may be specified
declaratively using the object constraint language (OCL), or
may be expressed using UML‟s action language.
Page 59
Rational Unified Process (RUP)
The Rational Unified Process (RUP) (Krutchen, 2003) is an
adaptable process model that has been derived from work on
the UML and the associated Unified Software Development
Process.
It brings together elements from all of the generic software
development process models RUP enforces good practice in
specification and design and supports prototyping and
incremental delivery.
The RUP recognizes that conventional process models present
a single view of the process. In contrast, the RUP is normally
described from three perspectives:
1. A dynamic perspective, which shows the phases of the
model over time.
2. A static perspective, which shows the process activities
that are enacted.
3. A practice perspective, which suggests good practices to
be used during the process.
Most descriptions of the RUP attempt to combine the static
and dynamic perspectives in a single diagram. I think that
makes the process harder to understand, so I use separate
descriptions of each of these perspectives.
Dynamic perspective
The RUP is a phased model that identifies four discrete phases
in the software process. However, unlike the waterfall model
where phases are equated with process activities, the phases
in the RUP are more closely related to business rather than
technical concerns.
Page 60
It is a software engineering process, aimed at guiding software
development organizations in their endeavors to develop
effective software efficiently
The practice perspective on the RUP describes good software
engineering practices that are recommended for use in
systems development. Six fundamental best practices are
recommended:
1. Develop software iteratively : Plan increments of the
system based on customer priorities and develop the
highest priority system features early in the development
process.
2. Manage requirements : Explicitly document the
customer‟s requirements and keep track of changes to
these requirements. Analyse the impact of changes on
the system before accepting them.
3. Use component-based architectures : Structure the
system architecture into components, as discussed
earlier in this chapter.
4. Visually model software : Use graphical UML models to
present static and dynamic views of the software.
5. Verify software quality. : Ensure that the software
meets the organizational quality standards.
6. Control changes to software. : Manage changes to the
software using a change management system and
configuration management procedures and tools.
Page 61
The RUP may not be a suitable process for all types of
development e.g. embedded software development. However,
it does represent an approach that potentially combines the
three generic process models discussed in section 2.1. The
most important innovations in the RUP are the separation
of phases and workflows, and the
recognition that deploying software in a user‟s environment
is part of the process. Phases are dynamic and have goals.
Workflows are static and are technical activities that are not
associated with a single phase but may be used throughout
the development to achieve the goals of each phase.
Page 62
configuration features of that system to deliver the system
requirements.
System Context And Interactions
Understanding the relationships between the software that
is being designed and its external environment is essential
for deciding how to provide the required system
functionality and how to structure the system to
communicate with its environment. Understanding of the
context also lets the developer establish the boundaries of
the system. Setting the system boundaries helps designor
decide what features are implemented in the system being
designed and what features are in other associated
systems.
Context and Interaction Models
A system context model is a structural model that
demonstrates the other systems in the environment of the
system being developed.
An interaction model is a dynamic model that shows
how the system interacts with its environment as it is used.
Architectural Design
Once interactions between the system and its
environment have been understood, we use this information
for designing the system architecture.
we identify the major components that make up the system
and their interactions, and then may organize the
components using an architectural pattern such as a
layered or client-server model.
The weather station is composed of independent
subsystems that communicate by broadcasting messages
on a common infrastructure.
Page 63
The Object Model
A general view of program structure shared by
UML and object-oriented programming
languages like Java and C++ Computation takes
place in objects that:
store data and
implement behaviour
are linked together
in a network
communicate by
sending messages
are described by
classes
Object Oriented Design Process
There are a variety of different object-oriented design
processes that depend on the organization using the
process.
Common activities in these
processes include: Define the
context and modes of use of
the system;
Page 64
Design the system architecture;
Identify the principal system objects;
Develop design models;
Specify object interfaces.
Process illustrated here using a design for a wilderness
weather station.
Approaches to Object Identification
Use a grammatical approach based on a natural
language description of the system (used in Hood OOD
method).
Base the identification on tangible things in the
application domain.
Use a behavioural approach and identify objects based
on what participates in what behaviour.
Use a scenario-based analysis. The objects, attributes
and methods in each scenario are identified.
Examples of Design Models
Sequence models that show the sequence of object
interactions.
State machine models that show how individual
objects change their state in response to events.
Other models include use-case models, aggregation
models, generalization models, etc.
Sub-system models show logical
groupings of objects into coherent
subsystems.
how the design is organized into logically related
groups of objects.
In the UML, these are shown using packages - an
encapsulation construct. This is a logical model. The actual
organization of objects in the system may be different.
Page 65
Design Models and Code
UML is based on the same object model as
object-oriented programming languages
Page 66
Collect weather information
from instruments at regular
intervals
Transmit this information, on
request, to the weather
information system over the
satellite link
Store information if
communications are not
available
Monitor external conditions
and shut down power
generation/instruments if
threat of
Page 67
Weather Station Class Models
WeatherS WeatherData
tation
identifier airTemperatures
groundTemperature
reportWeather s windSpeeds
() windDirections
calibrate pressures rainfall
(instruments)
test ()
startup collect ()
(instruments) summarise ()
shutdown
(instruments)
Page 68
Weather Station Subsystems
Design Patterns
A design pattern is a way of reusing abstract
knowledge about a problem and its solution.
A pattern is a description of the problem and the
essence of its solution.
It should be sufficiently abstract to be reused in
different settings.
Pattern descriptions usually make use of
object-oriented characteristics such as inheritance and
polymorphism.
A design pattern is a descriptions of communicating
objects and classes that are customized to solve a general
design problem in a particular context
Design patterns represent the best practices used by
experienced object-oriented software developers.
Design patterns are solutions to general problems that
software developers faced during software development.
Page 69
These solutions were obtained by trial and error by
numerous software developers over quite a substantial
period of time.
Design patterns are optimized, reusable solutions to
the programming problems that we encounter every day.
A design pattern is not a class or a library that we can
simply plug into our system; It is a template that has to be
implemented in the correct situation.
It's not language-specific.
A good design pattern should be implementable in
most programming languages, depending on the
capabilities of the language.
Any design pattern when correctly implemented , it can be a
Great Solution, However, if implemented in the wrong place,
it can be disastrous and create many problems.
Benefits of patterns
Design reuse
Uniform design vocabulary
Enhance understanding, restructuring, & team
communication
Basis for automation
Transcends language-centric biases/myopia
Abstracts away from many unimportant details
Patterns, Architectures and Frameworks
There can be confusion between patterns,
architectures and frameworks.
Let‟s try to distinguish them:
Architectures model software structure at the highest
possible level, and give the overall system view. An
architecture can use many different patterns in different
components
Page 70
Patterns are more like small-scale or local
architectures for architectural components or
sub-components
Frameworks are partially completed software systems that
may be targeted at a particular type of application. These
are tailored by completing the unfinished components.
Pattern Elements
Name : A meaningful pattern identifier.
Problem description : Explains the problem and its
context
Solution description : Not a concrete design but a
template for a design solution that can be instantiated in
different ways.
Consequences : The results and trade-offs of applying
the pattern
Page 71
Creational Design Patterns
Page 72
When an application wants to have one and only one instance
of any class per JVM, in all possible scenarios without any
exceptional condition.
Factory
This is most suitable where there is some complex object
creation steps are involved. To ensure that these steps are
centralized and not exposed to composing classes, factory
pattern should be used.
Abstract factory
Whenever you need another level of abstraction over a group of
factories, you should consider using abstract factory pattern.
Structural Design Patterns
These design patterns show you how to glue different pieces of
a system together in a flexible and extensible fashion.
Structural patterns help you guarantee that when one of the
parts changes, the entire structure does not need to change.
Adapter
Convert the interface of a class into another interface clients
expect. Adapter lets classes work together that couldn‟t
otherwise because of incompatible interfaces.
Decorator
This is used to add additional features or behaviors to a
particular instance of a class, while not modifying the other
instances of same class.
Behavioral Design Patterns
A behavioral pattern abstracts an action you want to take from
the object or class that takes the action. By changing the object
or class, you can change the algorithm used, the objects
affected, or the behavior, while still retaining the same basic
interface for client classes.
Command
Command pattern is a behavioral design pattern which is
useful to abstract business logic into discrete actions which we
Page 73
call commands. This command object helps in loose coupling
between two classes where one class (invoker) shall call a
method on other class (receiver) to perform a business
operation.
Visitor
When you want a hierarchy of objects to modify their behavior
but without modifying their source code.
Memento
Memento design pattern provides ability to capture(save) an
object‟s state and then restore back this captured state when
required by the system.
State
State Design Pattern allows the behavior of an object to vary
based on its state. I.e.
whenever the object‟s state changes, its behavior changes as
per its new state. To the observer it appears as if the object has
changed its class.
Page 74
Some general guidelines for using design patterns are :
Is there a pattern that addresses my problem?
Does the pattern provide an acceptable solution?
Is there a simpler solution? (pattern overuse)
Is the context of the pattern consistent with my
problem?
Are the consequences of using the pattern
acceptable?
Are there forces in my environment that conflict with
the use of the pattern?
Software Implementation
Software Implementation is often the most important
step in the software process cycle. Some of the issues of
implementation are
Reuse Most modern software is constructed by reusing
existing components or systems. When you are
developing software, you should make as much use as
possible of existing code.
Configuration management During the development
process, you have to keep track of the many different
versions of each software component in a configuration
management system.
Host-target development Production software does not
usually execute on the same computer as the software
development environment. Rather, you develop it on one
computer (the host system) and execute it on a separate
computer (the target system).
Software Reuse
From the 1960s to the 1990s, most new software was
developed from scratch, by writing all code in a high-level
programming language.
The only significant reuse or software was the reuse
of functions and objects in programming language
libraries.
Page 75
Costs and schedule pressure mean that this approach
became increasingly unviable, especially for commercial
and Internet-based systems.
An approach to development based around the reuse of
existing software emerged and is now generally used for
business and scientific software.
Reuse Level
The abstraction level : At this level, you don‟t reuse
software directly but use knowledge of successful
abstractions in the design of your software.
The object level : At this level, you directly reuse objects
from a library rather than writing the code yourself.
The component level : Components are collections of
objects and object classes that you reuse in application
systems.
The system level : At this level, you reuse entire
application systems
Reuse Costs
The costs of the time spent in looking for software to
reuse and assessing whether or not it meets your needs.
Where applicable, the costs of buying the reusable
software. For large off-the-shelf systems, these costs can be
very high.
The costs of adapting and configuring the reusable
software components or systems to reflect the requirements
of the system that you are developing.
The costs of integrating reusable software elements
with each other (if you are using software from different
sources) and with the new code that you have developed.
Configuration Management
Configuration management is the name given to the
general process of managing a changing software system.
Page 76
The aim of configuration management is to support the
system integration process so that all developers can access
the project code and documents in a controlled way, find
out what changes have been made, and compile and link
components to create a system.
Version management : Versioning is the
mechanism to manage systems changes Complex
systems developed, installed, and maintained in series
of versions to simplify testing and support
Alpha version – incomplete testing version
Beta version – end-user testing version
Production release version – formally distributed to users or made
operational
Maintenance release – bug fixes, small changes
where support is provided to keep track of the
different versions of software components. Version
management systems include facilities to
coordinate development by several programmers.
System integration, where support is provided to help
developers define what versions of components are used to
create each version of a system. This description is then
used to build a system automatically by compiling and
linking the required components.
Problem tracking, where support is provided to allow users
to report bugs and other problems, and to allow all
developers to see who is working on these problems and
when they are fixed.
Host Target Development
Most software is developed on one computer (the host),
but runs on a separate machine (the target).
More generally, we can talk about a development platform
and an execution platform. A platform is more than just
hardware. It includes the installed operating system plus
Page 77
other supporting software such as a database management
system or, for development platforms, an interactive
development environment.
Development platform usually has different installed
software than execution platform; these platforms may have
different architectures.
Development Platform Tools
Some of the development platform tools are,
An integrated compiler and syntax-directed editing
system that allows you to create, edit and compile code.
A language debugging system.
Graphical editing tools, such as tools to edit UML
models.
Testing tools, such as Junit that can automatically run
a set of tests on a new version of a program.
Project support tools that help you organize the code
for different development projects.
Software development tools are often grouped to create
an integrated development environment (IDE).
An IDE is a set of software tools that supports different
aspects of software development, within some common
framework and user interface.
IDEs are created to support development in a specific
programming language such as Java. The language IDE
may be developed specially, or may be an instantiation of a
general-purpose IDE, with specific language-support tools
Deployment Factors
If a component is designed for a specific hardware
architecture, or relies on some other software system, it
must obviously be deployed on a platform that provides the
required hardware and software support.
High availability systems may require components to
be deployed on more than one platform. This means that, in
Page 78
the event of platform failure, an alternative implementation
of the component is available.
If there is a high level of communications traffic
between components, it usually makes sense to deploy
them on the same platform or on platforms that are
physically close to one other. This reduces the delay
between the time a message is sent by one component and
received by another
Open Source Development
If a component is designed for a specific hardware
architecture, or relies on some other software system, it
must obviously be deployed on a platform that provides the
required hardware and software support.
High availability systems may require components to
be deployed on more than one platform. This means that, in
the event of platform failure, an alternative implementation
of the component is available.
If there is a high level of communications traffic
between components, it usually makes sense to deploy
them on the same platform or on platforms that are
physically close to one other. This reduces the delay
between the time a message is sent by one component and
received by another
The best-known open source product is, of course, the
Linux operating system which is widely used as a server
system and, increasingly, as a desktop environment. Other
important open source products are Java, the Apache web
server and the mySQL database management system
Open Source Issues
Should the product that is being developed make use
of open source components?
Should an open source approach be used for the
software‟s development?
Page 79
More and more product companies are using an open
source approach to development.
Their business model is not reliant on selling a
software product but on selling support for that product.
They believe that involving the open source community
will allow software to be developed more cheaply, more
quickly and will create a community of users for the
software.
Open Source Licensing
A fundamental principle of open-source development is
that source code should be freely available, this does not
mean that anyone can do as they wish with that code.
Legally, the developer of the code (either a company or an
individual) still owns the code. They can place restrictions
on how it is used by including legally binding conditions in
an open source software license.
Some open source developers believe that if an open
source component is used to develop a new system, then
that system should also be open source.
Others are willing to allow their code to be used
without this restriction. The developed systems may be
proprietary and sold as closed source systems.
The GNU General Public License (GPL). This is a
so-called „reciprocal‟ license that means that if you use
open source software that is licensed under the GPL
license, then you must make that software open source.
The GNU Lesser General Public License (LGPL) is a
variant of the GPL license where you can write components
that link to open source code without having to publish the
source of these components.
The Berkley Standard Distribution (BSD) License. This
is a non-reciprocal license, which means you are not
Page 80
obliged to re-publish any changes or modifications made to
open source code. You can include the code in proprietary
systems that are sold.
License Management
• Establish a system for maintaining information about
open-source components that are downloaded and used.
• Be aware of the different types of licenses and
understand how a component is licensed before it is
used.
• Be aware of evolution pathways for components.
• Educate people about open source.
• Have auditing systems in place.
• Participate in the open source community.
Implementation Process
The process of software implementation consists of the
following steps
1. Acquisition
2. Development
3. Testing
4. Documentation
5. Software versioning
6. Data porting and conversion
7. System deployment
8. Training
9. Maintenance
Page 81
Quality assurance is the process of Process of ensuring
information system meets minimum quality standards as
Determined by users, implementation staff, and
management. It also involves Identification of gaps or
inconsistencies in system requirements. QA integrated into
project throughout SDLC and the Cost of fixing errors rise
as project progresses
Page 82
User feedback during normal system operation
Reuse of existing databases
Reloading database contents
Creating new databases
Installation
After development and testing, system must be put into
operation. New system can be installed and quickly made
operational, However, in case of enhancement or defect
removal, the following points need to be taken care of
Overlapping systems turned off
Both systems concurrent for brief time
Advantage – simplicity and fewer logistics issues to
manage
Disadvantage – risk due to no backup
Important planning considerations include
Costs of operating both systems in parallel,
Detecting and correcting errors in new system,
Potentially disrupting the company and IS
operations
Training personnel and customers with new
procedures
System Documentation
One of the most important aspect of the project is
documentation. In fact, the success of a project depends
entirely on the quality of documentation. The documentation
should cover but not limited to
Descriptions of system functions, architecture, and
construction details
User manuals for maintenance personnel and future
developers
Source code, Analysis and design models, Operational
details (System Manual) as applicable
Page 83
Failure to maintain system documentation
compromises value of a system
User Documentation
Special attention should be paid for user
documentation which will be used by Used by end users
and system operators. It should include the details about
Page 84
Module 3: Agile Software Development
The Agile Manifesto: Values and
Principles
Module – 3
Chapter 1: Software Testing
Introduction:-
• Testing is intended to show that a program does what it is intended to
do and to discover program defects before it is put into use.
• The testing process has two distinct goals:
1. To demonstrate to the developer and the customer that the software
meets its requirements.
For custom software, this means that there should be at least one
test for every requirement in the requirements document.
For generic software products, it means that there should be tests
for all of the system features, plus combinations of these features,
that will be incorporated in the product release.
2. To discover situations in which the behavior of the software is
incorrect, undesirable, or does not conform to its specification. Defect
testing is concerned with rooting out undesirable system behavior
such as system crashes, unwanted interactions with other systems,
incorrect computations, and data corruption.
The diagram shown in Figure 3.1 explains the differences between
validation testing and defect testing. Think of the system being tested as a
black box. The system accepts inputs from some input set I and generates
outputs in an output set O. Some of the outputs will be erroneous. These are
the outputs in set Oe that are generated by the system in response to inputs
Page 85
in the set Ie. The priority in defect testing is to find those inputs in the set Ie
because these reveal problems with the system. Validation testing involves
testing with correct inputs that are outside Ie. These stimulate the system to
generate the expected correct outputs.
3.1 Development
Testing
• Development testing includes all testing activities that are carried out by
the team developing the system.
• During development, testing may be carried out at three levels of
granularity:
1. Unit testing, where individual program units or object classes are
tested. Unit testing should focus on testing the functionality of objects
or methods.
2. Component testing, where several individual units are integrated to
create composite components. Component testing should focus on
testing component interfaces.
3. System testing, where some or all of the components in a system are
integrated and the system is tested as a whole. System testing should
focus on testing component interactions.
• Development testing is primarily a defect testing process, where
the aim of testing is to discover bugs in the software. It is therefore
Page 86
usually interleaved with debugging— the process of locating problems
with the code and changing the program to fix these problems.
Page 87
• To test the states of the weather station, we use a state model. Using
this model, you can identify sequences of state transitions that have to
be tested and define event sequences to force these transitions.
• In principle, you should test every possible state transition sequence,
although in practice this may be too expensive.
• Examples of state sequences that should be tested in the weather
station include: o Shutdown _ Running _ Shutdown o Configuring _
Running _ Testing _ Transmitting _ Running o Running _ Collecting _
Running _ Summarizing _ Transmitting _ Running
Automated Testing
• Whenever possible, unit testing should be automated so that tests are
run and checked without manual intervention.
• In automated unit testing, you make use of a test automation
framework (such as JUnit) to write and run your program tests.
• Unit testing frameworks provide generic test classes that you extend to
create specific test cases. They can then run all of the tests that you
have implemented and report, often through some GUI, on the success
of otherwise of the tests.
• An automated test has three parts:
1. A setup part, where you initialize the system with the test case,
namely the inputs and expected outputs.
2. A call part, where you call the object or method to be tested.
3. An assertion part where you compare the result of the call with
the expected result. If the assertion evaluates to true, the test has
been successful; if false,then it has failed.
Page 88
o The first of these should reflect normal operation of a program
and should show that the component works as expected.
o The other kind of test case should be based on testing experience
of where common problems arise. It should use abnormal inputs
to check that these are properly processed and do not crash the
component.
• The Two possible strategies here that can be effective in helping you
choose test cases. These are:
1. Partition testing, where you identify groups of inputs that have
common characteristics and should be processed in the same way.
You should choose tests from within each of these groups.
2. Guideline-based testing, where you use testing guidelines to
choose test cases. These guidelines reflect previous experience of
the kinds of errors that programmers often make when developing
components.
Equivalence-Class Partitioning
• The input data and output results of a program often fall into a number
of different classes with common characteristics.
• Examples of these classes are positive numbers, negative numbers, and
menu selections.
• Programs normally behave in a comparable way for all members of a
class. That is, if you test a program that does a computation and
requires two positive numbers, then you would expect the program to
behave in the same way for all positive numbers.
• Because of this equivalent behavior, these classes are sometimes called
equivalence partitions or domains (Bezier, 1990).
• In Figure 3.2, the large shaded ellipse on the left represents the set of
all possible inputs to the program that is being tested.
• The smaller unshaded ellipses represent equivalence partitions.
Page 89
Fig 3.2:
Equivalence
Partitioning
• A program being tested should process all of the members of an input
equivalence partitions in the same way.
• Output equivalence partitions are partitions within which all of the
outputs have something in common.
• The shaded area in the left ellipse represents inputs that are invalid.
The shaded area in the right ellipse represents exceptions that may
occur (i.e., responses to invalid inputs).
• Once you have identified a set of partitions, you choose test cases from
each of these partitions.
• A good rule of thumb for test case selection is to choose test cases on
the boundaries of the partitions, plus cases close to the midpoint of the
partition. The reason for this is that designers and programmers tend
to consider typical values of inputs when developing a system.
• For example, say a program specification states that the program
accepts 4 to 8 inputs which are five-digit integers greater than 10,000.
You use this information to identify the input partitions and possible
test input values. These are shown in Figure 3.3
Page 90
Fig 3.3: Equivalence
Partitions
Testing Guidelines (Sequences)
• Test software with sequences which have only a single value.
• Use sequences of different sizes in different tests.
• Derive tests so that the first, middle and last elements of the
sequence are accessed.
• Test with sequences of zero length. General Testing Guidelines:-
• Choose inputs that force the system to generate all error
messages
• Design inputs that cause input buffers to overflow
• Repeat the same input or series of inputs numerous times
• Force invalid outputs to be generated
• Force computation results to be too large or too small.
Page 91
✧ Testing composite components should therefore focus on showing that
the component interface behaves according to its specification.
▪ You can assume that unit tests on the individual objects within
the component have been completed.
✧ Figure 3.4 illustrates the idea of component interface testing. Assume
that components A, B, and C have been integrated to create a larger
component or subsystem.
Interface Types:
There are different types of interface between program components and,
consequently, different types of interface error that can occur:
1. Parameter interfaces: These are interfaces in which data or
sometimes function references are passed from one component to another.
Methods in an object have a parameter interface.
Page 92
2. Shared memory interfaces: These are interfaces in which a block of
memory is shared between components. Data is placed in the memory by
one subsystem and retrieved from there by other sub-systems. This type of
interface is often used in embedded systems, where sensors create data that
is retrieved and processed by other system components.
3. Procedural interfaces: These are interfaces in which one component
encapsulates a set of procedures that can be called by other components.
Objects and reusable components have this form of interface.
4. Message passing interfaces These are interfaces in which one
component requests a service from another component by passing a
message to it. A return message includes the results of executing the
service. Some object-oriented systems have this form of interface, as do
client–server systems.
Interface errors:
These errors fall into three classes:
1. Interface misuse:-A calling component calls some other component
and makes an error in the use of its interface. This type of error is
common with parameter interfaces where parameters may be of the
wrong type or be passed in the wrong order, or the wrong number of
parameters may be passed.
2. Interface misunderstanding: - A calling component misunderstands
the specification of the interface of the called component and makes
assumptions about its behavior. The called component does not
behave as expected which then causes unexpected behavior in the
calling component.
For example, a binary search method may be called with a parameter
that is an unordered array. The search would then fail.
3. Timing errors These occur in real-time systems that use a shared
memory or a message-passing interface. The producer of data and the
consumer of data may operate at different speeds. Unless particular
care is taken in the interface design, the consumer can access
Page 93
out-of-date information because the producer of the information has
not updated the shared interface information.
Page 94
2. Components developed by different team members or groups may be
integrated at this stage. System testing is a collective rather than an
individual process.
Page 95
SatComms:request _ WeatherStation:reportWeather _
Commslink:Get(summary) _ WeatherData:summarize
• The sequence diagram helps you design the specific test cases that you
need as it shows what inputs are required and what outputs are created:
1. An input of a request for a report should have an associated
acknowledgment. A report should ultimately be returned from the request.
During testing, you should create summarized data that can be used to
check that the report is correctly organized.
2. An input request for a report to WeatherStation results in a
summarized report being generated. You can test this in isolation by creating
raw data corresponding to the summary
Page 96
that you have prepared for the test of SatComms and checking that the
WeatherStation object correctly produces this summary. This raw data is
also used to test the WeatherData object.
• For most systems, it is difficult to know how much system testing is
essential and when you should to stop testing.
• Exhaustive testing, where every possible program execution
sequence is tested, is impossible. Testing, therefore, has to be based
on a subset of possible test cases.
For example:
1. All system functions that are accessed through menus should
be tested.
2. Combinations of functions (e.g., text formatting) that are
accessed through the same menu must be tested.
3. Where user input is provided, all functions must be tested with
both correct and incorrect input.
• Automated system testing is usually more difficult than automated
unit or component testing. Automated unit testing relies on predicting
the outputs then encoding these predictions in a program. The
prediction is then compared with the result.
Page 97
Fig 3.6: Test-Driven
Development
• The steps/activities in the process are as follows:
1. You start by identifying the increment of functionality that is required.
This should normally be small and implementable in a few lines of code.
2. You write a test for this functionality and implement this as an
automated test. This means that the test can be executed and will report
whether or not it has passed or failed.
3. You then run the test, along with all other tests that have been
implemented. Initially, you have not implemented the functionality so the
new test will fail. This is deliberate as it shows that the test adds something
to the test set.
4. You then implement the functionality and re-run the test. This may
involve refactoring existing code to improve it and add new code to what’s
already there.
5. Once all tests run successfully, you move on to implementing the next
chunk of functionality.
Page 98
• As the code is developed in very small increments, you have to be able
to run every test each time that you add functionality or refactor the
program. Therefore, the tests are embedded in a separate program
that runs the tests and invokes the system that is being tested.
• A strong argument for test-driven development is that it helps
programmers clarify their ideas of what a code segment is actually
supposed to do.
• For example, if your computation involves division, you should check
that you are not dividing the numbers by zero. If you forget to write a
test for this, then the code to check will never be included in the
program.
Page 99
involves running test sets that have successfully executed after
changes have been made to a system.
• The regression test checks that these changes have not introduced
new bugs into the system and that the new code interacts as expected
with the existing code.
• Regression testing is very expensive and often impractical when a
system is manually tested, as the costs in time and effort are very
high.
• Test-driven development is of most use in new software development
where the functionality is either implemented in new code or by using
well-tested standard libraries.
• Test-driven development has proved to be a successful approach for
small and medium-sized projects. Generally, programmers who have
adopted this approach are happy with it and find it a more productive
way to develop software (Jeffries and Melnik, 2007).
.
3.3 Release testing
• Release testing is the process of testing a particular release of a
system that is intended for use outside of the development team.
• Normally, the system release is for customers and users. In a complex
project, however, the release could be for other teams that are
developing related systems.
• For software products, the release could be for product management
who then prepare it for sale.
There are two important distinctions between release testing and
system testing during the development process:
1. A separate team that has not been involved in the system development
should be responsible for release testing.
2. System testing by the development team should focus on discovering
bugs in the system (defect testing). The objective of release testing is to
Page 100
check that the system meets its requirements and is good enough for
external use (validation testing).
• The primary goal of the release testing process is to convince the
supplier of the system that it is good enough for use. If so, it can be
released as a product or delivered to the customer.
• Release testing is usually a black-box testing process where tests
are derived from the system specification. The system is treated as
a black box whose behavior can only be determined by studying its
inputs and the related outputs. Another name for this is
‘functional testing’, so-called because the tester is only concerned
with functionality and not the implementation of the software.
Page 101
1. Set up a patient record with no known allergies. Prescribe medication
for allergies that are known to exist. Check that a warning message is not
issued by the system.
2. Set up a patient record with a known allergy. Prescribe the medication
to that the patient is allergic to, and check that the warning is issued by the
system.
3. Set up a patient record in which allergies to two or more drugs are
recorded. Prescribe both of these drugs separately and check that the
correct warning for each drug is issued.
4. Prescribe two drugs that the patient is allergic to. Check that two
warnings are correctly issued.
5. Prescribe a drug that issues a warning and overrule that warning.
Check that the system requires the user to provide information explaining
why the warning was overruled.
3.3.2 Scenario testing
• Scenario testing is an approach to release testing where you devise
typical scenarios of use and use these to develop test cases for the
system.
• A scenario is a story that describes one way in which the system
might be used.
• Scenarios should be realistic and real system users should be able to
relate to them.
• As an example of a possible scenario from the MHC-PMS, Figure 3.7
describes one way that the system may be used on a home visit.
Page 102
Fig 3.7: An usage
scenario for
MHC-PMS
It tests a number of features of the MHC-PMS:
1.Authentication by logging on to the system.
2.Downloading and uploading of specified patient records to a laptop.
3.Home visit scheduling.
4.Encryption and decryption of patient records on a mobile device.
5.Record retrieval and modification.
6.Links with the drugs database that maintains side-effect information.
7.The system for call prompting.
• If you are a release tester, you run through this scenario, playing the
role of Kate and observing how the system behaves in response to
different inputs.
• As ‘Kate’, you may make deliberate mistakes, such as inputting the
wrong key phrase to decode records. This checks the response of the
system to errors. You should carefully note any problems that arise,
including performance problems.
Page 103
• If a system is too slow, this will change the way that it is used. For
example, if it takes too long to encrypt a record, then users who are
short of time may skip this stage.
• If they then lose their laptop, an unauthorized person could then view
the patient records.
• When you use a scenario-based approach, you are normally testing
several requirements within the same scenario.
Page 104
exchange. The processes become slower and slower as they wait for
the required data from other processes.
• Stress testing helps you discover when the degradation begins so that
you can add checks to the system to reject transactions beyond this
point.
1. Alpha testing:-
• users and developers work together to test a system as it is
being developed. This means that the users can identify
problems and issues that are not readily apparent to the
development testing team.
• Developers can only really work from the requirements but
these often do not reflect other factors that affect the practical
use of the software
Page 105
• Alpha testing is often used when developing software products
that are sold as shrink-wrapped systems.
• It also reduces the risk that unanticipated changes to the
software will have disruptive effects on their business.
• Alpha testing may also be used when custom software is being
developed.
2. Beta testing:-
• takes place when an early, sometimes unfinished, release of a
software system is made available to customers and users for
evaluation.
• Beta testers may be a selected group of customers who are early
adopters of the system. Alternatively, the software may be made
publicly available for use by anyone who is interested in it.
• Beta testing is mostly used for software products that are used
in many different environments.
• Beta testing is therefore essential to discover interaction
problems between the software and features of the environment
where it is used.
3. Acceptance testing:-
• Is an inherent part of custom systems development. It takes
place after release testing.
• It involves a customer formally testing a system to decide
whether or not it should be accepted from the system developer.
Acceptance implies that payment should be made for the
system.
• There are six stages in the acceptance testing process, as
shown in Figure 3.8. They are:
Page 106
1. Define acceptance criteria This stage should, ideally, take
place early in the process before the contract for the system is
signed. The acceptance criteria should be part of the system
contract and be agreed between the customer and the developer.
In practice, however, it can be difficult to define criteria so early
in the process. Detailed requirements may not be available and
there may be significant requirements change during the
development process.
2. Plan acceptance testing This involves deciding on the
resources, time, and budget for acceptance testing and
establishing a testing schedule. The acceptance test plan should
also discuss the required coverage of the requirements and the
order in which system features are tested. It should define risks
to the testing process, such as system crashes and inadequate
performance, and discuss how these risks can be mitigated.
3. Derive acceptance tests Once acceptance criteria have been
established, tests have to be designed to check whether or not a
system is acceptable. Acceptance tests should aim to test both
the functional and non-functional characteristics (e.g.,
performance) of the system. They should, ideally, provide
complete coverage of the system requirements.
4. Run acceptance tests The agreed acceptance tests are
executed on the system. Ideally, this should take place in the
actual environment where the system will be used, but this may
be disruptive and impractical. Therefore, a user testing
environment may have to be set up to run these tests. It is
Page 107
difficult to automate this process as part of the acceptance tests
may involve testing the interactions between end-users and the
system. Some training of endusers may be required.
5. Negotiate test results It is very unlikely that all of the defined
acceptance tests will pass and that there will be no problems
with the system. If this is the case, then acceptance testing is
complete and the system can be handed over. More commonly,
some problems will be discovered. In such cases, the developer
and the customer have to negotiate to decide if the system is
good enough to be put into use. They must also agree on the
developer’s response to identified problems.
6. Reject/accept system This stage involves a meeting between
the developers and the customer to decide on whether or not the
system should be accepted. If the system is not good enough for
use, then further development is required to fix the identified
problems. Once complete, the acceptance testing phase is
repeated.
Page 108
Module 3
Chapter 2
Software Evolution
Introduction
Software development does not stop when a system is delivered but
continuesthroughout the lifetimeof the system. After a system has been deployed,
it inevitablyhas to change if it is to remain useful.
Causes of system change
Evolution processes
Change identification and evolution
process
System change proposals causes system evolution in all organizations.
Change proposals may come from
⮚ existing requirements that have not been implementedin the released
system
⮚ requests for new requirements
⮚ bug reports from system stakeholders
⮚ new ideas for software improvement from the system development team
The processes ofchange identification and system evolution are cyclic
andcontinue throughout the lifetime ofa system. This process is as shown in the
following figure
Continuing change
⮚ The first law states that system maintenance is an inevitable process.
⮚ As the system’s environment changes, new requirements emerge and the
system must be modified.
Increasing complexity
⮚ The second law states that, as a system is changed, its structure is degraded.
⮚ To avoid this, invest in preventative maintenance.
⮚ Time is spent improving the software structure without adding to its
functionality.
⮚ This means additional costs, more than those of implementing required system
changes. Large program evolution
⮚ It suggests that large systems have a dynamic of their own
⮚ This law is a consequence of structural factors that influence and constrain
system change, and organizational factors that affect the evolution process.
Structural factors:
⮚ These factors come from complexity of large systems.
⮚ As you change and extend a program, its structure tends to degrade.
⮚ Making large changes to a program may introduce new faults and then inhibit
further program changes.
Organisational factors:
Conservation of familiarity
⮚ Adding new functionality to a system inevitably introduces new system faults.
⮚ The more functionality added in each release, the more faults there will be.
⮚ Relatively little new functionality should be included in this release.
⮚ This law suggests that you should not budget for large functionality
increments in each release without taking into account the need for fault
repair.
Continuing growth
⮚ The functionality offered by systems has to continually increase user
satisfaction.
⮚ The users of software will become increasingly unhappy with it unless it is
maintained and new functionality is added to it.
Declining quality
The quality of systems will decline unless they are modified to reflect changes
in their operational environment.
Feedback system
Evolution processes must incorporate feedback systems to achieve significant
product improvement.
Software maintenance
⮚ It is the general process of changing a system after it has been delivered.
⮚ There are three different types of software maintenance:
o Fault repairs o
Environmental adaptations o
Functionality addition
Fault repairs
⮚ Coding errors are usually relatively cheap to correct
⮚ Design errors are more expensive as they may involve rewriting several
program components.
⮚ Requirements errors are the most expensive to repair because of the extensive
system redesign which may be necessary.
Environmental adaptation
⮚ This type of maintenance is required when some aspect of the system’s
environment such as the hardware, the platform operating system, or other
support software changes.
⮚ The application system must be modified to adapt it to cope with these
environmental changes.
Functionality addition
This type of maintenance is necessary when the system requirements change
in response to organizational or business change.
⮚ The above figure shows that overall lifetime costs may decrease as more effort
is expended during system development to produce a maintainable system.
⮚ In system 1, more development cost has resulted in lesser overall lifetime costs
when compared to system 2.
⮚ It is usually more expensive to add functionality after a system is in operation
than it is to implement the same functionality during development. The
reasons for this are:
1. Team stability
⮚ The new team or the individuals responsible for system maintenance are
usually not the same as the people involved in development
⮚ They do not understand the system or the background to system design
decisions.
⮚ They need to spend time understanding the existing system before
implementing changes to it.
2. Poor development practice
⮚ The contract to maintain a system is usually separate from the system
development contract.
⮚ There is no incentive for a development team to write maintainable software.
⮚ The development team may not write maintainable software to save effort.
This means that the software is more difficult to change in the future.
3. Staff skills
⮚ Maintenance is seen as a less-skilled process than system development.
⮚ It is often allocated to the most junior staff.
⮚ Also, old systems may be written in obsolete programming languages.
⮚ The maintenance staff may not have much experience of development in these
languages and must learn these languages to maintain the system. 4.
Program age and structure
⮚ As changes are made to programs, their structure tends to degrade.
⮚ As programs age, they become harder to understand and change.
Maintenance prediction
⮚ It is important try to predict what system changes might be proposed and
what parts of the system are likely to be the most difficult to maintain.
⮚ Also estimating the overall maintenance costs for a system in a given time
period is important.
⮚ The following figure shows these predictions and associated questions
Software reengineering
⮚ Reengineering is done to improve the structure and understandability of
legacy software systems
⮚ Reengineering makes legacy software systems easier to maintain
⮚ Reengineering may involve redocumenting the system, refactoring the
system architecture, translating programs to a modern programming
language, and modifying and updating the structure and values of the
system’s data.
⮚ The functionality of the software is not changed due to reengineering
Benefits of reengineering
Reduced risk Reengineering reduces the high risk in redeveloping
business-critical software. Errors may be made in the system specification or
there may be development problems. Delays in introducing the new software may
mean that business is lost and extra costs are incurred.
Reduced cost The cost of reengineering may be significantly less than the cost of
developing new software.
Reengineering approaches
⮚ The costs of reengineering depend on the extent of the work that is carried out.
⮚ The following figure shows a spectrum of possible approaches to reengineering
Disadvantages of reengineering
⮚ There are limits to how much you can improve a system by reengineering.
⮚ It isn’t possible to convert a system written using a functional approach to an
object- oriented system.
⮚ Major architectural changes of the system data management cannot be carried
out automatically.
⮚ The reengineered system will probably not be as maintainable as a new system
developed using modern software engineering methods.
Preventative maintenance by
refactoring
⮚ Refactoring is the process of making improvements to a program to slow down
degradation through change.
⮚ It means modifying a program to improve its structure, to reduce its
complexity, or to make it easier to understand.
⮚ Refactoring a program is not adding new functionality.
⮚ Refactoring is considered as ‘preventative maintenance’ that reduces the
problems of future change.
1. Duplicate code The same of very similar code may be included at different
places in a program. This can be removed and implemented as a single method or
function that is called as required.
2. Long methods If a method is too long, it should be redesigned as a number
of shorter methods.
3. Switch (case) statements These often involve duplication, where the
switch depends on the type of some value. The switch statements may be
scattered around a program. In objectoriented languages, you can often use
polymorphism to achieve the same thing.
4. Data clumping Data clumps occur when the same group of data items
(fields in classes, parameters in methods) reoccur in several places in a program.
These can often be replaced with an object encapsulating all of the data.
5. Speculative generality This occurs when developers include generality in a
program in case it is required in future. This can often simply be removed.
Legacy system management
⮚ Organizations have a limited budget for maintaining and upgrading legacy
systems.
⮚ They have to decide how to get the best return on their investment.
⮚ This involves making a realistic assessment of their legacy systems and then
deciding on the most appropriate strategy for evolving these systems.
⮚ There are four strategic options:
1. Scrap the system completely This option should be chosen when the
system is not making an effective contribution to business processes.
2. Leave the system unchanged and continue with regular maintenance
This option should be chosen when the system is still required but is fairly stable
and the system users make relatively few change requests.
3. Reengineer the system to improve its maintainability This option
should be chosen when the system quality has been degraded by change and
where a new change to the system is still being proposed.
4. Replace all or part of the system with a new system This option should
be chosen when factors, such as new hardware, mean that the old system cannot
continue in operation or where off-the-shelf systems would allow the new system
to be developed at a reasonable cost.
Data can be collected to assess the quality of the system. The data that can be
collected are
1. The number of system change requests System changes usually corrupt
the system structure and make further changes more difficult. The higher this
value, the lower the quality of the system.
2. The number of user interfaces The more interfaces, the more likely that
there will be inconsistencies and redundancies in these interfaces, hence
reducing system quality.
3. The volume of data used by the system The higher the volume of data
(number of files, size of database, etc.), the more likely that it is that there will be
data inconsistencies that reduce the system quality.
Chapter2
Agile methods and Devops
Learning Objectives
By studying The Agile Manifesto: Values and Principles.
• You will Understand and Appreciate the rationale for Agile
Software Development Methods
• You will Understand and Appreciate the Agile Manifesto:
Values and
Principles, and
• You will Understand and Appreciate the differences between
Agile and Plan Driven Development
Introduction
Agile Movement is towards developing software and software systems
in a rapid way. In this chapter the Agile Manifesto: Values and
Principles, we study the rationale for Agile Software Development
Methods, the Agile Manifesto: Values and Principles, and the
differences between Agile and Plan Driven Development
Need for Agile Software Development
Software is a part of every system and such a software shall be
released on-time, help users to fulfill their expectations, and also,
ensure business value. These critical requirements can be addressed
by adapting practices of rapid development and delivery of software so
that we can address technical disruptions, emergence of competing
products and services, new opportunities and markets, and align to
changing social and economic conditions. However making it possible
is not so easy but quite a challenging one because of changes that
have become common phenomena which come in the form of –
Agile Model
Unlike other software development models, assumes that the change
is constant so adapt to change rather than control change
This is very practical and major movement away from conventional
software development models which assume that Requirements will
not rapidly change ones we specify them and Object Oriented models
that work with objective of need to design for the future and need to
design for reuse Agile Manifesto and Four Key Ideas in Agile
To produce better software product by reducing the time gap between
doing some activity and gaining feedback.
In order to implement agile manifesto, agile development approach
uses four key ideas:
• Individuals and interactions are preferred over processes and
tools
• Working software is preferred over comprehensive
Documentation
• Customer collaboration is preferred over contract negotiation
• Responding to change is preferred over following a plan
And agile manifesto and agile software development uses following Key
Principles.
are large in size, and also, where systems are safety and mission
critical. Agile methods face issues and failures when
• Putting in a fixed price contract where managing cost & effort
becomes more important over business value. Agile methods
since focus on value more than cost and effort frequently fail to
stick to cost and effort.
• Expecting all of the scope to be delivered: Agile methods focus
on workable product and on-time delivery. Hence in agile we can
notice negotiating with scope by reducing or increasing scope
when it is found to be of value can be quite a common
characteristic.
• Pushing the team hard – making unrealistic demands: Agile
uses group creativity and co-creation and as such team
motivation is critical for success. When we push the team hard
by putting unrealistic demands, we can see that it may result in
demotivated team. Demotivated team frequently fails to deliver
value and innovation.
• Focusing on project execution efficiency as against product
value delivered: Project efficiency is all about sticking to scope,
effort, schedule, and budget. Agile accepts changes and hence
scope always undergoes change even in later stages of the
software development life cycle and it may consume more effort
and budget. Hence agile methods may not of great value in
fixed-budget and fixedscope projects.
Question #3: How large is the system that is being developed and
team size and where it is located?
• If the system developed is small by a small co-located team who can
communicate informally
If YES
=> Consider using Agile Approach
• If the system developed large by a larger team who can communicate
formally
If YES
=> Consider using Plan-driven Approach
• User stories
• Pair programming
• Refactoring frequent integration
Following are Key Practices in Extreme Programming relate to the
General Principles of Agile Methods:
• Incremental Development: Incremental Development is well
supported through small frequent releases of the system with
the help of requirements that are represented as Functionalities
in the form of User Stories
• Customer Involvement is supported: Representative of End-User
of the System and Customer shall Involve, Engage, and
Constructively Criticise and also, define
& prioritise requirements and developing Acceptance Test for the system
• People but not Processes: People but not Processes is supported
through Paired
Programming, Collective Ownership of the Code, and
Suitable Development Process that discourages long working
hours
• Change is Embraced through Regular and Frequent Releases to
Customer: Test First Development, Refactoring to avoid Code
Degeneration and Continuous Integration of New Functionality
• Maintaining Simplicity is Supported: By constant refactoring
that improves code quality and by using simple design that do
not unnecessarily anticipate future changes to the system
Extreme Programming Principles or Practices
Following are Extreme Programming Principles and Practices:
Principle or Practice Description
Incremental Planning “Requirements” => Recorded as “User Stories”
one per “Story Card” => Prioritised => User
Stories are split into
“Development Tasks” by developers
with code of other developers. Like this, final system is evolved. Tester
will execute all the system test cases and log the defects with respect
to that module/iteration which are fixed immediately
Advantages of SCRUM in Telecommunication Software (Ref:
Rising and Janoff) Study on Telecommunication Software developed
by using Scrum revealed following advantages:
• Advantage #1: The Product Backlog is broken down into a set of
manageable and understandable Chunks
• Advantage #2: Unstable Requirements do not hold up progress
• Advantage #3: The whole team has visibility of everything and
consequently team communication has improved
• Advantage #4: Customer see on-time delivery of increments an
gain feedback on how product works
• Advantage #5: Trust between customers and developers is
established and a positive culture is created in which everyone
expects the project to succeed
• #2: Many of them are “Brown Field Systems” with new system is
built to work by connecting with existing systems. These may
pose problems of Interoperability, portability, and immune to
change
• #3: More System Configuration and Lesser New Incremental
Development of Software
• #4: Large System Development are Bound by Stronger Processes
with No Flexibility. Hence Software Development effort is more
towards Process
Management and Compliance with Rules and Regulations
• #5: Large Systems have a diverse set of stake holders who can
not be involved in development process
“Scaling Agile Methods”: Two Perspectives
Following are two perspectives on “Scaling Agile Methods” to make it
effective for Large Software System Development
• “Scaling up” Perspective: By using Agile Methods small teams
can not develop large software system
• “Scaling out” Perspective: Concerned with how agile methods
can be introduced across a large organizations with many years
of software experience
“Scaling Agile Methods”: Adaption to Cope with Large
Systems Engineering
“It is essential to maintain the fundamentals of agile methods
characterised by Flexible Planning, Frequent System Releases,
Continuous Integration, Test Driven Development, and Good Team
Communication” (Leffingwell, 2007)
Critical Adaptions for Large Systems Development
• #1: Do not just focus on Just Enough Code and Test
simultaneously. You need to do more up-front design involving
describing critical aspects of the system, database schema, work
break down across teams, and system documentation
However, we can consider Good quality software as one that meets the
user‟s needs in terms of Correctness (meets Functional
Requirements),Reliability(User can depend on it;
Operates as expected over specified time) and Robustness ( Behaves
„reasonably‟ even under „unspecified‟ circumstances).
Other important attributes are Efficiency & Performance,
Maintainability & Evolvability, Usability / reusability &I
interoperability, Understandability & Portability .
Thus we see that Software Quality is Not as “ simple and straight
forward “ as for other engineering products. It is Problematic because:
– Software specs are usually incomplete & often
inconsistent. – Some quality needs are difficult to specify
in an unambiguous way; – There is a tension between
quality requirements of :
• Customer (efficiency, reliability, etc.)
and
• Developer (maintainability, reusability, etc.);
Quality plan that sets quality goals and correct application of specific
quality processes defined in the plan and Ensuring that the project
outputs conform to the specified standards
Verification & validation are NOT the same thing. Boehm (1979)
differentiated the two with a clear expression as follows :
1. VERIFICATION - "Are we building the product right”. (The
software should conform to its specification)
2. Software testing
- Concerned with exercising and observing product
behaviour (dynamic verification)
- The system is executed with test data and its operational
behaviour is observed
Testing
Testing is the Most widely used and main technique for V & V. it
Involves exercising the program with data .
TESTING Can reveal the presence of errors NOT their absence. It
is The only validation technique for non-functional requirements as
the software has to be executed to see how it behaves.It Should be
used in conjunction with static verification to provide full V&V
coverage .
Testing process
Testing Phases
1. Component testing is testing of individual program components; It is
usually the responsibility of the component developer (except
sometimes for critical systems); Tests are derived from the developer‟s
experience.
2. System testing is Testing of groups of components integrated to create
a system or subsystem; Independent testing team takes up this
responsibility and Tests are based on a system specification.
Test Case Design Involves designing the test cases (inputs and
outputs) used to test the system. The goal of test case design is to
create a set of tests that are effective in validation and defect testing
such that it Throw up maximum errors with minimum number of test
cases. Design approaches generally considered are :
o Requirements-based testing; o Partition testing;
o Structural testing.
Approach – 1 Requirements-based Testing is a general principle of
requirements engineering is that requirements should be testable.
Requirements-based testing is a validation testing technique where
you consider each requirement and derive a set of tests for that
requirement.
equivalent way for each class member. Test cases should be chosen
from each partition.
Input partitions for search routine
– Test software with sequences which have only a single
value.
– Use sequences of different sizes in different tests.
– Derive tests so that the First, Middle and Last
elements of the sequence are accessed.
– Test with key element NOT in the sequence
Pricing Strategies :
1. Under- pricing – (Quoting below the normal price) is done at times
to gain a contract and keep staff busy & retain them for future
opportunities OR to get entry to new market area.
2. Over Pricing - (Quoting above the normal price) is done at times to
cover high risks involved in fixed price contracts.
Project Planning
Project Planning is the most important and probably the most
time-consuming project management activity. It is a Continuous
activity from initial concept through to system delivery. The Plan
drives the development towards the project goals. Plans must be
regularly revised as new information becomes available. Various
different types of plan may be developed to support the main software
project plan that is concerned with schedule and budget. Types of
Project Plans
Plan Description
Describes the quality procedures and
Quality plan standards that will be used in a
project.
Validation plan Describes the approach, resources
and schedule used for system
validation.
Configuration Describes the configuration
management management procedures and
plan structures to be used.
Predicts the maintenance
Maintenance requirements of the system,
maintenance costs and effort
plan required..
Describes how the skills and
Staff development plan. experience of the project team
members will be developed.
The Project Plan sets out the resources available to the project; The
work breakdown; and a schedule for the work. The Project Plan
document should have following chapters:
1. Introduction.
2. Project organisation.
3. Risk analysis.
4. Hardware and software resource requirements.
5. Work breakdown.
6. Project schedule
7. Monitoring and reporting mechanisms.
Activities in a project should be organised to produce tangible
outputs for management to judge progress. Milestones are the
end-point of a process activity. Deliverables are project results
delivered to customers.
Project Scheduling
Project Scheduling is the task of estimating the time and resources
needed to complete the activities and organizing them into a coherent
sequence. The steps involved are:
1. Split project into tasks
2. Estimate time & resources required to complete each task
3. Organize tasks concurrently to make optimal use of
workforce
4. Minimize task dependencies to avoid delays caused by one
task waiting for another to complete
The entire exercise is dependent on Manager‟s experience dependent
on project manager‟s intuition and experience. The project
scheduling process:
Costing &
Pricing : –
Costing
– The process of estimating that discovers the cost, to the
developer, of producing a software system
– Must be done objectively with the aim of producing the
accurate costs incurred during development
– Must be regularly updated once the project is underway
Pricing
– The process of deciding the money to be charged to
customer for the software development effort
– It is NOT simply cost + profit
– Broader organisational, economic, political and business
considerations influence the price charged.
4. Post-architecture model.
-Used once the system architecture has been designed
and more information about the system is available
This computation predicts the nominal schedule for the project.. The
time required is independent of the number of people working on the
project.
Software Metrics
Software metric is A standard of measure of a degree to which a
software system or process possesses some property. Example : Lines
of code in a program, number of persondays required to develop a
component etc.. Metric can be used to quantify intangible qualities of
software product & process. Metric may also be used to predict
product attributes or to control the software process. Product metrics
can be used for general predictions or to identify anomalous
components.