MCS 213
MCS 213
1.0 INTRODUCTION
In the last few decades, the computer industry has undergone revolutionary changes in
hardware. That is, processor technology, memory technology, and integration of
devices have changed very rapidly. As the software is required to maintain
compatibility with hardware, the complexity of software also has changed much in the
recent past. In 1970s, the programs were small, simple and executed on a simple
uniprocessor system. The development of software for such systems was much easier.
In the present situation, high speed multiprocessor systems are available and the
software is required to be developed for the whole organisation. Naturally, the
complexity of software has increased many folds. Thus, the need for the application
of engineering techniques in their development is realised. The application of
engineering approach to software development lead to the evolution of the area of
Software Engineering. The IEEE glossary of software engineering terminology
defines the Software Engineering as:
5
An Overview of
Software Engineering 1.1 OBJECTIVES
After going through this unit, you should be able to:
In this period, higher order programming languages like PASCAL and COBOL came
into existence. The use of these made programming much easier. In this decade, some
structural design practices like top down approach were introduced. The concept of
quality assurance was also introduced. However, the business aspects like cost
estimation, time estimation etc. of software were in their elementary stages.
In the late 1980s and 1990s, software development underwent revolutionary changes.
Instead of a programming team in an organisation, full-fledged software companies
evolved (called software houses). A software houses primary business is to produce
software. As software house may offer a range of services, including hiring out of
suitably qualified personnel to work within client‟s team, consultancy and a complete
system design and development service. The output of these companies was
„Software‟. Thus, they viewed the software as a product and its functionality as a
process. The concept of software engineering was introduced and Software became
more strategic, disciplined and commercial. As the developer of Software and user of
Software became separate organisation, business concepts like software costing,
Software quality, laying of well-defined requirements, Software reliability, etc., came
into existence. In this phase an entirely new computing environments based on a
knowledge-based systems get created. Moreover, a powerful new concept of object-
oriented programming was also introduced.
The latest trend in software engineering includes the concepts of software reliability,
reusability, scalability etc. More and more importance is now given to the quality of
the software product. Just as automobile companies try to develop good quality
automobiles, software companies try to develop good quality Software. The software
creates the most valuable product of the present era, i.e., information.
6
The following Table summarises the evolution of software: Software Engineering
and its Model
1960s Infancy Machine Code
1970s Project Years Higher Order Languages
1980s Project Years Project Development
1990s Process and Production Era Software Reuse
1. Correcting errors is easy. Though the changes in the software are possible, but,
making changes in large software is extremely difficult task.
Software Standards
2. The Other Engineering products are visible but the software as such is not
visible. That‟s why, it is said that software is developed, but not manufactured.
Though, like other products, it is first designed, then produced, it cannot be
manufactured automatically on an assembly line like other engineering
products. Nowadays, CASE (Computer Aided Software Engineering) tools are
available for software development. Still it depends on the programmer‟s skill
and creativity. The creative skills of the programmer is difficult to quantify and
7
An Overview of standardise. Hence, the same software developed by different programmers
Software Engineering may take varying amount of time, resources and may have variable cost.
3. Software does not fail in the traditional sense. The engineering products has
wear and tear in the operation. Software can be run any number of times
without wear and tear. The software is considered as failed if:
6. Unlike most of the other engineering products, software can be reused. Once a
piece of code is written for some application, it can be reused.
Thus, the characteristics of software are quite different from other engineering
products. Hence, the software industry is quite different from other industries.
As the application domains of software are becoming complicated and design of big
software without a systematic approach is virtually impossible, the field of software
engineering is increasingly gaining importance. It is now developing like an industry.
Thus, the industry has to answer following or similar queries of clients:
To answer all such queries, software development has adopted a systematic approach.
Software development should not remain an art. Scientific basis for cost, duration,
risks, defects etc. are required. For quality assurance, product qualities and process
qualities and must be made measurable as far as possible by developing metrics for
them.
8
1.3.2 Various Development Models Software Engineering
and its Model
The following are some of the models adopted to develop software:
It is a simple two phase model. In one phase, code is developed and in another, code
is fixed.
It is the simplest, oldest and most widely used process model. In this model, each
phase of the life cycle is completed before the start of a new phase. It is actually the
first engineering approach of software development.
Requirements analysis
Design
Coding
Testing
Maintenance
9
An Overview of A slight modification of the waterfall model is a model with feedback. Once software
Software Engineering is developed and is operational, then the feedback to various phases may be given.
Figure 1.3 depicts the Water Fall Model with feedback.
Requirements Analysis
Design
Coding
Testing
Maintenance
This model was developed to remove the shortcomings of waterfall model. In this
model, the phases of software development remain the same, but the construction and
delivery is done in the iterative mode. In the first iteration, a less capable product is
developed and delivered for use. This product satisfies only a subset of the
requirements. In the next iteration, a product with incremental features is developed.
Every iteration consists of all phases of the waterfall model. The complete product is
divided into releases and the developer delivers the product release by release.
Iteration-1 Iteration-2
This model is useful when less manpower is available for software development and
the release deadlines are tight. It is best suited for in-house product development,
where it is ensured that the user has something to start with. The main disadvantage of
this model is that iteration may never end, and the user may have to endlessly wait for
the final product. The cost estimation is also tedious because it is difficult to relate the
software development cost with the number of requirements.
The inner cycles of the spiral model represent early phases of requirements analysis
and after prototyping of software, the requirements are refined.
In the spiral model, after each phase a review is performed regarding all products
developed upto that point and plans are devised for the next cycle. This model is a
realistic approach to the development of large scale software. It suggests a systematic
approach according to classical life cycle, but incorporates it into iterative framework.
It gives a direct consideration to technical risks. Thus, for high risk projects, this
model is very useful. The risk analysis and validation steps eliminate errors in early
phases of development.
As the name suggests, this model gives a quick approach for software development
and is based on a linear sequential flow of various development processes. The
software is constructed on a component basis. Thus multiple teams are given the task
of different component development. It increases the overall speed of software
development. It gives a fully functional system within very short time. This approach
emphasises the development of reusable program components. It follows a modular
approach for development. The problem with this model is that it may not work when
technical risks are high.
Check Your Progress 1
1) Indicate various problems related with software development.
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
2) Give a comparative analysis of various types of software process models.
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
3) What are various phases of software development life cycle?
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
The process models are based on various software development phases whereas the
capability models have an entirely different basis of development. They are based
upon the capabilities of software. It was developed by Software Engineering
Institute (SEI). In this model, significant emphasis is given to the techniques to
improve the “software quality” and “process maturity”. In this model a strategy for
improving Software process is devised. It is not concerned which life cycle mode is
followed for development. SEI has laid guidelines regarding the capabilities an
12
organisation should have to reach different levels of process maturity. This approach Software Engineering
evaluates the global effectiveness of a software company. and its Model
Level 4 (Managed): The organisation satisfies all the requirements of level-3. At this
level quantitative standards are set for software products and processes. The project
analysis is done at integrated organisational level and collective database is created.
The performance is measured at integrated organisation level. The Software
development is performed with well defined instruments. The organisation‟s
capability at Level 4 is “predictable” because projects control their products and
processes to ensure their performance within quantitatively specified limits. The
quality of software is high.
Level 5 (Optimising): The organisation satisfies all the requirements of level-4. This
is last level. The organisation at this maturity level is considered almost perfect. At
this level, the entire organisation continuously works for process improvement with
the help of quantitative feedback obtained from lower level. The organisation analyses
its weakness and takes required corrective steps proactively to prevent the errors.
Based on the cost benefit analysis of new technologies, the organisation changes their
Software development processes.
Methods for varying implementation: It explains how the KPAs can be verified.
18 KPAs are defined by SEI and associated with different maturity levels. These are
described below:
Level 2 KPAs:
Level 3 KPAs:
7) Peer reviews (PR): They remove defects from software engineering work
products.
14
Level 4 KPAs: Software Engineering
and its Model
1) Quantitative Process Management (QP): It defines quantitative standards for
software process.
Level 5 KPAs:
1) Defect Prevention (DP): It discovers the causes of defects and devises the
techniques which prevent them from recurring.
The various steps (called phases) which are adopted in the development of this
process are collectively termed as Software Development Life Cycle (SDLC). The
various phases of SDLC are discussed below. Normally, these phases are performed
lineally or circularly, but it can be changed according to project as well. The software
is also considered as a product and its development as a process. Thus, these phases
15
An Overview of can be termed as Software Process Technology. In general, different phases of SDLC
Software Engineering are defined as following:
Requirements Analysis
Design
Coding
Software Testing
Maintenance.
Requirements Analysis
Design
In this phase, a logical system is built which fulfils the given requirements. Design
phase of software development deals with transforming the customer‟s requirements
into a logically working system. Normally, design is performed in the following two
steps:
i) Primary Design Phase: In this phase, the system is designed at block level.
The blocks are created on the basis of analysis done in the problem
identification phase. Different blocks are created for different functions
emphasis is put on minimising the information flow between blocks. Thus, all
activities which require more interaction are kept in one block.
ii) Secondary Design Phase: In the secondary design phase the detailed design of
every block is performed.
The input to the design phase is the Software Requirements Specification (SRS)
document and the output is the Software Design Document (SDD). The general tasks
involved in the design process are the following:
The Software design is the core of the software engineering process and the first of
three important technical activities, viz., design, coding, and testing that are required
to build software. The design should be done keeping the following points in mind.
16
i) It should completely and correctly describe the system. Software Engineering
and its Model
ii) It should precisely describe the system. It should be understandable to the
software developer.
The following points should be kept in mind while performing the design:
i) Practicality: This ensures that the system is stable and can be operated by a
person of average intelligence.
iii) Flexibility: The system could be modifiable depending upon changing needs of
the user. Such amendments should be possible with minimum changes.
iv) Security: This is an important aspect of design and should cover areas of
hardware reliability, fall back procedures, security of data and provision for
detection of fraud.
Coding
The input to the coding phase is the SDD document. In this phase, the design
document is coded according to the module specification. This phase transforms the
SDD document into a high level language code. At present major software companies
adhere to some well specified and standard style of coding called coding standards.
Good coding standards improve the understanding of code. Once a module is
developed, a check is carried out to ensure that coding standards are followed. Coding
standards generally give the guidelines about the following:
Testing
Testing is the process of running the software on manually created inputs with the
intention to find errors. In the process of testing, an attempt is made to detect errors, to
correct the errors in order to develop error free software. The testing is performed
keeping the user‟s requirements in mind and before the software is actually launched
on a real system, it is tested. Testing is the process of executing a program with the
intention of finding errors.
Normally, while developing the code, the software developer also carries out some
testing. This is known as debugging. This unearths the defects that must be removed
from the program. Testing and debugging are different processes. Testing is meant for
finding the existence of defects while debugging stands for locating the place of errors
and correcting the errors during the process of testing. The following are some
guidelines for testing:
i) Test the modules thoroughly, cover all the access paths, generate enough data to
cover all the access paths arising from conditions.
17
An Overview of ii) Test the modules by deliberately passing wrong data.
Software Engineering
iii) Specifically create data for conditional statements. Enter data in test file which
would satisfy the condition and again test the script.
iii) Starting with a small test, it should proceed towards large tests.
Large systems are built out of subsystems, subsystems are made up of modules,
modules of procedures and functions. Thus in large systems, the testing is performed
at various levels, like unit level testing, module level testing, subsystem level, and
system level testing.
Thus, testing is performed at the following levels. In all levels, the testing are
performed to check interface integrity, information content, performance.
The following are some of the strategies of testing: This involves design of test cases.
Test case is set of designed data for which the system is tested. Two testing strategies
are present.
i) Code Testing: The code testing strategy examines the logic of the system. In
this, the analyst develops test cases for every instruction in the code. All the
paths in the program are tested. This test does not guarantee against software
failures. Also, it does not indicate whether the code is according to
requirements or not.
ii) Specification Testing: In this, testing with specific cases is performed. The
test cases are developed for each condition or combination of conditions and
submitted for processing.
The objective of testing is to design test cases that systematically uncover different
classes of errors and do so with the minimum amount of time and effort. Testing
cannot show the absence of errors. It can only find the presence of errors. The test
case design is as challenging as software development. Still, however effective the
design is, it cannot remove 100% errors. Even, the best quality software are not 100 %
error free. The reliability of software is closely dependent on testing.
Some testing techniques are the black box and the white box methods.
White box testing: This method, also known as glass box testing, is performed early
in the testing process. Using this, the software engineer can derive a tests that
18
guarantees that all independent paths within the module have been exercised at least Software Engineering
once. It has the following features: and its Model
ii) Execute all loops at their boundaries and within their operational bounds.
Black box testing: This is applied during the later stage of testing. It enables the
software developer to derive a set of input conditions that will fully exercise the
functional requirements of a program. It enables him to find errors like incorrect or
missing functions, interface errors, data structures or external data base access errors
and performance errors etc.
Maintenance
Maintenance in the normal sense means correcting the problems caused by wear and
tear, but software maintenance is different. Software is either wrong in the beginning
or later as some additional requirements have been added. Software maintenance is
done because of the following factors.
i) To rectify the errors which are encountered during the operation of software.
ii) To change the program function to interface with new hardware or software.
i) Corrective Maintenance
ii) Adaptive Maintenance
iii) Perfective Maintenance
ii) No standards for maintenance have been developed and the area is relatively
unexplored area.
The various phases of the software development life cycle are tightly coupled, and the
output of one phase governs the activity of the subsequent phase. Thus, all the phases
need to be carefully planned and managed and their interaction requires close
monitoring. The project management becomes critical in larger systems.
19
An Overview of
Software Engineering 1.6 SUMMARY
Software engineering covers the entire range of activities used to develop software.
The activities include requirements analysis, program development using some
recognised approach like structured programming, testing techniques, quality
assurance, management and implementation and maintenance. Further, software
engineering expects to address problems which are encountered during software
development.
1.7 SOLUTIONS/ANSWERS
2) Out of all SDLC models, the most popular one is waterfall model. But, it insists
on having a complete set of requirements before commencement of design. It is
often difficult for the customer to state all requirements easily. The iterative
enhancement model, though better than waterfall model, in customised software
development where the client has to provide and approve the specification, it
may lead to time delays for software development. Prototype model provides
better understanding of customer‟s needs and is useful for large systems, but, in
this, the use of inefficient inaccurate or dummy functions may produce
undesired results. The spiral model accommodates good features of other
models. In this, risk analysis and validation steps eliminate errors in early
phases of development. But, in this model, there is a lack of explicit process
guidance in determining objectives.
Requirement analysis
Design
Coding
Testing
Maintenance
2) Level-1
20
Software Engineering
1.8 FURTHER READINGS and its Model
Reference websites
http://www.rspa.com
http://www.ieee.org
http://standards.ieee.org
21
An Overview of
Software Engineering UNIT 2 PRINCIPLES OF SOFTWARE
REQUIREMENTS ANALYSIS
Structure Page Nos.
2.0 Introduction 22
2.1 Objectives 23
2.2 Engineering the Product 23
2.2.1 Requirements Engineering
2.2.2 Types of Requirements
2.2.3 Software Requirements Specification (SRS)
2.2.4 Problems in SRS
2.2.5 Requirements Gathering Tools
2.3 Modeling the System Architecture 26
2.3.1 Elementary Modeling Techniques
2.3.2 Data Flow Diagrams
2.3.3 Rules for Making DFD
2.3.4 Data Dictionary
2.3.5 E-R Diagram
2.3.6 Structured Requirements Definition
2.4 Software Prototyping and Specification 34
2.4.1 Types of Prototype
2.4.2 Problems of Prototyping
2.4.3 Advantages of Prototyping
2.5 Software Metrics 35
2.6 Summary 36
2.7 Solutions/Answers 37
2.8 Further Readings 38
2.0 INTRODUCTION
In the design of software, the first step is to decide about the objectives of software.
This is the most difficult aspect of software design. These objectives, which the
software is supposed to fulfill are called requirements.
Thus, requirements specify “what the system is supposed to do?” These requirements
are taken from the user. Defining the requirements is most elementary & most
difficult part of system design, because, at this level, sometimes, the user himself is
not clear about it. Many software projects have failed due to certain requirements
specification issues. Thus, overall quality of software product is dependent on this
aspect. Identifying, defining, and analysing the requirements is known as requirements
analysis. Requirements analysis includes the following activities:
1. Identification of end user‟s need.
2. Preparation of a corresponding document called SRS (Software Requirements
Specification).
22
3. Analysis and validation of the requirements document to ensure consistency, Principles of Software
Requirements Analysis
completeness and feasibility.
2.1 OBJECTIVES
After going through this unit, you should be able to:
1. Requirements gathering.
2. Requirements analysis and modeling.
On the basis of their functionality, the requirements are classified into the following
two types:
i) Functional requirements: They define the factors like, I/O formats, storage
structure, computational capabilities, timing and synchronization.
External Interfaces of the system: They identify the information which is to flow
„from and to’ to the system.
Functional and non-functional requirements of the system. They stand for the
finding of run time requirements.
Design constraints:
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definitions, acronyms, and abbreviations
1.4 References
1.5 Overview
2. Overall description
2.1 Product perspective
2.2 Product functions
2.3 User characteristics
2.4 Constraints
2.5 Assumptions and dependencies
3. Specific requirements
3.1 External Interfaces
3.2 Functional requirements
3.3 Performance requirements
3.4 Logical Database requirements
3.5 Design Constraints
3.6 Software system attributes
3.7 Organising the specific requirements
3.8 Additional Comments
4. Supporting information
4.1 Table of contents and index
4.2 Appendixes
24
2.2.4 Problems in SRS Principles of Software
Requirements Analysis
There are various features that make requirements analysis difficult. These are
discussed below:
1. Complete requirements are difficult to uncover. In recent trends in engineering,
the processes are automated and it is practically impossible to understand the
complete set of requirements during the commencement of the project itself.
2. Requirements are continuously generated. Defining the complete set of
requirements in the starting is difficult. When the system is put under run, the new
requirements are obtained and need to be added to the system. But, the project
schedules are seldom adjusted to reflect these modifications. Otherwise, the
development of software will never commence.
3. The general trends among software developer shows that they have over
dependence on CASE tools. Though these tools are good helping agents, over
reliance on these Requirements Engineering Tools may create false requirements.
Thus, the requirements corresponding to real system should be understood and
only a realistic dependence on tools should be made.
4. The software projects are generally given tight project schedules. Pressure is
created from customer side to hurriedly complete the project. This normally cuts
down the time of requirements analysis phase, which frequently lead to
disaster(s).
5. Requirements Engineering is communication intensive. Users and developers
have different vocabularies, professional backgrounds and psychology. User
writes specifications in natural language and developer usually demands precise
and well-specified requirement.
The requirements gathering is an art. The person who gathers requirements should
have knowledge of what and when to gather information and by what resources. The
requirements are gathered regarding organisation, which include information
regarding its policies, objectives, and organisation structure, regarding user staff. It
includes the information regarding job function and their personal details, regarding
the functions of the organisation including information about work flow, work
schedules and working procedure.
The following four tools are primarily used for information gathering:
2. On site observation: In case of real life systems, the actual site visit is performed
to get a close look of system. It helps the analyst to detect the problems of existing
system.
25
An Overview of 3. Interview: A personal interaction with staff is performed to identify their
Software Engineering requirements. It requires experience of arranging the interview, setting the stage,
avoiding arguments and evaluating the outcome.
A model showing bare minimum requirements is called Essential Model. It has two
components.
Courses offered
to students
Department
College
Interfaces to
external systems
University
In environmental model, the interfaces should clearly indicate the inflow and outflow
of information from the system.
26
The tools of environment model are: Principles of Software
Requirements Analysis
(i) Statement of purpose: It indicates the basic objectives of system.
(ii) Event list: It describes the different events of system and indicates functionality
of the system.
(iii) Context diagram: It indicates the environment of various sub-systems.
In structured approach of modeling the standard techniques of DFD, E-R diagram etc.
are used to develop system specification in a formal format. It develops a system
logical model.
2.3.2 Data Flow Diagrams (DFD)
It is a graphical representation of flow of data through a system. It pictures a system as
a network of functional processes. The basis of DFD is a data flow graph, which
pictorially represents transformation on data as shown in Figure 2.2.
Level 1
External Input data Input data External
Processing
Entity Entity
Intermediate data
Intermediate data
Level 3
Processing
Data store
Output data
External
Entity
The structured approach of system design requires extensive modeling of the system.
Thus, instead of making a complete model exhibiting the functionality of system, the
DFD‟s are created in a layered manner. At the first layer, the DFD is made at block
level and in lower layers, the details are shown. Thus, level “0” DFD makes a
fundamental system (Figure 2.3).
I1
Process A Output
I2
1. Keep a note of all the processes and external entities. Give unique names to them.
Identify the manner in which they interact with each other.
2. Do numbering of processes.
5. Every process should have minimum of one input and one output.
The data store should contain all the data elements that flow as input and output.
28
To understand the system functionality, a system model is developed. The developed Principles of Software
Requirements Analysis
model is used to analyze the system. The following four factors are of prime concern
for system modeling:
1. The system modeling is undertaken with some simplifying assumptions about the
system. Though these assumptions limit the quality of system model, it reduces
the system complexity and makes understanding easier. Still, the model
considers all important, critical and material factors. These assumptions are made
regarding all aspects like processes, behaviors, values of inputs etc.
2. The minute details of various components are ignored and a simplified model is
developed. For example, there may be various types of data present in the system.
The type of data having minute differences are clubbed into single category, thus
reducing overall number of data types.
3. The constraints of the system are identified. Some of them may be critical. They
are considered in modeling whereas others may be ignored. The constraints may
be because of external factors, like processing speed, storage capacity, network
features or operating system used.
Example 1: The 0th and 1st levels of DFD of Production Management System are
shown in Figure 2.5 (a) and (b)
Planning
Production Planning report
Product
PMS Finished goods
Sales
Order
Inventory
Material
29
Machine Code
An Overview of Process table
Software Engineering
Process type
1.0
Daily
Planning
List detail
Plan detail
Job Card 2.0
Job card table Listing Master table
Progress table
Job Card
4.0 Acknowledgement
Material Manager
Billing
Product detail
Product detail
This is another tool of requirement analysis which reduces complexity of DFD. A data
dictionary is a catalog of all elements of a system. DFD depicts flow of data whereas
data dictionary gives details of that information like attribute, type of attribute, size,
names of related data items, range of values, data structure definitions etc. The name
specifies the name of attribute whose value is collected. For example, fee deposit may
be named as FD and course opted may be named as CO.
Related data items captures details of related attributes. Range of values store total
possible values of that data. Data structure definition captures the physical structure of
data items.
30
X=y{a}z x consists of some occurrences of data elements a which are Principles of Software
Requirements Analysis
between y and z.
| Separator
** Comments
@ Identifier
() Options
Example 2: The data dictionary of payroll may include the following fields:
Cardinality & Optionally: The cardinality represents the relationship between two
entities. Consider the one to many relationship between two entities – class and
student. Here, cardinality of a relationship is the number of instances of entity student
that can be associated with each instance of entity class. This is shown in Figure 2.6.
31
An Overview of The minimum cardinality of a relationship is the minimum number of instances of
Software Engineering second entity (student, in this case) with each instance of first entity (class, in this
case).
Mandatory - 1 cardinality
n highest range
Optional 0 or 1 cardinality
32
Principles of Software
Roll no. add Requirements Analysis
Name ,
Father‟s name class
Student
marks
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
33
An Overview of
Software Engineering 2.4 SOFTWARE PROTOTYPING AND
SPECIFICATION
Prototyping is a process that enables developer to create a small model of software.
The IEEE 610.12 standard defines prototype as a preliminary form or instance of a
system that serves as a model for later stages for the final complete version of the
system.
Prototype is developed so that customers, users and developers can learn more about
the problem. Thus, prototype serves as a mechanism for identifying software
requirements. It allows the user to explore or criticise the proposed system before
developing a full scale system.
Broadly, the prototypes are developed using the following two techniques:
Throw away prototype: In this technique, the prototype is discarded once its purpose
is fulfilled and the final system is built from scratch. The prototype is built quickly to
enable the user to rapidly interact with a working system. As the prototype has to be
ultimately discarded, the attention on its speed, implementation aspects,
maintainability and fault tolerance is not paid. In requirements defining phase, a less
refined set of requirements are hurriedly defined and throw away prototype is
constructed to determine the feasibility of requirement, validate the utility of function,
uncover missing requirements, and establish utility of user interface. The duration of
prototype building should be as less as possible because its advantage exists only if
results from its use are available in timely fashion.
According to SOMM [96] the benefits of developing prototype are listed below:
Start
Requirements Quick Building Customer
Gathering Design Prototype evaluation of
prototype
Stop
Engineering product Refine Prototype
One additional difficulty in adopting this approach is the large investment that exists
in software system maintenance. It requires additional planning about the
re-engineering of software. Because, it may be possible that by the time the prototype
is build and tested, the technology of software development is changed, hence
requiring a complete re-engineering of the product.
Using the software metrics, software engineer measures software processes, and the
requirements for that process. The software measures are done according to the
following parameters:
There are significant numbers of software measures. The following are a few
common software measures:
SUMMARY
This unit discusses various aspects of software requirements analysis, the significance
of use of engineering approach in the software design, various tools for gathering the
requirements and specifications of prototypes.
2.7 SOLUTIONS/ANSWERS
1) In the present era, the development of software has become very systematic and
the specification of requirements is very important. Accordingly, to analyse
requirements completely, the engineering approach is used in requirements
analysis.
3) The purpose of using software metrics is to achieve basic objectives of the system
with low cost and high quality. Metrics provide scale for quantifying qualities and
characteristics of a software. An analogy real life is that meter is the metric of
length but to determine the length of cloth, one requires the measuring means like
meter-tape etc. Similarly, in software measurement, method must be objective and
should produce the same result independent of various measures.
1) Rapid prototyping techniques are used for speedy prototype development. There
are three techniques used for this purpose.
2) High level languages that are used for prototyping are as follows:
3) Software Architecture in practice, 2003, Len Bass, Paul Clements, Rick Kazman;
Addison-Wesley Professional.
Reference Websites:
http://standards.ieee.org
http://www.rspa.com
38
Software Design
3.0 Introduction 39
3.1 Objectives 39
3.2 Data Design 39
3.3 Architectural Design 42
3.4 Modular Design 43
3.5 Interface Design 46
3.6 Design of Human Computer Interface 49
3.7 User Experience Design 51
3.8 Designing for Mobility 51
3.9 Patterns for Design 52
3.10 Summary 52
3.11 Solutions/ Answers 52
3.12 Further Readings 53
3.0 INTRODUCTION
Software design is all about developing blue print for designing workable software.
The goal of software designer is to develop model that can be translated into software.
Unlike design in civil and mechanical engineering, software design is new and
evolving discipline contrary classical building design etc. In early days, software
development mostly concentrated on writing code. Software design is central to
software engineering process. Various design models are developed during design
phase. The design models are further refined to develop detailed design models which
are closely related to the program. One of the most recent and trending topics in the
area of Design are User Experience (UX) Design , Designing for Mobility and Design
patterns.
3. 1 OBJECTIVES
After going through this unit, you should be able to:
• design data;
• understand architectural design;
• develop modular design;
• know the significance of Human Computer Interface;
• know the significance of User Experience Design;
• know the significance of Mobility and designing for it, and
• know about patterns for design.
• Designing of Data
• Architectural design which gives a holistic architecture of the software product
• Design of cohesive and loosely coupled module
• Design of interface and tips for good interface design
• Design of Human interface
39
An Overview of
Software Engineering Software Design Process
actual realisation of the software. The goal of software design is to translate user
requirements into an implementable program.
Software design is the only way through which we can translate user requirements to
workable software. In contrary to designing a building software design is not a fully
developed and matured process. Nevertheless the techniques available provides us
tools for a systematic approach to the design of software. Figure 3.1 depicts the
process of software design.
During the process of software design, the information model is translated to data
design. Functional model and behavioural model are translated to architectural design,
which defines major component of the software. Keeping in view of the importance of
design, it should be given due weightage before rushing to the coding of software.
Software design forms the foundation for implementation of a software system and
helps in the maintenance of software in future too. Software quality and software
design process are highly interrelated. Quality is built into the software during the
design phase.
High level design gives a holistic view of the software to be built, where as low level
refinements of the design are very closely related to the final source code. A good
design can make the work of programmer easy and hardly allow the programmer to
forget the required details. Sufficient time should be devoted to design process to
ensure good quality software.
Data design is the first and the foremost activity of system Design. Before going into
the details of data design, let us discuss what is data? Data describes a real-world
information resource that is important for the application. Data describes various
entities like customer, people, asset, student records etc.
Identifying data in system design is an iterative process. At the highest level, data is
defined in a very vague manner. A high level design describes how the application
40
Software Design
handles these information resources. As we go into more details, we focus more on
the types of data and it’s properties. As you keep expanding the application to the
business needs or business processes, we tend to focus more on the details.
Data design
Architectural design
Modular Design
The primary objective of data design is to select logical representation of data items
identified in requirement analysis phase. Figure 3.2 depicts the technical aspects of
design. As we begin documenting the data requirements for the application, the
description for each item of data typically include the following:
• Name of the data item
• General description of the data item
• Characteristics of data item
• Ownership of the data item
• Logical events, processes, and relationships.
Data Sructure
A scalar item is the simplest form of data. For example, January (Name of the Month),
where as the collection of months in a year form a data structure called a vector item.
Example:
Month as string
The items in the vector called array is sequenced and index in a manner so as to retive
particular element in the arry.
The vector items are in contiguous memory locations in the computer memory. There
are other variety of lists which are non-contiguously stored. These are called linked
lists. There are other types of data structures known as hierarchical data structure such
as tree. Trees are implemented through linked lists.
S1 S2 S5
Problem
S1 S2 S5
S3 S4 S6
S3 S4
S6
Financial Accounting
Management System
Fixed Asset
Accounts Management Sundry Debtors
Receivable System System
42
Let us consider the following architecture of a software system. Software Design
The number of level of component in the structure is called depth and the number of
component across the horizontal section is called width. The number of components
which controls a said component is called fan-in i.e., the number of incoming edges to
a component. The number of components that are controlled by the module is called
fan-out i.e., the number of outgoing edges.
S0 S1 S5
S1 S2 S5 S2
The architectural design provides holistic picture of the software architecture and
connectivity between different program components (refer to Figure 3.6).
Hence, highly cohesive modules are desirable. But, highly coupled modules are
undesirable (refer to Figure 3.7 and Figure 3.8).
Cohesion
Cohesion tells us how efficiently we have positioned our system to modules. It may be
noted that modules with good cohesion requires minimum coupling with other
module.
Undesirable Desirable
• Procedural : Modules perform a series of steps. The elements in the module must
takeup single control sequence and must be executed in a specific order.
44
• Communicational : All elements in the module is executed on the same data set Software Design
and produces same output data set.
• Sequential : Output from one element is input to some other element in the
module. Such modules operates on same data structure.
• Difficult to maintain
• Tends to depend on other module to perform certain tasks
• Difficult to understand.
Coupling
Desirable Undesirable
The types of coupling from best (lowest level of coupling) to worst (high level of
coupling) are described below:
• Control coupling: One module control logic flow of another module. For
example, passing a flag to another module which determines the sequence of
action to be performed in the other module depending on the value of flag such as
true or false.
Coupling and cohesion are in contrast to each other. High cohesion often correlates
with low coupling and vice versa.
• Ripple effect.
• Difficult to reuse. Dependent modules must be included.
• Difficult to understand the function of a module in isolation.
45
An Overview of Figure 3.9 depicts highly cohesive and loosely coupled system. Figure 3.10 depicts a
Software Engineering low cohesive and tightly coupled system.
The above command line interface executes a program prog1.exe with a input i=2
with message during execution set to on. Although such command line interface gives
liberty to the user to run a program with a concise command. It is difficult for a novice
user and is error prone. This also requires the user to remember the command for
executing various commands with various details of options as shown above.
Example of Menu with option being asked from the user (refer to Figure 3.11).
1. Option 1
2. Option 2
3. Option 3
4. Back
5. Exit program
This simple menu allow the user to execute the program with option available as a
selection and further have option for exiting the program and going back to previous
screen. Although it provide grater flexibility than command line option and does not
need the user to remember the command still user can’t navigate to the desired option
from this screen. At best user can go back to the previous screen to select a different
option.
Modern graphical user interface provides tools for easy navigation and interactivity to
the user to perform different tasks.
• Various information can be display and allow user to switch to different task
directly from the present screen.
• Useful graphical icons and pull down menu reduces typing effort by the user.
• Provides key-board shortcut to perform frequently performed tasks.
• Simultaneous operations of various task without loosing the present context.
• Allow user to undo the current command. This helps in undoing mistake
committed by the user.
• Use proper navigational scheme for easy navigation within the application.
• The text appearing on the screen are primary source of information exchange
between the user and the system. Avoid using abbreviation. Be very specific in
communicating the mistake to the user. If possible provide the reason for error.
• Navigation within the screen is important and is specially useful for data entry
screen where keyboard is used intensively to input data.
• Expect the user to make mistake and provide appropriate measure to handle such
errors through proper interface design.
• Avoid high density screen layout. Keep significant amount of screen blank.
• Make sure an accidental double click instead of a single click may does some
thing unexpected.
• Provide file browser. Do not expect the user to remember the path of the required
file.
• Provide key-board shortcut for frequently done tasks. This saves time.
• Warn user about critical task, like deletion of file, updating of critical information.
• Programmers are not always good interface designer. Take help of expert
professional who understands human perception better than programmers.
• Include all possible features in the application even if the feature is available in
the operating system.
48
• Word the message carefully in a user understandable manner. Software Design
What do these things have in common? These are all human-computer interfaces
which were designed to make it easier to accomplish things with a computer. If we
recall the early days computer, some one had to remember long cryptic strings of
commands in accomplish simplest to simplest thing with a computer like coping a file
from one folder to another or deleting a file etc. It is due to the evolution of human-
computer interface and human-computer interface designers that’s now being
accomplished with the click of a mouse.
The overall process of design leads to the translation of design models to user model.
Human-Computer Interface design goal is to discover the most efficient way to design
interfaces for human interaction and understandable electronic messages. A lot of
research is taking place in this area that even helps physically disabled person to
operate computer as easily as a normal person. Figure 3.12 depicts the process of
interface design.
A branch of computer science is devoted to this area, with recommendations for the
proper design of menus, icons, forms, messages, dialogue as well as data display. The
user friendliness of the program we are using is a result of interface design. The
buttons, pull down menu, context sensitive help have been designed to make it easy
for you to access the program.
The process of HCI design begins with the a creation of a model of system function as
perceived by the end user. These models are designed by delineating them from
design issues and program structure. HCI establishes a user model of the overall
system.
The following are some of the principles of Good Human computer interface design:
Diversity: Consider the types of user frequently use the system. The designer must
consider the types of users ranging from novice user, knowledgeable but intermittent
49
An Overview of user and expert frequent user. Accommodating expectation of all types of user is
Software Engineering important. Each type of user expects the screen layout to accommodate their desires,
novices needing extensive help where as expert user want to accomplish the task in
quickest possible time.
• Mapping between the information that is visible and the interpretation of the
system state. For example, it should be obvious what the function of a button or
menu is. Do not try to built your own meaning to the commonly used icons
instead use conventions already established for it. Never use a search icon to print
a page.
2) What are the types of user errors you may anticipate while designing a user
interface. Explain?
………………………………………………………………………………………
………………………………………………………………………………………
………………………………………………………………………………………
The other way around to read UX Design is as “Design of UX”. That is, Design of
User Experience. Design is one of the most important aspect in anything. Whether , its
construction of a Building or manufacturing an Automobile / Mobile Device or
developing Software etc. Before you embark on the task , the product is designed ,
refined and then subsequently put to development. Most of you must be having
Mobile Phones. You preferred a Mobile Phone due to its Design. It’s looking elegant
or You are feeling comfortable navigating or You are expecting your productivity to
increase by using that particular product. UX Design is the base on which all the
mentioned things are possible. Initially, its Design, then it’s Human Computer
Interface and then, now its UX Design which is very important. UX should not be
confused with User Interface (UI) Design. UI focuses on Interface. UX focuses on the
entire journey of the User with the Product. However, impact of UI will be on UX. If
UI is bad, UX cannot be good.
Now a days, whenever anything is designed, mobile devices are kept in mind.
So, design is always made in such a way that the corresponding product can be
easily deployed to Mobile Devices. Again, when we think of designing
anything keeping the mobile devices in mind, then different mobile operating
systems are kept in mind. The most important thing is rendering the product on
the mobile device. Now, to ensure that the design is made in such a way that
the mobile devices with different operating systems can also run, then one
important question is that “Should we develop something hybrid which runs
across Mobile Operating Systems or Should the development be made for each
Mobile Operating System. Anyway, the most important thing is that , in the
Design phase itself, its better to do the Design keeping in view of Mobile
operating systems also.
51
An Overview of
Software Engineering 3.9 PATTERNS FOR DESIGN
According to Christopher Alexander, “A design pattern is a general repeatable
solution to a commonly occurring problem in software design”. It’s a general reusable
solution for problem that is occurring commonly in software design. The following are
different kinds of patterns:
• Architectural patterns
• Data patterns
• Component patterns
• Interface design patterns
• Webapp patterns
• Creational patterns
• Structural patterns
• Behavioral patterns
3.10 SUMMARY
Design is a process of translating analysis model to design models that are further
refined to produce detailed design models. The process of refinement is the process of
elaboration to provides necessary details to the programmer. Data design deals with
data structure selection and design. Modularity of program increases maintainability
and encourages parallel development. The aim of good modular design is to produce
highly cohesive and loosely coupled modules. Independence among modules is central
to modularity. Good user interface design helps software to interact effectivelyto
external environment. Tips for good interface design helps designer to achieve
effective user interface.
Quality is built into software during the design of software. Now a days, users prefer
that which gives them good experience. Alternatively, it can be said that the experience
should be pleasant and thrilling. For example, I prefer using a particular mobile device
as I am feeling convenient working with it though other mobile devices offer the same
features. So, the UX design is better in the mobile device with which I am feeling
comfortable. Now a days, more and more people are using their Mobile devices to do
anything that is possible to do using them. Hence, any software design should also
consider mobility. Then, in the case of any problem with the Design, there is need to
have solution for it. Design patterns take care of such issues. The final word is: Design
process should be given due weightage before rushing for coding.
3.11 SOLUTIONS/ANSWERS
52
• Good interface design minimizes user errors and increases userfriendliness of
the system.
2) True.
1) False
2) Common coupling
3) Functional.
2) Anticipation user error provides vital input for user interface design. Prevent
errors wherever possible and steps can be taken to design interface such that errors are
less likely to occur. The methods that may be adopted may include wellorganisation of
screen and menus functionally. Using user understandable language, designing screens
to be distinctive and making it difficult for users to commit irreversible actions.
Provide user confirmation to critical actions. Anticipate where user can go wrong and
design the interface keeping this in mind.
Reference Websites
http://www.ieee.org http://www.rspa.com
http://sdg.csail.mit.edu
https://en.wikipedia.org/wiki/Christopher_Alexander
53
Software Quality
UNIT 4 SOFTWARE QUALITY AND and Security
SECURITY
Structure
4.0 Introduction 54
4.1 Objectives 54
4.2 Software Quality 54
4.3 Formal Technical Review 58
4.4 Software Reliability 63
4.5 Software Quality Standards 64
4.6 Security Engineering 66
4.7 Summary 66
4.8 Solutions/Answers 66
4.9 Further Readings 67
4.0 INTRODUCTION
4. 1 OBJECTIVES
The purpose of this unit is to give an insight as to how software quality assurance
activity is undertaken in the software engineering process.
54
An Overview of Quality software is reasonably bug-free, delivered on time and within budget, meets
Software requirements and is maintainable. However, as discussed above, quality is a subjective
Engineering term. It will depend on who the „customer‟ is and their overall influence in the scheme
of things. Each type of „customer‟ will have their own slant on „quality‟. The end-user
might define quality as some thing which is user-friendly and bug-free.
Good quality software satisfies both explicit and implicit requirements. Software
quality is a complex mix of characteristics and varies from application to application
and the customer who requests for it.
Attributes of Quality
Completeness: The degree to which all of the software‟s required functions and
design constraints are present and fully developed in the requirements specification,
design document and code.
Correctness: The degree to which a system or component is free from faults in its
specification, design, and implementation. The degree to which software,
documentation, or other items meet specified requirements.
Feasibility: The degree to which the requirements, design, or plans for a system or
component can be implemented under existing constraints.
Predictability: The degree to which the functionality and performance of the software
are determinable for a specified set of inputs.
Robustness: The degree to which a system or component can function correctly in the
presence of invalid inputs or stressful environmental conditions.
Structuredness : The degree to which the SDD (System Design Document) and code
possess a definite pattern in their interdependent parts. This implies that the design has
proceeded in an orderly and systematic manner (e.g., top-down, bottom-up). The
modules are cohesive and the software has minimised coupling between modules.
Understandability: The degree to which the meaning of the SRS, SDD, and code are
clear and understandable to the reader.
55
Software Quality
and Security
Verifiability : The degree to which the SRS, SDD, and code have been written to
facilitate verification and testing.
Defect metrics
Maintainability metrics
Consider the graph of Figure 4.1. Each node represents one program segment and
edges represent the control flow. The complexity of the software module represented
by the graph can be given by simple formulae of graph theory as follows:
V(G) = e – n + 2 where
B C
56
An Overview of Applying the above equation the complexity V(G) of the graph is found to be 3.
Software
Engineering The cyclomatic complexity has been related to programming effort, maintenance
effort and debugging effort. Although cyclomatic complexity measures program
complexity, it fails to measure the complexity of a program without multiple
conditions.
The information flow within a program can provide a measure for program
complexity.
• To the extent it satisfies user requirements; they form the foundation to measure
software quality.
• Use of specific standards for building the software product. Standards could be
organisation‟s own standards or standards referred in a contractual agreement.
• Implicit requirements which are not stated by the user but are essential for quality
software.
2. Reviews the software development processes and products for software error
prevention and/ or controlled change to reduced functionality states; and
3. Defines the process for measuring and analysing defects as well as reliability and
maintainability factors.
Software engineers, project managers, customers and Software Quality Assurance
groups are involved in software quality assurance activity. The role of various groups
in software quality assurance are as follows:
57
Software Quality
• SQA group: They assist the software engineer in developing high quality and Security
product.They plan quality assurance activities and report the results of review.
Check Your Progress 1
1) What is auditability?
……………………………………………………………………………………
What is software Review ? Software review can‟t be defined as a filter for the software
engineering process. The purpose of any review is to discover errors in analysis,
design, coding, testing and implementation phase of software development cycle. The
other purpose of review is to see whether procedures are applied uniformly and in a
manageable manner.
Reviews are basically of two types, informal technical review and formal technical
review.
Validation : Validation typically involves actual testing and takes place after
verifications are completed.
58
An Overview of Objectives of Formal Technical Review
Software
Engineering • To uncover errors in logic or implementation
• To ensure that the software has been represented accruing to predefined standards
• To ensure that software under review meets the requirements
• To make the project more manageable.
Each Formal Technical Review (FTR) is conducted as a meeting and requires well
coordinated planning and commitments.
For the success of formal technical review, the following are expected:
• The schedule of the meeting and its agenda reach the members well in advance
• Members review the material and its distribution
• The reviewer must review the material in advance.
The meeting should consist of two to five people and should be restricted to not more
than 2 hours (preferably). The aim of the review is to review the product/work and the
performance of the people. When the product is ready, the producer (developer)
informs the project leader about the completion of the product and requests for
review. The project leader contacts the review leader for the review. The review
leader asks the reviewer to perform an independent review of the product/work before
the scheduled FTR.
Result of FTR
• Meeting decision
o Whether to accept the product/work without any modification
o Accept the product/work with certain changes
o Reject the product/work due to error
Checklist - Typical activities for review at each phase are described below:
Involvement of SQA team in both writing and reviewing the project management plan
in order to assure that the processes, procedures, and standards identified in the plan
are appropriate, clear, specific, and auditable.
During the software requirements phase, review assures that software requirements
are complete, testable, and properly expressed as functional, performance, and
interface requirements. The output of a software requirement analysis phase is
Software Requirements Specification (SRS). SRS forms the major input for review.
Compatibility
59
Software Quality
and Security
• Does the interface enables compatibility with external interfaces?
• Whether the specified models, algorithms, and numerical techniques are
compatible?
Completeness
Consistency
• Are the requirements consistent with each other? Is the SRS free of
contradictions?
• Whether SRS uses standard terminology and definitions throughout.
• Has the impact of operational environment on the software been specified in the
SRS?
Correctness
Traceability
Reviewers should be able to determine whether or not all design features are
consistent with the requirements. And, the program should meet the requirements. The
output of the software design phase is a system design document (SDD) and forms an
input for a Formal Technical Review.
Completeness
60
An Overview of • Whether all the requirements have been addressed in the SDD?
Software
Engineering
• Have the software requirements been properly reflected in software architecture?
• Are algorithms adequate, accurate, and complete?
• Does the design implement the required program behavior with respect to each
program interface?
• Does the design take into consideration all expected conditions?
• Does the design specify appropriate behaviour in case of an unexpected or
improper input and other abnormal conditions?
Consistency
• Are standard terminology and definitions used throughout the SDD? Is the style of
presentation and the level of detail consistent throughout the document.
• Does the design configuration ensure integrity of changes?
• Is there compatibility of the interfaces?
• Is the test documentation compatible with the test requirements of the SRS?
• Are the models, algorithms, and numerical techniques that are specified
mathematically compatible?
• Are input and output formats consistent to the extent possible?
• Are the designs for similar or related functions are consistent?
• Are the accuracies and units of inputs, database elements, and outputs that are
used together in computations or logical decisions compatible?
Correctness
Modifiability
• The modules are organised such that changes in the requirements only require
changes to a small number of modules.
• Functionality is partitioned into programs to maximize the internal cohesion of
programs and to minimize program coupling.
• Is the design structured so that it comprises relatively small, hierarchically related
programs or sets of programs, each performing a particular unique function?
• Does the design use a logical hierarchical control structure?
Traceability
Verifiability
• Does the SDD describe each function using well-defined notation so that the SDD
can be verified against the SRS
• Can the code be verified against the SDD?
• Are conditions, constraints identified so that test cases can be designed?
61
Software Quality
Review of Source Code and Security
The following checklist contains the kinds of questions a reviewer may take up during
source code review based on various standards
Completeness
Consistency
Correctness
Modifiability
Traceability
Understandability
62
An Overview of • Whether test plans are consistent and sufficient to test the functionality of the
Software systems.
Engineering • Whether non-conformance reporting and corrective action has been initiated?.
• Whether boundary value is being tested.
• Whether all tests are run according to test plans and procedures and any non-
conformances are reported and resolved?
• Are the test reports complete and correct?
• Has it been certified that testing is complete and software including
documentation are ready for delivery?
Installation phase
Completeness
Software Reliability: Unlike reliability of the hardware device, the term software
reliability is difficult to measure. In the software engineering environment, software
reliability is defined as the probability that software will provide failure-free operation
in a fixed environment for a fixed interval of time.
Possibly the greatest problem in the field of software reliability estimation has to do
with the accuracy of operational profiles. Without accurate profiles, estimates will
almost certainly be wrong. An operational profile is the probability density function
(over the entire input space) that best represents how the inputs would be selected
during the life-time of the software. There is nothing fancy about operational profiles;
they are really just “guesses” about what inputs will occur in the future.
63
Software Quality
and Security
Definitions of Software reliability
• IEEE Definition: The probability that software will not cause the failure of a
system for a specified time under specified conditions. The probability is a
function of the inputs to and use of the system in the software. The inputs to the
system determine whether existing faults, if any, are encountered.
• The failures are independent of each other, i.e., one failure has no impact on other
failure(s).
• The inputs are random samples.
• Failure intervals are independent and all software failures are observed.
• Time between failures is exponentially distributed.
The following formula gives the cumulative number of defects observed at a time „t‟.
D(t) = Td (1 – e –bct)
„b‟ and „c‟ are constants and depend on historical data of similar software for which
the model is being applied
MTTF(t) = e bct / c Td
SEI-CMM Level 4: Metrics are used to track productivity, processes, and products.
Project performance is predictable, and quality is consistently high.
ISO/IEC 14102 Guideline For the Evaluation and Selection of CASE Tools
IEC 60880 Software for Computers in the Safety Systems of Nuclear Power Stations
65
Software Quality
Check Your Progress 3 and Security
1) Success of a project depends on individual effort. At what stage of maturity doesthe
organisation‟s software process can be rated?
………………………………………………………………………………………………..
………………………………………………………………………………………………...
2) Why ISO 9001 : 2000 is called generic standard?
………………………………………………………………………………………………..
………………………………………………………………………………………………...
3) What is the difference between SEI CMM standards and ISO 9000 : 2000 standards?
………………………………………………………………………………………………..
………………………………………………………………………………………………...
4.7 SUMMARY
4.8 SOLUTIONS/ANSWERS
66
An Overview of
Software
2) Requirements.
Engineering
3) Software quality assurance activity is an umbrella activity comprising activities like
application of standards, technical methods, review, software testing, changecontrol,
measurement, control & reporting during the process of software development life cycle.
High quality product can come from high quality design specification. Unlike quality,
testing quality assurance can‟t be achieved at the end of the product completion phase.
1) No. The purpose of any review is to discover errors in the analysis, design, coding,
testing and maintenance phases of software development life cycle.
2) Solution to a problem.
3) Output of the software design phase is a system design document (SDD) and it is
an input for the Formal Technical Review.
Check Your Progress 3
Reference websites
http://www.rspa.com
http://www.ieee.org
https://en.wikipedia.org/wiki/Security_engineering
67
Software Project
UNIT 5 SOFTWARE PROJECT PLANNING Planning
5.0 Introduction 5
5.1 Objectives 5
5.2 Different Types of Project Metrics 5
5.3 Software Project Estimation 9
5.3.1 Estimating the Size
5.3.2 Estimating Effort
5.3.3 Estimating Schedule
5.3.4 Estimating Cost
5.4 Models for Estimation 13
5.4.1 COCOMO Model
5.4.2 Putnam‟s Model
5.4.3 Statistical Model
5.4.4 Function Points
5.5 Automated Tools for Estimation 15
5.6 Summary 17
5.7 Solutions/Answers 17
5.8 Further Readings 17
5.0 INTRODUCTION
5.1 OBJECTIVES
Need for Project metrics : Historically, the process of software development has been
witnessing inaccurate estimations of schedule and cost, overshooting delivery target
and productivity of software engineers in not commensurate with the growth of
demand. Software development projects are quite complex and there was no scientific
method of measuring the software process. Thus effective measurement of the process
was virtually absent. The following phrase is aptly describing the need for
measurement:
If you can not measure it, then, you can not improve it.
This is why measurement is very important to software projects. Without the process
of measurement, software engineering cannot be called engineering in the true sense.
Definition of metrics : Metrics deal with measurement of the software process and the
software product. Metrics quantify the characteristics of a process or a product.
Merics are often used to estimate project cost and project schedule.
Metrics can be broadly divided into two categories namely, product metrics and
process metrics.
Another way of classification of metrics are primitive metrics and derived metrics.
Primitive metrics are directly observable quantities like lines of code (LOC), number
of man-hours etc.
Derived metrics are derived from one or more of primitive metrics like lines of code
per man-hour, errors per thousand lines of code.
Now, let us briefly discuss different types of product metrics and process metrics.
Product metrics
Lines of Code(LOC) : LOC metric is possibly the most extensively used for
measurement of size of a program. The reason is that LOC can be precisely defined.
LOC may include executable source code and non-executable program code like
comments etc.
It is evident that the productivity of the developer engaged in Module 1 is more than
the productivity of the developer engaged in Module 2. It is important to note here
how derived metrics are very handy to project managers to measure various aspects of
the projects.
Although, LOC provides a direct measure of program size, at the same time, these
metrics are not universally accepted by project managers. Looking at the data in the
table below, it can be easily observed that LOC is not an absolute measure of
program size and largely depends on the computer language and tools used for
development activity.
The LOC of same module varies with the programming language used. Hence, just
LOC cannot be an indicator of program size. The data given in the above table is only
assumed and does not correspond to any module(s).
There are other attributes of software which are not directly reflected in Lines of Code
(LOC), as the complexity of the program is not taken into account in LOC and it
penalises well designed shorter program. Another disadvantage of LOC is that the
project manager is supposed to estimate LOC before the analysis and design is
complete.
Function point : Function point metrics instead of LOC measures the functionality of
the program. Function point analysis was first developed by Allan J. Albrecht in the
1970s. It was one of the initiatives taken to overcome the problems associated with
LOC.
• External inputs : A process by which data crosses the boundary of the system.
Data may be used to update one or more logical files. It may be noted that data
here means either business or control information.
• External outputs : A process by which data crosses the boundary of the system
to outside of the system. It can be a user report or a system log report.
• External user inquires : A count of the process in which both input and output
results in data retrieval from the system. These are basically system inquiry
processes.
• Internal logical files : A group of logically related data files that resides
entirely within the boundary of the application software and is maintained
7
Software Project through external input as described above.
Management
• External interface files : A group of logically related data files that are used
by the system for reference purposes only. These data files remain completely
outside the application boundary and are maintained by external applications.
For transactions like external input, external output and user inquiry, the ranking of
high, low and medium will be based on number of file updated for external inputs or
number of files referenced for external input and external inquiries. The complexity
will also depend on the number of data elements.
Also, External Inquiry, External Input and External output based on complexity can
be assigned numerical values like rating.
Similarly, external logical files and external interface files are assigned numerical
values depending on element type and number of data elements.
Organisations may develop their own strategy to assign values to various function
points. Once the number of function points have been identified and their significance
has been arrived at, the total function point can be calculated as follows.
• Function points can be used to estimate the size of a software application correctly
irrespective of technology, language and development methodology.
• User understands the basis on which the size of software is calculated as these are
derived directly from user required functionalities.
• Function points can be used to track and monitor projects.
• Function points can be calculated at various stages of software development
process and can be compared.
Other types of metrics used for various purposes are quality metrics which
include the following:
• Reliability metrics : These metrics measure mean time to failure. This can be
done by collecting data over a period of time.
Software project estimation is the process of estimating various resources required for
the completion of a project. Effective software project estimation is an important
activity in any software development project. Underestimating software project and
under staffing it often leads to low quality deliverables, and the project misses the
target deadline leading to customer dissatisfaction and loss of credibility to the
company. On the other hand, overstaffing a project without proper control will
increase the cost of the project and reduce the competitiveness of the company.
• Estimating the size of project. There are many procedures available for estimating
the size of a project which are based on quantitative approaches like estimating
Lines of Code or estimating the functionality requirements of the project called
Function point.
9
Software Project • Estimating total cost of the project depending on the above and other
Management
resources.
User requirements
Schedule
Constraints Software Project
estimation Effort
Cost
Organisational
policies, Standards
Estimating the size of the software to be developed is the very first step to make an
effective estimation of the project. Customer‟s requirements and system specification
forms a baseline for estimating the size of a software. At a later stage of the project,
system design document can provide additional details for estimating the overall size
of a software.
• The ways to estimate project size can be through past data from an earlier
developed system. This is called estimation by analogy.
• The other way of estimation is through product feature/functionality. The system
is divided into several subsystems depending on functionality, and size of each
subsystem is calculated.
Once the size of software is estimated, the next step is to estimate the effort based on
the size. The estimation of effort can be made from the organisational specifics of
software development life cycle. The development of any application software system
is more than just coding of the system. Depending on deliverable requirements, the
estimation of effort for project will vary. Efforts are estimated in number of man-
months.
10
Software Project
• The best way to estimate effort is based on the organisation‟s own historical data
Planning
of development process. Organizations follow similar development life cycle for
developing various applications.
Hardware cost
Cost estimation
Travel expenses Project cost
process
Training cost
Communication cost
and other cost
factors
Figure 5.2 : Cost estimation process
User requirements
Estimate Cost
11
Software Project Figure 5.3: Project estimation process
Management
Now, once the estimation is complete, we may be interested to know how accurate the
estimates are to reality. The answer to this is “we do not know until the project is
complete”. There is always some uncertainty associated with all estimation
techniques. The accuracy of project estimation will depend on the following:
The following are some of the reasons which make the task of cost estimation
difficult:
The following are some of the reasons for poor and inaccurate estimation:
If we elongate the project, we can reduce overall cost. Usually, long project durations
are not liked by customers and managements. There is always shortest possible
duration for a project, but it comes at a cost.
E = f (vi)
COCOMO stands for Constructive Cost Model. It was introduced by Barry Boehm.
It is perhaps the best known and most thoroughly documented of all software cost
estimation models. It provides the following three level of models:
• Detailed COCOMO : This model computes development effort and cost which
incorporates all characteristics of intermediate level with assessment of cost
implication on each step of development (analysis, design, testing etc.).
This model may be applied to three classes of software projects as given below:
• Organic : Small size project. A simple software project where the development
team has good experience of the application
In the COCOMO model, the development effort equation assumes the following form:
E = aSb m
where a and b are constraints that are determined for each model.
E = Effort
13
Software Project S = Value of source in LOC
Management
m = multiplier that is determined from a set of 15 cost driver‟s attributes.
The following are few examples of the above cost drivers:
Barry Boehm suggested that a detailed model would provide a cost estimate to the
accuracy of ± 20 % of actual value
P = Kt exp(t2/2T2) / T2
The Rayleigh-Norden curve is used to derive an equation that relates lines of code
delivered to other parameters like development time and effort at any time during the
project.
S = CkK1/3T4/3
From the data of a number of completed software projects, C.E. Walston and
C.P. Felix developed a simple empirical model of software development effort with
respect to number of lines of code. In this model, LOC is assumed to be directly
related to development effort as given below:
E = a Lb
a and b are parameters obtained from regression analysis of data. The final equation is
of the following form:
E = 5.2 L0.91
P = L/E
14
Software Project
Planning
Where P = Productivity Index
5.4.4 Function Points
It may be noted that COCOMO, Putnam and statistical models are based on LOC. A
number of estimation models are based on function points instead of LOC. However,
there is very little published information on estimation models based on function
points.
After looking at the above models for software project estimation, we have reason to
think of software that implements these models. This is what exactly the automated
estimation tools do. These estimation tools, which estimate cost and effort, allow the
project managers to perform “What if analysis”. Estimation tools may only support
size estimation or conversion of size to effort and schedule to cost.
There are more than dozens of estimation tools available. But, all of them have the
following common characteristics:
Reports
Size estimation Project
estimation Cost
Requirements tool
tools Schedule
Effort
No estimation tool is the solution to all estimation problems. One must understand
that the tools are just to help the estimation process.
Most models require an estimate of software product size. However, software size is
difficult to predict early in the development lifecycle. Many models use LOC for
sizing, which is not measurable during requirements analysis or project planning.
Although, function points and object points can be used earlier in the lifecycle, these
measures are extremely subjective.
Size estimates can also be very inaccurate. Methods of estimation and data collection
must be consistent to ensure an accurate prediction of product size. Unless the size
15
Software Project metrics used in the model are the same as those used in practice, the model will not
Management
yield accurate results (Fenton, 1997).
16
Software Project
Tool Tool vendor site Functionality/Remark Planning
http://www.costxpert.com/
5.6 SUMMARY
Estimation is an integral part of the software development process and should not be
taken lightly. A well planned and well estimated project is likely to be completed in
time. Incomplete and inaccurate documentation may pose serious hurdles to the
success of a software project during development and implementation. Software cost
estimation is an important part of the software development process. Metrics are
important tools to measure software product and process. Metrics are to be selected
carefully so that they provide a measure for the intended process/product. Models are
used to represent the relationship between effort and a primary cost factor such as
software product size. Cost drivers are used to adjust the preliminary estimate
provided by the primary cost factor. Models have been developed to predict software
cost based on empirical data available, but many suffer from some common problems.
The structure of most models is based on empirical results rather than theory. Models
are often complex and rely heavily on size estimation. Despite problems, models are
still important to the software development process. A model can be used most
effectively to supplement and corroborate other methods of estimation.
5.7 SOLUTIONS/ANSWERS
1. True
2. Time, Schedule
Reference websites
http://www.rspa.com
http://www.ieee.org
http://www.ncst.ernet.in
17
Software Project
Management UNIT 6 RISK MANAGEMENT AND
PROJECT SCHEDULING
Structure Page Nos.
6.0 Introduction 18
6.1 Objectives 18
6.2 Identification of Software Risks 18
6.3 Monitoring of Risks 20
6.4 Management of Risks 20
6.4.1 Risk Management
6.4.2 Risk Avoidance
6.4.3 Risk Detection
6.5 Risk Control 22
6.6 Risk Recovery 23
6.7 Formulating a Task Set for the Project 24
6.8 Choosing the Tasks of Software Engineering 24
6.9 Scheduling Methods 25
6.10 The Software Project Plan 27
6.11 Summary 28
6.12 Solutions/Answers 28
6.13 Further Readings 30
6.0 INTRODUCTION
As human beings, we would like life to be free from dangers, difficulties and any risks
of any type. In case a risk arises, we would take proper measures to recover as soon as
possible. Similarly, in software engineering, risk management plays an important role
for successful deployment of the software product. Risk management involves
monitoring of risks, taking necessary actions in case risk arises by applying risk
recovery methods.
6.1 OBJECTIVES
• Updates in the hardware resources: The team should be aware of the latest
updates in the hardware resources, such as latest CPU (Intel P4, Motorola
series, etc.), peripherals, etc. In case the developer makes a product, and later
in the market, a new product is released, the product should support minimum
features. Otherwise, it is considered a risk, and may lead to the failure of the
project.
• Extra support: The software should be able to support a set of a few extra
features in the vicinity of the product to be developed.
• External Risks: The software should have backup in CD, tapes, etc., fully
encrypted with full licence facilities. The software can be stored at various
important locations to avoid any external calamities like floods, earthquakes,
etc. Encryption is maintained such that no external persons from the team can
tap the source code.
19
Software Project
Management 6.3 MONITORING OF RISKS
Various risks are identified and a risk monitor table with attributes like risk name,
module name, team members involved, lines of code, codes affecting this risk,
hardware resources, etc., is maintained. If the project is continued further to 2-3
weeks, and then further the risk table is also updated. It is seen whether there is a
ripple effect in the table, due to the continuity of old risks. Risk monitors can change
the ordering of risks to make the table easy for computation. Table 6.1 depicts a risk
table monitor. It depicts the risks that are being monitored.
Table 6.1: Risk table monitor
The above risk table monitor has a risk in module compute () where there is a risk in
line 5, 8 and 20 in week 1. In week 2, risks are present in lines 5 and 25. Risks are
reduced in week 2. The priority 3 is set. Similarly, in the second row, risk is due to
more memory and peripherals, affecting module f1 (), f5 () in week-1. After some
modifications in week 2, module f2 () is affected and the priority is set to 1.
Start Risk
Manager
No • Risk Analysis
Risk Detection
• Risk Category
• Risk Prioritisation
Detect
• Risk Pending
Risk Control • Risk Resolution
• Risk Not Solvable
End Risk
Manager
21
Software Project From the Figure 6.1, it is clear that the first phase is to avoid risk by anticipating and
Management using tools from previous project history. In case there is no risk, risk manager halts.
In case there is risk, detection is done using various risk analysis techniques and
further prioritising risks. In the next phase, risk is controlled by pending risks,
resolving risks and in the worst case (if risk is not solved) lowering the priority.
Lastly, risk recovery is done fully, partially or an alternate solution is found.
Risk Anticipation: Various risk anticipation rules are listed according to standards
from previous projects’ experience, and also as mentioned by the project manager.
Risk tools: Risk tools are used to test whether the software is risk free. The tools have
built-in data base of available risk areas and can be updated depending upon the type
of project.
The risk detection algorithm detects a risk and it can be categorically stated as :
Risk Analysis: In this phase, the risk is analyzed with various hardware and software
parameters as probabilistic occurrence (pr), weight factor (wf) (hardware resources,
lines of code, persons), risk exposure (pr * wf).
Maximum value of risk exposure indicates that the problem has to solved as soon as
possible and be given high priority. A risk analysis table is maintained as shown
above.
Risk Category: Risk identification can be from various factors like persons involved in
the team, management issues, customer specification and feedback, environment,
commercial, technology, etc. Once proper category is identified, priority is given
depending upon the urgency of the product.
Risk Prioritisation: Depending upon the entries of the risk analysis table, the
maximum risk exposure is given high priority and has to be solved first.
Once the prioritisation is done, the next step is to control various risks as follows:
• Risk Pending: According to the priority, low priority risks are pushed at the end
of the queue with a view of various resources (hardware, man power, software)
and in case it takes more time their priority is made higher.
22
• Risk Resolution: Risk manager makes a strong resolve how to solve the risk. Risk Management and
Project Scheduling
• Risk elimination: This action leads to serious error in software.
• Risk transfer: If the risk is transferred to some part of the module, then risk
analysis table entries get modified. Thereby, again risk manager will control high
priority risk.
• Risk not solvable: If a risk takes more time and more resources, then it is dealt in
its totality in the business aspect of the organisation and thereby it is notified to
the customer, and the team member proposes an alternate solution. There is a
slight variation in the customer specification after consultation.
Full : The risk analysis table is scanned and if the risk is fully solved, then
corresponding entry is deleted from the table.
Partial : The risk analysis table is scanned and due to partially solved risks, the
entries in the table are updated and thereby priorities are also updated.
23
Software Project
Management 6.7 FORMULATING A TASK SET FOR THE
PROJECT
The objective of this section is to get an insight into project scheduling by defining
various task sets dependent on the project and choosing proper tasks for software
engineering.
Various static and dynamic scheduling methods are also discussed for proper
implementation of the project.
• Technical staff expertise: All staff members should have sufficient technical
expertise for timely implementation of the project. Meetings have to be
conducted, weekly and status reports are to be generated.
• Technology update : Latest tools and existing tested modules have to be used for
fast and efficient implementation of the project.
• Full or partial implementation of the project : In case, the project is very large
and to meet the market requirements, the organisation has to satisfy the customer
with at least a few modules. The remaining modules can be delivered at a later
stage.
• Time allocation : The project has to be divided into various phases and time for
each phase has to be given in terms of person-months, module-months, etc.
• Module binding : Module has to bind to various technical staff for design,
implementation and testing phases. Their necessary inter-dependencies have to be
mentioned in a flow chart.
• Milestones : The outcome for each phase has to be mentioned in terms of quality,
specifications implemented, limitations of the module and latest updates that can
be implemented (according to the market strategy).
Once the task set has been defined, the next step is to choose the tasks for software
project. Depending upon the software process model like linear sequential, iterative,
evolutionary model etc., the corresponding task is selected. From the above task set,
let us consider how to choose tasks for project development (as an example) as
follows:
• Scope : Overall scope of the project.
24
• Scheduling and planning : Scheduling of various modules and their milestones, Risk Management and
preparation of weekly reports, etc. Project Scheduling
Scheduling Techniques
The following are various types of scheduling techniques in software engineering are:
• Work Breakdown Structure : The project is scheduled in various phases
following a bottom-up or top-down approach. A tree-like structure is followed
without any loops. At each phase or step, milestone and deliverables are
mentioned with respect to requirements. The work breakdown structure shows the
overall breakup flow of the project and does not indicate any parallel flow.
Figure 6.2 depicts an example of a work breakdown structure.
Software Project
Maintenance
The project is split into requirement and analysis, design, coding, testing and
maintenance phase. Further, requirement and analysis is divided into R1,R2 ..
Rn; design is divided into D1,D2..Dn; coding is divided into C1,C2..Cn; testing is
divided into T1,T2.. Tn; and maintenance is divided into M1, M2.. Mn. If the project
25
Software Project is complex, then further sub division is done. Upon the completion of each stage,
Management integration is done.
• Flow Graph : Various modules are represented as nodes with edges connecting
nodes. Dependency between nodes is shown by flow of data between nodes.
Nodes indicate milestones and deliverables with the corresponding module
implemented. Cycles are not allowed in the graph. Start and end nodes indicate
the source and terminating nodes of the flow. Figure 6.3 depicts a flow graph.
M2
Start M1
M4 End
M3
M1 is the starting module and the data flows to M2 and M3. The combined data
from M2 and M3 flow to M4 and finally the project terminates. In certain
projects, time schedule is also associated with each module. The arrows indicate
the flow of information between modules.
• Gantt Chart or Time Line Charts : A Gantt chart can be developed for the
entire project or a separate chart can be developed for each function. A tabular
form is maintained where rows indicate the tasks with milestones and columns
indicate duration ( weeks/months) . The horizontal bars that spans across columns
indicate duration of the task. Figure 6.4 depicts a Gantt Chart. The circles indicate
the milestones.
26
2. Time taken to complete a project or module with minimum time (all Risk Management and
resources available), tmin . Project Scheduling
An average of tnormal, tmin, tmax and thistory is taken depending upon the project.
Sometimes, various weights are added as 4*tnormal, 5*tmin, 0.9*tmax and
2*thistory to estimate the time for a project or module. Parameter fixing is done by the
project manager.
1. Within the organisation: How the project is to be implemented? What are various
constraints(time, cost, staff) ? What is market strategy?
2. With respect to the customer: Weekly or timely meetings with the customer with
presentations on status reports. Customer feedback is also taken and further
modifications and developments are done. Project milestones and deliverables are
also presented to the customer.
• Select a project
o Identifying project’s aims and objectives
o Understanding requirements and specification
o Methods of analysis, design and implementation
o Testing techniques
o Documentation
• Budget allocation
o Exceeding limits within control
• Project Estimates
o Cost
o Time
o Size of code
o Duration
• Resource Allocation
o Hardware
o Software
o Previous relevant project information
o Digital Library
• Risk Management
o Risk Avoidance
o Risk Detection
27
Software Project o Risk Control
Management o Risk Recovery
• Scheduling techniques
o Work Breakdown Structure
o Activity Graph
o Critical path method
o Gantt Chart
o Program Evaluation Review Technique
• People
o Staff Recruitment
o Team management
o Customer interaction
• Quality control and standard
All of the above methods/techniques are not covered in this unit. The student is
advised to study references for necessary information.
6.11 SUMMARY
This unit describes various risk management and risk monitoring techniques. In case,
major risks are identified, they are resolved and finally risk recovery is done. Risk
manager takes care of all the phases of risk management. Various task sets are defined
for a project from the customer point of view, the developer’s point of view, the
market strategy view, future trends, etc. For the implementation of a project, a proper
task set is chosen and various attributes are defined. For successful implementation of
a project, proper scheduling (with various techniques) and proper planning are done.
6.12 SOLUTIONS/ANSWERS
Check Your Progress 1
1) Any problem that occurs during customer specification, design, coding,
implementation and testing can be termed as a risk. If they are ignored, then they
propagate further down and it is termed ripple effect. Risk management deals with
avoidance and detection of risk at every phase of the software development cycle.
28
2) Two risks involved with team members are as follows: Risk Management and
Project Scheduling
• Improper training of the technical staff.
• Lack of proper communication between the developers.
5) Risks can be prioritised upon their dependencies on other modules and external
factors. If a module is having many dependencies then its priority is given higher
value compared to independent modules. If a module often causes security failure
in the system, its priority can be set to a higher value.
2) Various phases of risk management are risk avoidance, risk detection, risk
analysis, risk monitoring, risk control and risk recovery.
3) Attributes mentioned in the risk analysis table are risk name, probability of
occurrence of risk, weight factor and risk exposure.
4) Risk resolution means taking final steps to free the module or system from risk.
Risk resolution involves risk elimination, risk transfer and disclosure of risk to the
customer.
5) Some times, it is difficult to recover from the risk and it is better to add extra
features or an alternate solutions keeping in view of customer specification with
slight modifications in order to match future trends in hardware and software
markets.
1) The two factors to formulate a task set for a software project are as follows:
• Customer satisfaction
• Full or partial implementation of the project
3) Gantt chart or time line chart indicates timely approach and milestone for each
task and their relevant sub tasks.
4) Software project plan indicates scope of the project, milestones and deliverables,
project estimates, resource allocation, risk management, scheduling techniques
and quality control and standard .
29
Software Project
Management 6.13 FURTHER READINGS
Reference websites
http://www.rspa.com
http://www.ieee.org
http://www.ncst.ernet.in
30
Software Testing
UNIT 7 SOFTWARE TESTING
Structure Page Nos.
7.0 Introduction 53
7.1 Objectives 54
7.2 Basic Terms used in Testing 54
7.2.1 Input Domain
7.2.2 Black Box and White Box testing Strategies
7.2.3 Cyclomatic Complexity
7.3 Testing Activities 64
7.4 Debugging 65
7.5 Testing Tools 67
7.6 Summary 68
7.7 Solutions/Answers 69
7.8 Further Readings 69
7.0 INTRODUCTION
Testing means executing a program in order to understand its behaviour, that is,
whether or not the program exhibits a failure, its response time or throughput for
certain data sets, its mean time to failure, or the speed and accuracy with which users
complete their designated tasks. In other words, it is a process of operating a system or
component under specified conditions, observing or recording the results, and making
an evaluation of some aspect of the system or component. Testing can also be
described as part of the process of Validation and Verification.
Validation is the process of evaluating a system or component during or at the end of
the development process to determine if it satisfies the requirements of the system, or,
in other words, are we building the correct system?
Verification is the process of evaluating a system or component at the end of a phase
to determine if it satisfies the conditions imposed at the start of that phase, or, in other
words, are we building the system correctly?
Software testing gives an important set of methods that can be used to evaluate and
assure that a program or system meets its non-functional requirements.
To be more specific, software testing means that executing a program or its
components in order to assure:
The correctness of software with respect to requirements or intent;
The performance of software under various conditions;
The robustness of software, that is, its ability to handle erroneous inputs and
unanticipated conditions;
The usability of software under various conditions;
The reliability, availability, survivability or other dependability measures of
software; or
Installability and other facets of a software release.
The purpose of testing is to show that the program has errors. The aim of most testing
methods is to systematically and actively locate faults in the program and repair them.
Debugging is the next stage of testing. Debugging is the activity of:
Determining the exact nature and location of the suspected error within
the program and
Fixing the error. Usually, debugging begins with some indication of the
existence of an error.
The purpose of debugging is to locate errors and fix them.
53
Software Project
Management 7.1 OBJECTIVES
Inputs passed in as parameters; Variables that are inputs to function under test
can be: (i) Structured data such as linked lists, files or trees, as well as atomic
data such as integers and floating point numbers;
54
(ii) A reference or a value parameter as in the C function declaration Software Testing
int P(int *power, int base) {
...}
Inputs entered by the user via the program interface;
Inputs that are read in from files;
Inputs that are constants and precomputed values; Constants declared in an
enclosing scope of function under test, for example,
#define PI 3.14159
double circumference(double radius)
{
return 2*PI*radius;
}
In general, the inputs to a program or a function are stored in program variables. A
program variable may be:
A variable declared in a program as in the C declarations
For example: int base; char s[];
Resulting from a read statement or similar interaction with the environment,
For example: scanf(„„%d\n‟‟, &x);
7.2.2 Black Box and White Box Test Case Selection Strategies
Black box Testing: In this method, where test cases are derived from the
functional specification of the system; and
White box Testing: In this method, where test cases are derived from the
internal design specifications or actual code (Sometimes referred to as Glass-
box).
Black box test case selection can be done without any reference to the program design
or the program code. Test case selection is only concerned with the functionality and
features of the system but not with its internal operations.
The real advantage of black box test case selection is that it can be done before
the design or coding of a program. Black box test cases can also help to get the
design and coding correct with respect to the specification. Black box testing
methods are good at testing for missing functions or program behavior that
deviates from the specification. Black box testing is ideal for evaluating
products that you intend to use in your systems.
The main disadvantage of black box testing is that black box test cases cannot
detect additional functions or features that have been added to the code. This is
especially important for systems that need to be safe (additional code may
interfere with the safety of the system) or secure (additional code may be used
to break security).
White box test cases are selected using the specification, design and code of the
program or functions under test. This means that the testing team needs access to the
internal designs or code for the program.
The chief advantage of white box testing is that it tests the internal details of the
code and tries to check all the paths that a program can execute to determine if a
problem occurs. White box testing can check additional functions or code that
has been implemented, but not specified.
The main disadvantage of white box testing is that you must wait until after
design and coding of the programs of functions under test have been completed
in order to select test cases.
55
Software Project Methods for Black box testing strategies
Management
A number of test case selection methods exist within the broad classification of black
box and white box testing.
For Black box testing strategies, the following are the methods:
Boundary-value Analysis;
Equivalence Partitioning.
We will also study State Based Testing, which can be classified as opaque box
selection strategies that is somewhere between black box and white box selection
strategies.
Boundary-value-analysis
The basic concept used in Boundary-value-analysis is that if the specific test cases are
designed to check the boundaries of the input domain then the probability of detecting
an error will increase. If we want to test a program written as a function F with two
input variables x and y., then these input variables are defined with some boundaries
like a1 ≤ x ≤ a2 and b1 ≤ y ≤ b2. It means that inputs x and y are bounded by two
intervals [a1, a2] and [b1, b2].
The following set of guidelines is for the selection of test cases according to the
principles of boundary value analysis. The guidelines do not constitute a firm set of
rules for every case. You will need to develop some judgement in applying these
guidelines.
1. If an input condition specifies a range of values, then construct valid test cases
for the ends of the range, and invalid input test cases for input points just
beyond the ends of the range.
2. If an input condition specifies a number of values, construct test cases for the
minimum and maximum values; and one beneath and beyond these values.
3. If an output condition specifies a range of values, then construct valid test cases
for the ends of the output range, and invalid input test cases for situations just
beyond the ends of the output range.
4. If an output condition specifies a number of values, construct test cases for the
minimum and maximum values; and one beneath and beyond these values.
5. If the input or output of a program is an ordered set (e.g., a sequential file, linear
list, table), focus attention on the first and last elements of the set.
Equivalence Partitioning
Equivalence Partitioning is a method for selecting test cases based on a partitioning of
the input domain. The aim of equivalence partitioning is to divide the input domain of
the program or module into classes (sets) of test cases that have a similar effect on the
program. The classes are called Equivalence classes.
Equivalence Classes
An Equivalence Class is a set of inputs that the program treats identically when the
program is tested. In other words, a test input taken from an equivalence class is
representative of all of the test inputs taken from that class. Equivalence classes are
determined from the specification of a program or module. Each equivalence class is
used to represent certain conditions (or predicates) on the input domain. For
equivalence partitioning it is usual to also consider valid and invalid inputs. The terms
input condition, valid and invalid inputs, are not used consistently. But, the following
definition spells out how we will use them in this subject. An input condition on the
input domain is a predicate over the values of the input domain. A Valid input to a
program or module is an element of the input domain that is expected to return a non-
error value. An Invalid input is an input that is expected to return an error value.
Equivalence partitioning is then a systematic method for identifying interesting input
conditions to be tested. An input condition can be applied to a set of values of a
specific input variable, or a set of input variables
as well.
A Method for Choosing Equivalence Classes
The aim is to minimize the number of test cases required to cover all of the identified
equivalence classes. The following are two distinct steps in achieving this goal:
Step 1: Identify the equivalence classes
If an input condition specifies a range of values, then identify one valid equivalence
class and two invalid equivalence classes.
For example, if an input condition specifies a range of values from 1 to 99, then, three
equivalence classes can be identified:
One valid equivalence class: 1< X < 99
Two invalid equivalence classes X < 1 and X > 99
Step 2: Choose test cases
The next step is to generate test cases using the equivalence classes identified in the
previous step. The guideline is to choose test cases on the boundaries of partitions and
test cases close to the midpoint of the partition. In general, the idea is to select at least
one element from each equivalence class.
57
Software Project Example 2: Selecting Test Cases for the Triangle Program
Management
In this example, we will select a set of test cases for the following triangle program
based on its specification. Consider the following informal specification for the
Triangle Classification Program. The program reads three integer values from the
standard input. The three values are interpreted as representing the lengths of the sides
of a triangle. The program then prints a message to the standard output that states
whether the triangle, if it can be formed, is scalene, isosceles, equilateral, or right-
angled. The specification of the triangle classification program lists a number of
inputs for the program as well as the form of output. Further, we require that each of
the inputs “must be” a positive integer. Now, we can determine valid and invalid
equivalence classes for the input conditions. Here, we have a range of values. If the
three integers we have called x, y and z are all greater than zero, then, they are valid
and we have the equivalence class.
ECvalid = f(x,y, z) x > 0 and y > 0 and z > 0.
For the invalid classes, we need to consider the case where each of the three variables
in turn can be negative and so we have the following equivalence classes:
ECInvalid1 = f(x, y, z) x < 0 and y > 0 and z > 0
ECInvalid2 = f(x, y, z) x > 0 and y <0 and z > 0
ECInvalid3 = f(x, y, z) x > 0 and y > 0 and z < 0
Note that we can combine the valid equivalence classes. But, we are not allowed to
combine the invalid equivalence classes. The output domain consists of the text
„strings‟ „isosceles‟, „scalene‟, „equilateral‟ and „right-angled‟. Now, different values
in the input domain map to different elements of the output domain to get the
equivalence classes in Table 7.2. According to the equivalence partitioning method we
only need to choose one element from each of the classes above in order to test the
triangle program.
58
Statement Coverage or Node Coverage: Every statement of the program Software Testing
should be exercised at least once.
Branch Coverage or Decision Coverage: Every possible alternative in a
branch or decision of the program should be exercised at least once. For if
statements, this means that the branch must be made to take on the values true
or false.
Decision/Condition Coverage: Each condition in a branch is made to evaluate
to both true and false and each branch is made to evaluate to both true and false.
Multiple condition coverage: All possible combinations of condition outcomes
within each branch should be exercised at least once.
Path coverage: Every execution path of the program should be exercised at
least once.
In this section, we will use the control flow graph to choose white box test cases
according to the criteria above. To motivate the selection of test cases, consider the
simple program given in Program 7.1.
Example 3:
void main(void)
{
int x1, x2, x3;
scanf("%d %d %d", &x1, &x2, &x3);
if ((x1 > 1) && (x2 == 0))
x3 = x3 / x1;
if ((x1 == 2) || (x3 > 1))
x3 = x3 + 1;
while (x1 >= 2)
x1 = x1 - 2;
printf("%d %d %d", x1, x2, x3);
}
To make the first branch true, we have test input (2; 0; 3) that will make all of the
branches true. We need a test input that will now make each one false. Again looking
at all of the conditions, the test input (1; 1; 1) will make all of the branches false.
For any of the criteria involving condition coverage, we need to look at each of the
five conditions in the program: C1 = (x1>1), C2 = (x2 == 0), C3 = (x1 == 2), C4 =
(x3>1) and C5 = (x1 >= 2). The test input (1; 0; 3) will make C 1 false, C2 true, C3
false, C4 true and C5 false.
Examples of sets of test inputs and the criteria that they meet are given in Table 7.3.
The set of test cases meeting the multiple condition criteria is given in Table 7.4. In
the table, we let the branches B1 = C1&&C2, B2 = C3||C4 and B3 = C5.
59
Software Project Start
Management
int x1,x2,x3
A
scanf("%d %d %d", &x1, &x2, & x3)
True x3 = x3/x1
(x1>1) && C
(x2==0)
False
(x1==2) || True
(x3 >1) x3 = x3+1;
E
False
x1>= 2
True x1 = x1 - 2; G
False
End
Table 7.3: Test cases for the various coverage criteria for the program 7.1
60
Table 4.4: Multiple condition coverage for the program in Figure 7.1 Software Testing
Test C1 C2 C3 C4 B2 B3
cases x1 > 1 x2==0 B1 x1==2 x3 > 1 C5
x1 ≥ 2
(1,0,3) F T F F T T F
(2,1,1) T F F T F F T
(2,0,4) T T T T T T T
(1,1,1) F F F F F F F
(2,0,4) T T T T T T T
(2,1,1) T F F T F T T
(1,0,2) F T F F T T F
(1,1,1) F F F F F F F
61
Software Project Program 7.2: A program
Management
In the above program, two control constructs are used, namely, while-loop and
if-then-else. A complete CFG for the program of Program 7.2 is given below:
(Figure 4.6).
3 4
1. The results of the program were affected by the code change and the test suite
detects it. We assumed that the test suite is perfect, which means that it must
detect the change. If this happens, the mutant is called a killed mutant.
2. The results of the program are not changed and the test suite does not detect the
mutation. The mutant is called an equivalent mutant.
If we take the ratio of killed mutants to all the mutants that were created, we get a
number that is smaller than 1. This number gives an indication of the sensitivity of
program to the changes in code. In real life, we may not have a perfect program and
we may not have a perfect test suite. Hence, we can have one more scenario:
3. The results of the program are different, but the test suite does not detect it
because it does not have the right test case.
62
Consider the following program 4.3: Software Testing
Now, let‟s mutate the program. We can start with the following simple changes:
63
Software Project # killed Mutants
Management × 100
# total mutants - # equivalent mutants
7.4 DEBUGGING
Debugging occurs as a consequence of successful testing. Debugging refers to the
process of identifying the cause for defective behavior of a system and addressing that
problem. In less complex terms - fixing a bug. When a test case uncovers an error,
debugging is the process that results in the removal of the error. The debugging
process begins with the execution of a test case. The debugging process attempts to
match symptoms with cause, thereby leading to error correction. The following are
two alternative outcomes of the debugging:
1. The cause will be found and necessary action such as correction or removal will
be taken.
2. The cause will not be found.
Characteristics of bugs
1. The symptom and the cause may be geographically remote. That is, the
symptom may appear in one part of a program, while the cause may
actually be located at a site that is far removed. Highly coupled program
structures exacerbate this situation.
2. The symptom may disappear (temporarily) when another error is corrected.
3. The symptom may actually be caused by non errors (e.g., round-off
inaccuracies).
4. The symptom may be caused by human error that is not easily traced.
5. The symptom may be a result of timing problems, rather than processing
problems.
6. It may be difficult to accurately reproduce input conditions (e.g., a real-time
application in which input ordering is indeterminate).
7. The symptom may be intermittent. This is particularly common in embedded
systems that couple hardware and software inextricably.
8. The symptom may be due to causes that are distributed across a number of
tasks running on different processors.
65
Software Project Life Cycle of a Debugging Task
Management
The following are various steps involved in debugging:
a) Defect Identification/Confirmation
A problem is identified in a system and a defect report created
Defect assigned to a software engineer
The engineer analyzes the defect report, performing the following actions:
What is the expected/desired behaviour of the system?
What is the actual behaviour?
Is this really a defect in the system?
Can the defect be reproduced? (While many times, confirming a defect is
straight forward. There will be defects that often exhibit quantum
behaviour.)
b) Defect Analysis
Assuming that the software engineer concludes that the defect is genuine, the focus
shifts to understanding the root cause of the problem. This is often the most
challenging step in any debugging task, particularly when the software engineer is
debugging complex software.
Many engineers debug by starting a debugging tool, generally a debugger and try to
understand the root cause of the problem by following the execution of the program
step-by-step. This approach may eventually yield success. However, in many
situations, it takes too much time, and in some cases is not feasible, due to the
complex nature of the program(s).
c) Defect Resolution
Once the root cause of a problem is identified, the defect can then be resolved by
making an appropriate change to the system, which fixes the root cause.
Debugging Approaches
Three categories for debugging approaches are:
Brute force
Backtracking
Cause elimination.
Brute force is probably the most popular despite being the least successful. We apply
brute force debugging methods when all else fails. Using a “let the computer find the
error” technique, memory dumps are taken, run-time traces are invoked, and the
program is loaded with WRITE statements. Backtracking is a common debugging
method that can be used successfully in small programs. Beginning at the site where a
symptom has been uncovered, the source code is traced backwards till the error is
found. In Cause elimination, a list of possible causes of an error are identified and
tests are conducted until each one is eliminated.
The following are different categories of tools that can be used for testing:
Data Acquisition: Tools that acquire data to be used during testing.
Static Measurement: Tools that analyse source code without executing test
cases.
Dynamic Measurement: Tools that analyse source code during execution.
Simulation: Tools that simulate functions of hardware or other externals.
Test Management: Tools that assist in planning, development and control of
testing.
Cross-Functional tools: Tools that cross the bounds of preceding categories.
The following are some of the examples of commercial software testing tools:
Rational Test Real Time Unit Testing
Kind of Tool
Rational Test RealTime's Unit Testing feature automates C, C++ software
component testing.
Organisation
IBM Rational Software
Software Description
Rational Test RealTime Unit Testing performs black-box/functional testing, i.e.,
verifies that all units behave according to their specifications without regard to how
that functionality is implemented. The Unit Testing feature has the flexibility to
naturally fit any development process by matching and automating developers' and
testers' work patterns, allowing them to focus on value-added tasks. Rational Test
RealTime is integrated with native development environments (Unix and Windows)
as well as with a large variety of cross-development environments.
Platforms
Rational Test RealTime is available for most development and target systems
including Windows and Unix.
AQtest
Kind of Tool
Automated support for functional, unit, and regression testing
Organisation
AutomatedQA Corp.
Software Description
AQtest automates and manages functional tests, unit tests and regression tests, for
applications written with VC++, VB, Delphi, C++Builder, Java or VS.NET. It also
supports white-box testing, down to private properties or methods. External tests can
be recorded or written in three scripting languages (VBScript, JScript, DelphiScript).
Using AQtest as an OLE server, unit-test drivers can also run it directly from
application code. AQtest automatically integrates AQtime when it is on the machine.
Entirely COM-based, AQtest is easily extended through plug-ins using the complete
IDL libraries supplied. Plug-ins currently support Win32 API calls, direct ADO
access, direct BDE access, etc.
Platforms
Windows 95, 98, NT, or 2000.
67
Software Project csUnit
Management
Kind of Tool
“Complete Solution Unit Testing” for Microsoft .NET (freeware)
Organisation
csUnit.org
Software Description
csUnit is a unit testing framework for the Microsoft .NET Framework. It
targets test driven development using .NET languages such as C#, Visual
Basic .NET, and managed C++.
Platforms
Microsoft Windows
Sahi
http://sahi.sourceforge.net/
Software Description
Sahi is an automation and testing tool for web applications, with the facility to record
and playback scripts. Developed in Java and JavaScript, it uses simple JavaScript to
execute events on the browser. Features include in-browser controls, text based
scripts, Ant support for playback of suites of tests, and multi-threaded playback. It
supports HTTP and HTTPS. Sahi runs as a proxy server and the browser needs to use
the Sahi server as its proxy. Sahi then injects JavaScript so that it can access elements
in the webpage. This makes the tool independant of the website/ web application.
Platforms
OS independent. Needs at least JDK1.4
7.6 SUMMARY
The importance of software testing and its impact on software is explained in this unit.
Software testing is a fundamental component of software development life cycle and
represents a review of specification, design and coding. The objective of testing is to
have the highest likelihood of finding most of the errors within a minimum amount of
time and minimal effort. A large number of test case design methods have been
developed that offer a systematic approach to testing to the developer.
Knowing the specified functions that the product has been designed to perform, tests
can be performed that show that each function is fully operational. A strategy for
software testing may be to move upwards along the spiral. Unit testing happens at the
vortex of the spiral and concentrates on each unit of the software as implemented by
the source code. Testing happens upwards along the spiral to integration testing,
where the focus is on design and production of the software architecture. Finally, we
perform system testing, where software and other system elements are tested together.
Debugging is not testing, but always happens as a response of testing. The debugging
process will have one of two outcomes:
1) The cause will be found, then corrected or removed, or
2) The cause will not be found. Regardless of the approach that is used, debugging
has one main aim: to determine and correct errors. In general, three kinds of
debugging approaches have been put forward: Brute force, Backtracking and
Cause elimination.
68
Software Testing
7.7 SOLUTIONS / ANSWERS
Check Your Progress 1
1) Cyclomatic Complexity is asoftware metric that provides a quantitative
measure of the logical complexity of a program. When it is used in the context
of the basis path testing method, the value computed for Cyclomatic complexity
defines the number of independent paths in the basis set of a program. It also
provides an upper bound for the number of tests that must be conducted to
ensure that all statements have been executed at least once.
1) The basic levels of testing are: unit testing, integration testing, system
testing and acceptance testing.
For unit testing, structural testing approach is best suited because the focus of testing
is on testing the code. In fact, structural testing is not very suitable for large programs.
It is used mostly at the unit testing level. The next level of testing is integration testing
and the goal is to test interfaces between modules. With integration testing, we move
slowly away from structural testing and towards functional testing. This testing
activity can be considered for testing the design. The next levels are system and
acceptance testing by which the entire software system is tested. These testing levels
focus on the external behavior of the system. The internal logic of the program is not
emphasized. Hence, mostly functional testing is performed at these levels.
2) The various steps involved in debugging are:
Defect Identification/Confirmation
Defect Analysis
Defect Resolution
69
Software Project 3) An Integrated approach to Software Engineering, Pankaj Jalote; Narcosis
Management Publishing House.
Reference websites
http://www.rspa.com
http://www.ieee.org
http://standards.ieee.org
http://www.ibm.com
http://www.opensourcetesting.org
70
Software Change
UNIT 8 SOFTWARE CHANGE Management
MANAGEMENT
Structure Page Nos.
8.0 Introduction 45
8.1 Objectives 45
8.2 Baselines 45
8.3 Version Control 48
8.4 Change Control 51
8.5 Auditing and Reporting 54
8.6 Summary 56
8.7 Solutions/Answers 56
8.8 Further Readings 56
8.0 INTRODUCTION
Software change management is an umbrella activity that aims at maintaining the
integrity of software products and items. Change is a fact of life but uncontrolled
change may lead to havoc and may affect the integrity of the base product. Software
development has become an increasingly complex and dynamic activity. Software
change management is a challenging task faced by modern project managers,
especially in a environment where software development is spread across a wide
geographic area with a number of software developers in a distributed environment.
Enforcement of regulatory requirements and standards demand a robust change
management. The aim of change management is to facilitate justifiable changes in the
software product.
8.1 OBJECTIVES
8.2 BASELINES
System specification
Source code
Object code
Drawing
Software design
45
Software Project Design data
Management Database schema and file structure
Test plan and test cases
Product specific documents
Project plan
Standards procedures
Process description
approved approved
Baseline 1 changes Baseline 2 changes Baseline 3
The domain of software change management process defines how to control and
manage changes.
46
A formal process of change management is acutely felt in the current scenario when Software Change
the software is developed in a very complex distributed environment with many Management
versions of a software existing at the same time, many developers involved in the
development process using different technologies. The ultimate bottomline is to
maintain the integrity of the software product while incorporating changes.
Process of changes: As we have discussed, baseline forms the reference for any
change. Whenever a change is identified, the baseline which is available in project
database is copied by the change agent (the software developer) to his private area.
Once the modification is underway the baseline is locked for any further modification
which may lead to inconsistency. The records of all changes are tracked and recorded
in a status accounting file. After the changes are completed and the changes go
through a change control procedure, it becomes a approved item for updating the
original baseline in the project database.
Configuration
status
accounting file
All the changes during the process of modification are recorded in the configuration
status accounting file. It records all changes made to the previous baseline B to reach
the new baseline B’. The status accounting file is used for configuration authentication
which assures that the new baseline B’ has all the required planned and approved
changes incorporated. This is also known as auditing.
47
Software Project Check Your Progress 1
Management
1) serves as reference for any change.
Project identifier
Configuration item (or simply item, e.g. SRS, program, data model)
Change number or version number
The identification of the configuration item must be able to provide the relationship
between items whenever such relationship exists.
The identification process should be such that it uniquely identifies the configuration
item throughout the development life cycle, such that all such changes are traceable to
the previous configuration. An evolutionary graph graphically reflects the history of
all such changes. The aim of these controls is to facilitate the return to any previous
state of configuration item in case of any unresolved issue in the current unapproved
version.
Ver
1.4
Ver
1.3
Ver Ver
2.0 2.1
Software engineers use this version control mechanism to track the source code,
documentation and other configuration items. In practice, many tools are available to
store and number these configuration items automatically. As software is developed
and deployed, it is common to expect that multiple versions of the same software are
deployed or maintained for various reasons. Many of these versions are used by
developers to privately work to update the software.
It is also sometimes desirable to develop two parallel versions of the same product
where one version is used to fix a bug in the earlier version and other one is used to
develop new functionality and features in the software. Traditionally, software
developers maintained multiple versions of the same software and named them
uniquely by a number. But, this numbering system has certain disadvantages like it
does not give any idea about a nearly identical versions of the same software which
may exist.
The project database maintains all copies of the different versions of the software and
other items. It is quite possible that without each other’s knowledge, two developers
may copy the same version of the item to their private area and start working on it.
Updating to the central project database after completing changes will lead to
overwriting of each other’s work. Most version control systems provide a solution to
this kind of problem by locking the version for further modification.
Commercial tools are available for version control which performs one or more of
following tasks;
There are many commercial tools like Rational ClearCase, Microsoft Visual
SourceSafe and a number of other commercial tools to help version control.
Let us consider the following simple HTML file in a web based application
(welcome.htm)
<html>
<head>
<Title> A simple HTML Page</title>
</head>
<body>
<h1> Welcome to HTML Concepts</h1>
</body>
</html>
49
Software Project Once the code is tested and finalized, the first step is to register the program to he
Management project database. The revision is numbered and this file is marked read-only to prevent
any further undesirable changes. This forms the building block of source control. Each
time the file is modified, a new version is created and a new revision number is given.
The first version of the file is numbered as version 1.0. Any further modification is
possible only in the developer’s private area by copying the file from the project
database. The process of copying the configuration object (the baseline version) is
called check-out.
Check-out
Project Developer
database private area
Check-in
The version (revision) control process starts with registering the initial versions of the
file. This essentially enforces a check on the changes which ensure that the file can’t
be changed unless it is checked-out from the project database.
<hr>
a href=mailto:[email protected]> webmaster</a>
<hr>
Then the developer check-in’s the revised version of the file to the project database
with a new version (revision) number version 1.1 i.e. the first revision along with the
details of the modification done.
Suppose further modification is required for text-based browser as graphic will not be
supported by text-based browser. Then the version 1.1 will be selected from the
project database. This shows the necessity of storing all versions of the file in the
project database.
3) How do version control systems ensure that two software developers do not
attempt the same change at the same time?
………………………………………………………………………………………
……………………………………………………………………………………...
The adoption and evolution of changes are carried out in a disciplined manner. In a
large software environment where, as changes are done by a number of software
developers, uncontrolled and un-coordinated changes may lead to havoc grossly
diverting from the basic features and requirements of the system. For this, a formal
change control process is developed.
A change request starts as a beginning of any change control process. The change
request is evaluated for merits and demerits, and the potential side effects are
evaluated. The overall impact on the system is assessed by the technical group
consisting of the developer and project manager. A change control report is
generated by the technical team listing the extent of changes and potential side effects.
A designated team called change control authority makes the final decision, based on
the change control report, whether to accept or reject the change request.
A change order called engineering change order is generated after the approval of the
change request by the change control authority. The engineering change order forms
the starting point of effecting a change in the component. If the change requested is
51
Software Project not approved by the change control authority, then the decision is conveyed to the user
Management or the change request generator.
Once, change order is received by the developers, the required configuration items are
identified which require changes. The baseline version of configuration items are
copied from the project data base as discussed earlier.
The changes are then incorporated in the copied version of the item. The changes are
subject to review (called audit) by a designated team before testing and other quality
assurance activity is carried out. Once the changes are approved, a new version is
generated for distribution.
The change control mechanisms are applied to the items which have become
baselines. For other items which are yet to attain the stage of baseline, informal
change control may be applied. For non- baseline items, the developer may make
required changes as he feels appropriate to satisfy the technical requirement as long as
it does not have an impact on the overall system.
The role of the change control authority is vital for any item which has become a
baseline item. All changes to the baseline item must follow a formal change control
process.
As discussed, change request, change report and engineering change order (change
order) are generated as part of the change control activity within the software change
management process. These documents are often represented inprinted or electronic
forms. The typical content of these documents is given below:
1.2 Requester and contact details: The name of the person requesting the change
and contact details
2.2 Justification for the change : Detailed justification for the request.
2.3 Priority : The priority of the change depending on critical effect on system
functionalities.
52
Software Change Report Format Software Change
Management
1.0 Change report Identification
1.2 Requester: The name and contact details of the person requesting the change.
1.3 Evaluator : The name of the person or team who evaluated the change request.
2.3.2 Technical risks : The risks associated with making the change are
described.
4.0 Recommendation
4.2 Internal priority: How important is this change in the light of the business
operation and priority assigned by the evaluator.
2.2.1 Technical work and tools required : A description of the work and tools
required to accomplish the change.
2.3 Technical risks: The risks associated with making the change are described in
this section.
A description of the testing and review approach required to ensure that the change
has been made without any undesirable side effects.
Description of the test plans and new tests that are required.
Version control mechanism helps the software tester to track the previous version of
the product, thereby giving emphasis on testing of the changes made since the last
approved changes. It helps the developer and tester to simultaneously work on
multiple versions of the same product and still avoid any conflict and overlapping of
activity.
The software change management process is used by the managers to keep a control
on the changes to the product thereby tracking and monitoring every change. The
existence of a formal process reassures the management. It provides a professional
approach to control software changes.
It also provides confidence to the customer regarding the quality of the product.
Auditing and Reporting helps change management process to ensure whether the
changes have been properly implemented or not, whether it has any undesired impact
on other components. A formal technical review and software configuration audit
helps in ensuring that the changes have been implemented properly during the change
process.
Whether the changes as identified and reported in the change order have been
incorporated?
Whether the procedure for identifying, recording and reporting changes has been
followed.
Reporting: Status reporting is also called status accounting. It records all changes that
lead to each new version of the item. Status reporting is the bookkeeping of each
release. The process involves tracking the change in each version that leads the
latest(new) version.
8.6 SUMMARY
8.7 SOLUTIONS/ANSWERS
Check Your Progress 1
1) Baseline.
2) The domain of software change management process defines how to control and
manage changes. The ultimate aim is to maintain the integrity of the software
product while incorporating changes.
Check Your Progress 2
1) Microsoft Visual SourceSafe
2) Yes
3) Version control system locks the configuration item once it is copied from project
database for modification by a developer.
57
Web Software
UNIT 9 WEB SOFTWARE ENGINEERING Engineering
9.0 INTRODUCTION
Today’s Internet age has brought about a large demand for services that can be
delivered over the network. These services rely in large measure on web software
applications that can be accessed concurrently by many users. Increasing competition
has meant that vendors want shorter and shorter cycle times for producing new
products in any sphere, but in the arena of web based services, the situation is
extreme. Instead of years or even months, new applications have to be readied and
deployed in weeks, before someone else does so. Such pressures are compounded by
the need to have high quality software as no one will visit a buggy website for the
second time.
9.1 OBJECTIVES
After going through this unit, you should be able to:
6
Portals that are merely gateways to different kinds of websites Web Software
Engineering
Commercial sites that allow transactions
Those that allow searches.
9.2.2 Development, Testing and Deployment
Although many basic processes and methodologies do not change, there are some
features of the development cycle of web applications that are different. While some
of these will be looked at in more detail later in the unit, we need to understand these
features to be able to effectively develop a web application project.
Development
The development of such an application has to take into account the fact that there is
now one more element in the whole behaviour of the application – the network. The
element of communication could be ignored in conventional software, but it plays a
pivotal role in web based projects. Different users can be using networks that are
slow or fast and everything in between. Networks are not fully reliable and
communication lines do drop or fluctuate in their speed. While network protocols will
take care of the issues of data reliability, this comes at the cost of uniform speed.
Designers of web applications need to take care of situations like race conditions, lost
connections, timeouts and all the other tiresome realities of wide area networks.
Web applications, if used over the Internet, can potentially have a very large number
of users. So we need to be careful about matters like machine configurations and
sizing. It is also frequently necessary to have a scalable architecture that can be
upgraded as application loads rise with the growing popularity of the site. And if the
site becomes really popular, this need can be very frequent indeed!
Testing
The testing of web applications has its own difficulties, caused mainly by the variable
speed with which inputs reach the server and responses reach the user over the World
Wide Web. It is hard to simulate real Internet like conditions in test environments that
are typically based on a local area network.
Testing tools do exist that allow inputs to be sent from machines located in different
parts of the world to the application. While comparatively expensive, they do allow
for realistic testing of the applications. There are other ways of testing the
applications by trying to simulate delays and other conditions of the real Internet. To
be able to obtain best, average and worst case response times, it is necessary to run
tests many times. Automated testing is important for such load, performance and
stress tests. They cannot be realistically performed manually.
Although interoperability and consistency are assumed to be the good features of
standardized browsers and databases, in practice there are several problems that can
arise because of the differing behaviour of browsers caused by–
7
Web, Mobile and CASE tools
appropriate fixes have to be made to the application as bugs are discovered and
reported during field use.
Deployment
In most conventional application rollouts, there is often a fair degree of control
available to the developers because of the possibility of limiting access. Limited
releases to a select test group can be made so that the most obvious and common
errors and annoyances are taken care of before the regular release. But in a web
application that works over the Internet, it can be difficult to do such tests. True,
access can be limited by not publicising the URL at which the application is available,
or by having access control in some form that is known only to the select band of
users in the test group. Still, since the application is to be available publicly, there is a
conflict between the small group which gets early access and the possibility of
realistic testing. The very characteristic of a web application is having a large body of
concurrent users.
We have already mentioned the need for scalability in the hardware. This is
particularly important in terms of storage. We need to be careful that we do not
quickly run out of space, for example, in an e-mail or storage site. Besides, it might
be important to have the capability to beef up the bandwidth available to the server
that is hosting the application, lest it get swamped by user requests.
9.2.3 Usage of Web Applications
Applications hosted on the web are meant to be used by lay users who may have little
knowledge of computers. Conventional applications also have to deal with usage by
non- technical people, but there we can often organise training or help desks to take
care of any problems that may arise. That possibility is not available for a web based
application. Because, we cannot reach and train all of our target audience, even if it
were possible to identify them individually. As any developer with a little experience
knows, users can “exercise” software in ways that were never anticipated.
Normally, if a user comes across difficulties while using the application, she could be
expected to report the problem to the appropriate group in the organisation or to the
vendor responsible for maintaining and deploying the software. But in the case of an
application on the web, the user may simply give up and just not come back to the site
if she is not able to work the page, and that too in the first few seconds. Or, her
network connection might break while trying to use the site, and that could well be her
last visit. So, the tolerance level of users is exceptionally low in such applications.
Users can also be expected to want a fast response and if some operation is likely to
take more than a few seconds, it will be best to keep them informed. Feedback on the
state of a request is also necessary, as also instructions on what to do if they are
disconnected in the middle of a long operation.
An application on the web is much more likely to be internationalised as it might have
to cater to the needs of users from different parts of the world. You may be shutting
out a large number of potential visitors to your application if you restrict yourself to
any particular language. You should also expect to see little data entry and as much as
possible of features such as auto completion, drop down menus, look up tables and the
like.
9.2.4 Maintaining Web Applications
The maintenance of web applications has its own set of challenges. Frequent changes
to the presentation, or look and feel are expected. Many of the static text pages may
need updating ever so often and some of the content could be changing daily or
hourly. So the task of maintenance has to expand to take care of changing content and
this can be a major exercise in some sites. Business rules could also be volatile, with
new schemes and packages being frequently invented to entice the users. It means
that the maintainers have to take care of frequently changing the business logic with
little change to the other layers.
8
People are sensitive about sites that are perceived as not trendy enough and Web Software
expectations are high as regards features, good looks and easily usable interfaces. Engineering
One might have to work hard at changing and upgrading these to keep up with the
latest advances. If a site is not changed for more than a few months, it will not be
looked upon as live or up to date. So, taking care of a web application is often much
more than just fixing bugs or updating the software to implement changes to business
rules. There is a fair amount of effort that has to be put in to improve usability.
9.2.5 Designing Web Applications
Since web applications are layered, we get a simplified design that can be easily
maintained and altered. However, that also produces the corresponding need to
design the different components to be generalised enough so that they can be useful to
a larger audience. Applications could be running under the control of an application
server for which the designers have to create and implement the requisite beans. For
some purposes, beans can be purchased from other software vendors or they could
have to be written from scratch for the application.
These days, some functionality in the application could be coming out of web
services, components on the web that can run with your application and that provide
defined behavior. An application could look for an available web service that can do
some needed action. Web services advertise their available functionality that needy
applications can tap. This distributed nature of the application greatly increases the
amount of reusability, but brings about problems of security and reliability.
The user interface in a web application is very important indeed and can often be the
tipping point in the success of a website. Ease of use and ergonomic considerations
are important. The application has to be able to cater to users of disparate skill levels
and in some countries may be required to provide access to people with disabilities.
All the above characteristics need to be kept in mind when planning and otherwise
managing a web based application project.
🖝 Check Your Progress 1
1) The can bring about much greater flexibility and
simplicity in design, maintenance and usage of web applications.
2) One of the significant characteristics of a Web Application is to have a large
number of users.
9
Web, Mobile and CASE tools
University, Pittsburgh, USA. Let us look now at some of the basic, common
principles of software management practice.
Managing Requirements
It is very important in any project to have a clear understanding of the requirements
shared with the customer. Very often the developers have no notion of how the
software will be used or what would be nice for the user to have. While a
requirements document might be prepared and approved by the customer, there are
many issues that are hard to capture in any document, despite having detailed
discussion with customer. To ensure that the viewpoints of the developers and
customer do not diverge, regular communication is a must. Finer points that could not
be captured in the documentation have to be understood by the project team through
proper coordination with the customer. Here the customer could be an external party
or could be another group within the same organisation, in which case it is an internal
customer.
Even if we achieve a good understanding of the requirements, software projects are
notorious for changes. This means that we must have a good system of tracking
requirements as they change. The rest of the artifacts in the project must reflect the
changes that have occurred in the requirements.
Managing the Project
The essence of managing the project is proper planning for the project and then
executing the project according to the plan. If the project deviates from the plan, we
need to take corrective action or change the plan. We must always be proactive and
keep looking for the risks in the project, rather than react to problems after they have
arisen. We should try to anticipate what can go wrong and take action accordingly.
Here a plan needs to keep something apart from the schedule of the project.
The project plan is the basic document used to execute the project and has all the
required information about it. It should be the guiding document for the project and
hence must be kept up to date. Some of the items of information in the plan could be–
Background information and context
Customer and other stakeholder information
Estimates of cost, effort and duration
Dependencies on outside groups
Resource requirements – equipment and people
Methodology to be used to do the project
How the project will be monitored.
Schedule.
Besides the project management plan, there are various subordinate plans that need to
be made for different aspects of the project, such as,
Configuration Management Plan
Quality Assurance Plan that covers audits and process compliance
Quality Control Plan that covers technical reviews and testing
Risk Management Plan
Training Plan
Metrics Plan
Defect Prevention Plan
There should be regular communication between the team members themselves to
ensure that there is a shared vision and sense of purpose, and that perceptions remain
aligned to the project goals.
10
As the project is being executed, there has to be regular monitoring of the progress Web Software
and of the different parameters of the project, such as effort, cost and quality. If any Engineering
of these parameters is not in line with what was planned, appropriate investigation,
analysis and corrective action needs to be taken. Sometimes circumstances change
such that it is no longer possible to bring back the project on track with the original
plan, whereupon the plan needs to be reviewed and revised.
Configuration Management
This is vital to retaining control of the artifacts produced by the project. Given that
changes will occur, we need to be able to track and know at all times which version of
an artifact is current and which ones are obsolete. We do not discard obsolete
versions because it may sometimes be necessary to backtrack or to branch off in
another direction from a common base.
Whenever an artifact is produced it should be reviewed so that we can have
confidence in the veracity and appropriateness of its content. After this it should be
placed in a baseline area and any further changes to it should be done only according
to formal change procedures. We have to plan for which artifacts will be so
controlled.
Access to baselined artifacts should be limited to a designated configuration
controller. Any member of the team who needs to alter a baselined artifact needs to
approach the configuration controller who will then check out the artifact and allow
the team member to make the change. Simultaneous checking out by more than one
team member is discouraged, but if done, any conflicting changes that may be made
by them need to be taken care of.
Measurements
It is important to measure our software work so that we can keep control of the
proceedings. This is the key to being able to manage the project. Without
measurements we will not be able to objectively assess the state of the progress and
other parameters of the project, and we would be reduced to relying on our intuition
and feel for where the project stands.
Software engineers have been notorious for not bothering to measure their work, or
for insisting that their work cannot be measured. It is an engineering discipline unique
in that measurements have not been given. However, in the 1990s, great progress was
made in spreading awareness and appreciation of the need for software measurements.
Still, even today, many organisations do not have a good metrics program going.
Risk Management
An important constituent of project management is managing the risks of the project.
A risk is an event that can have a deleterious impact on the project, but which may or
may not occur. Thinking of the possible risks is the first step in trying to take care of
them. While we cannot get rid of risks, we need to keep thinking of ways to reduce
their effects. Better still, we should try to take steps that will prevent the risk from
becoming a reality.
Not all risks need to be looked at. When we analyse risks, there are some that are
more probable and also have a significant adverse effect on the project. Others may
have a severe effect if they occur, but are not too likely to happen. Still others may
not be too harmful, even if they do come to pass. There can be a large number of risks
in a project, but thinking about all of them is not practical. We need to concentrate on
the most important risks and direct our energies to managing them.
Over time, the risk parameters can change. We, therefore need to keep re-looking at
our risks and alter our risk plan to take cognizance of the changed situation as the
project progresses. We should keep carrying out the actions that make the risk less
likely. Whenever a risk does occur, we should put into action our plan for reducing its
harmful effects.
11
Web, Mobile and CASE tools
Thus risk management allows us to look at a project actively, rather than passively
reacting to events after they have occurred.
9.3.2 Organisation of Web Application Teams
Web applications tend to need much more ongoing support, maintenance and
enhancement than others. After the initial application has been rolled out, comes the
stage of maintenance. This can amount to weekly or even daily releases in the first
instance while the software stabilises. This endeavour requires a team structure that is
a bit different from others. We start from the maintenance end to emphasise its
importance, and the fact that design and development are done comparatively quickly.
Sometimes the need for project management during development itself is questioned
but, as in any other project, good management is critical to success in a web
application project as well.
Webmaster
This role is not unique to web applications, but is usually otherwise referred to as the
administrator. It entails taking care of the site on a day to day basis and keeping it in
good health. It involves close interaction with the support team to ensure that
problems are resolved and the appropriate changes made. Some of her activities
include –
Gathering user feedback, both on bugs (such as broken links) and also on
suggestions and questions from the public. These need to be passed on to the
support team who are engaged in adapting the site in tune with this information.
Ensuring proper access control and security for the site. This could include
authentication, taking care of the machines that house the server and so on.
Obtaining statistics and other usage metrics on the site. This could include,
among many others –
o Number of hits, distributed by IP address
o Number of registered visitors
o Frequency distribution of the different pages visited
o Bandwidth utilised for upload and download
o Number and type of errors, particularly of service denials.
Helping to ensure that change control procedures are followed.
Archiving old content while keeping newer content in a more prominent and
easy to find location.
Application Support Team
In conventional software projects, while maintenance is important, it may or may not
be done by the organisation that developed the project. In web applications, the
organisation that developed the site is quite likely to be given the responsibility of its
maintenance. This is because web applications tend to keep evolving and what
corresponds to the development phase in a conventional application is here quite brief
and frenetic. A large part of the evolution of the software tends to happen
subsequently, based on user feedback and continuing refinement of the concept by
those who conceived of the application. The activities here can consist of–
Removing bugs and taking care of cosmetic irritants.
Changing the user interface from time to time for novelty, to accommodate user
feedback and to make it more contemporary.
Altering the business rules of the application as required.
Introducing new features and schemes, while disabling or removing older ones.
The support team could consist of designers including graphic artists, programmers,
database specialists and testers.
12
Content Development Team Web Software
Engineering
In conventional business application software, there are usually changes and
modifications required to master tables in databases, such as altering price lists,
available items and so forth. Web applications frequently require much more
ongoing, sustained effort to retain user interest because of the need to change the
content in the site. In the case of a news site, this updation can be every few minutes.
The actual news could be coming from a wire feed from some news agencies, or from
the organisation’s own sources.
Though not all sites need to be so current, it is often required to keep adding articles
and papers of interest to the user community. These stories or articles are written by a
team that has expertise in the domain concerned. A site could be serving out a wide
variety of information and other stories from different interest areas. Content
development teams could be researchers who seek out useful or interesting facts,
authors, experts in different areas, and so on. The content may be edited before being
served out.
The members of this team are usually not knowledgeable from the software point of
view, though they might be well respected in their own domains. They may be full
time members of the organisation or casual, freelance contributors. So though called a
team, some of them might really be individual providers. The content they produce is
typically in the form of a word processor file that might have images, graphs, tables
and other non-text ingredients.
Other forms of content are now quite commonplace, such as audio files, slide
presentations or video clippings of events, places or speakers. With increasing
availability of high speed network connections for even individual users, such content
is now becoming increasingly popular because of the impact it can produce.
Web Publisher
This is an important role that connects the content development team to the actual
website. The raw material created by the writers has to be converted into a form that
is suitable for serving out of a webserver. It means formatting the content according
to the requirements of a markup language such as HTML. Though tools can help
perform much of this, there still might be human effort that is needed.
In the case of automated news feeds, such publishing needs to be as tool driven as
possible. The web publisher must have a good understanding of the technical aspects
of web servers and the markup language.
9.3.3 Development and Maintenance Issues
Let us now look at some of the management issues that we will face while developing
and maintaining a web application. We have already seen that web applications tend
to evolve, and there is little distinction between what in a more conventional project
we would refer to as development or maintenance. It is hard to say when the
development is complete and maintenance starts in a web project. In practice it is a
continual cycle of delivering something and then of fixing and correcting and
enhancing it.
Configuration Management
During maintenance of a web application, because of the frequency of changes,
configuration management assumes considerable importance. The change control
process must be up to the demands placed on it of keeping control over the software
configuration inspite of the many changes that will happen. So it must not be overly
elaborate or hard to follow. That would mean it might not get followed and the
consequences will be disturbing. Once one loses track of what is happening in the
software it can become very difficult to get back. It will then become impossible to
13
Web, Mobile and CASE tools
predict the effect of changes to the software and one would have to grapple with
mysterious bugs whose cause will be hard to find.
Besides the software itself, content also needs to be subjected to configuration
management. This could include items such as information on schemes or other
service or product offerings. Lack of discipline here could mean horrors like –
Postings on past offerings that are no longer available,
Incorrect prices or other terms being visible to users,
Postings of content that is still work in progress and was not ready for
publication apart from lesser embarrassments such as archival content
reappearing on the site.
A very important aspect is that of inadequately tested code finding its way into the
active configuration. It could mean that visitors to the site have to put up with
features that do not work as expected or simply crash on them. Worse, it can result in
security holes that compromise the security and integrity of the site. Sometimes, the
privacy of data of registered users could be in question. In other cases it could expose
other systems of the organisation itself to unauthorised intruders.
Since contributions to an organisation’s website can come from diverse sources and
departments, it can become difficult to establish accountability and responsibility for
the web application. In conventional business software applications it is clearly a
particular division or group in the company that is served and that would have an
interest in the software working properly. This interest is often diffused and spread
out in a web application. It cannot be the technical team or the software wing, as this
is often an outsourced vendor. In any case the ownership of the application needs to
be assumed by the business and not a technical group. While there can be many
claimants for ownership and authority, the same may not hold when it comes to
owning responsibility.
To determine who is responsible for the website, some of the relevant questions can
be –
Who pays for the website (this can be a charge to an internal budget)?
Who is concerned with the accuracy of the content that is published?
Who gives the requirements to the development or maintenance team?
Who ensures quality control checks and does the acceptance check?
It is this owner of the website who should be ensuring that proper configuration
management practices are followed. Even if this question is resolved, we have to
grapple with how exactly to do configuration management. The identification of
configuration items can be difficult. This is because there are many components to a
web application, and some items such as news content can be very short-lived. Other
content can last longer. To what extent does one look at configurations for transient
content? Perhaps just recording when it was published and when it was removed is
sufficient. For other content that may appear for days or weeks, we might have to
deal with normal, conventional changes and updates. What constitutes a configuration
unit is also not easy to define, as hyperlinks from within content can complicate the
matter.
Conventional configuration management tools are also not really suited to deal with
this kind of constant evolution. The usage of these tools is also made difficult because
many in the maintenance team, such as content developers, may not be familiar with
software, let alone the tools. Also, web application support teams may not be
geographically located in the same place and people could be working in different
places. So the tools used need to be such that they can be operated over the network.
Project Management
If configuration management has its challenges as described above, they pale into
insignificance compared to the difficulties we may have while managing the web
14
application project itself. When we look at the elements of project management the Web Software
reasons will become apparent. Engineering
1. We have already seen that evolution and hazy, fluid requirement specifications
are the norm here. How then does one perform estimation? That presupposes a
clear knowledge of the scope and specifications.
2. More than in any other kind of software, schedules are dictated by the users.
Quite often, the software is the means to seize upon a business opportunity that
may be available for a small window in time. So the developers or maintainers
may not have much influence on the time they can get. Whatever the estimate,
the software has to be delivered by the date the user needs it.
3. Coordination and human issues can be more daunting than ever. The team may
be geographically dispersed, may come from disparate backgrounds and may
have conflicting interests or vision.
4. The question of ownership we have already seen in the section on configuration
management. Even though stakeholders may not be hard to identify, overall
accountability and responsibility could be.
5. The metrics to use to gauge success have to be identified carefully, keeping in
mind the unique characteristics of a web application.
6. The actual engineering aspects, particularly analysis, design and testing have to
be tuned to the life cycle of such a project. Agile programming methodologies
may be of help here.
7. Quality assurance is made more difficult by the frenzied pace of activity that
may induce the harried project team to jettison process driven working.
While none of these challenges permit of simple solutions, we can try to keep some
things in mind and work towards keeping the project under control by –
Recognising that the software will follow an iterative life cycle model for
development, with each iteration being quite short. We may not be able to work
out a grand plan for the whole project as it will be at the end, simply because we
cannot predict what shape it will take eventually. So we could concentrate on
the current iteration and be clear about what we will deliver in that one. Other
items on the user wish list should be taken care of in the next delivery. Save in
exceptional circumstances, do not alter the objectives or scope of the current
iteration.
The question of schedule is a difficult one. Managing expectations of the users
is imperative here. If what the user’s desire is clearly unattainable, we need to
negotiate and reduce the scope for the current iteration. Also with more
experience in getting a web application developed, the users will hopefully have
a better appreciation of what is possible.
With current day groupware and other tools, we can make it simpler to work
with distributed teams. But there should be adequate attention paid to
communication among team members so that the objectives of the project are
clear. As in a conventional project, we should have team meetings regularly,
even if those meetings are done over the telephone or using network meeting
tools.
As always, the processes to be followed in the project should be appropriate to
the situation. They should not be cumbersome or difficult to do, so that the
project team will be able to follow them. We need to remember that if the
processes are complex and are not followed, the impact on the project is much
worse, as we potentially could lose control of what is happening.
In subsequent sections we will be reviewing the strategies to follow to get a grip on
the other issues such as life cycle activities and measurements to be made. The other,
usual elements of project management such as managing risks, analysing defects and
15
Web, Mobile and CASE tools
trying to prevent them or monitoring project parameters such as cost, effort, schedule
and quality, remain as valid as in any other software project.
🖝 Check Your Progress 2
1) The essence of managing the project is proper for the project and
then executing the project according to the plan.
2) The process must be up to the demands placed on it of keeping
control over the software configuration in spite of the many changes that will
happen.
9.4 METRICS
Management of any kind is difficult, if not impractical, without measurements being
made. Those values tell us where we stand in our endeavour, whatever it may be.
Software engineers have been especially tardy in understanding the need for
measurement, preferring to rely on intuition and subjective assessment. However,
realisation does seem to have set in and many software projects do measure at least
the basic parameters like schedule, effort and defects. When it comes to cost,
practices seem to vary across organisations. Some are secretive about the costs of
projects and only senior management is privy to such information. Others place the
responsibility for the budget for the project on the shoulders of the project manager.
In web applications, these core metrics need to be measured and analysed just as in
any other software application. Schedules could be made fine grained so that we are
tracking things on small, quick milestones rather than only at the “end” of the project,
which is difficult to define here. That could mean that it may not be very meaningful
to measure them in terms of slippages (a one-day delay in a task lasting a week is
14%). One possibility could be to look at the percentage of schedules that could not
be kept.
Effort metrics can be gathered through a time sheet and we can measure the total
effort in different kinds of activities to build up our metrics database for future
guidance. However, here we need to be sure to record the actual effort and not try to
confine it to a conventional workday of 8 hours. Metrics data on effort is valuable in
building up a body of knowledge for future estimation. This data should be recorded
under time spent on analysis, design, construction, project management and so forth.
Past data is also helpful in negotiating with users for a reasonable amount of time to
perform a task
Another core attribute of a software project is its size. This should preferably be
measured in an implementation independent way, such as function points. The
International Function Point Users Group (IFPUG) has come up with guidelines for
measuring the size of a web application from the user point of view. If the
organisation has good reason to feel that this measure is not suitable, then the creation
of one’s own size measure could be considered. If a good size measure can be built,
then it can be used to estimate the effort required for future projects, provided the
productivity factor that converts the size to effort is available from data on past
projects.
The quality of the application can be measured in terms of defects that are found
during internal testing or reviews as well as external defects that are reported by
visitors who come to the site. But all defects are not equal, and we need to analyse
defect data carefully. Some attributes that can be used to classify defects for further
analysis are:
Severity on a scale of 3 levels, such as high, medium and low. More levels up
to 5 can also be considered. The severity is in terms of impact on the usage of
the software by the user.
16
Phase in the life cycle where they were introduced, such as analysis, design or Web Software
Engineering
coding.
Whether they are internal defects, detected by the development or testing team,
or whether they were found by the end users.
Whether they were detected during reviews or during testing.
Effort required to fix the defect, as this might not have any correlation to the
perceived severity of the defect.
Such an analysis would then form the basis for the formulation of a defect prevention
plan for the software project. We would strive to prevent the kind of defects that are
of high severity or those that take a lot of effort to remedy.
We can also look at other measures like –
Percentage human resource utilisation in the project. Roles that are idle for
significant periods could be allocated to another project as well.
Percentage of code that is reused from the organisation’s library of such
components.
Quantum of changes to the user requirements as the project progresses. An
overly high value could indicate that more effort needs to be directed towards
scoping out the project and eliciting the requirements.
Percentage of attrition in the project. An unusually high value for this could
point towards problems in managing the human angle.
Besides metrics to give insight into the development aspects of the project and the
general state of the team, there can be a large number of statistics and measures that
can be gathered about the usage of the website once it has been put into active use.
Some of these have been already touched upon in earlier section under the role of
Webmaster. Most of them rely on traffic analysis to draw conclusions about the users
and their interests. This can give an insight into what changes should be made to the
site or how it can be improved.
We can also look at some metrics from the point of view of maintenance. These could
be the average time taken to fix bugs of different severity levels, together with the best
and worst case times. Other measures can include –
User satisfaction index
Mean time between failures (bugs detected or reported)
Number and percentage of repeat visitors.
Gathering and calculating metrics is only one part of the work involved here. The
crux of the matter is how well the knowledge of metrics is used to shape the
functionality and features of the project. The metrics should be aligned to the goals
and objectives of the project and the lower level measures should be derived from the
top level ones, so that we measure whatever is important for us and do not gather
extraneous data. From a measurement deficient situation it is quite possible to go
overboard and drown oneself in a mass of low level data that is not meaningful or
useful.
9.5 ANALYSIS
17
Web, Mobile and CASE tools
It is particularly important to be clear about the process owner and the stakeholders
here. We must not end up getting wish lists and requirements from someone who, it
later turns out, is not the one authorised to provide them. While always a point of
concern, the issues of ownership of the web application accentuate the problem. From
the scope that would have been talked about while setting up the project, the detailed
system analysis would need to be done to come up with the requirements.
Besides the normal considerations of what the application has to do, we need to look
at how the user will interact with the application even more closely than in a
conventional application for the reasons we have already looked at in the beginning of
this unit. The user interface has to be simple to use, visually appealing and forgiving
of a lay visitor who may not be familiar with computers or software. The actual
functionality of the application is something that has to be ensured the same way as it
would be for any other software, being the very reason for going to all the trouble.
Where things are different is in the importance of content to a web application. We
have to work out what will be shown to the user, such as a product brochure, an
offering for a tour package or anything else. This has to be placed before the user in a
manner that will be eye catching but not garish, and the user has to be able to obtain
some benefit from the offering without having to do anything elaborate.
Geographical region,
Language, beliefs and culture,
Social strata,
Age group and gender.
and other similar characteristics. All of these demand that we change our design to
appeal to our typical visitor.
Where we have to lay great emphasis is on the user interface. There are several
aspects to creating a good one, some of which are:
18
1. Visual appeal and aesthetics: This is the domain of a graphic artist. Things Web Software
such as cute sound effects, blinking and moving images that can appear Engineering
interesting or attractive for the first couple of times can irritate after a while. So
a pleasant, clean visual design is perhaps a safe bet to hold continuing interest
on repeat visits. However, if there is ever a choice between graphical appeal
and functionality, we must plumb for functionality every time.
2. Ease of entry of data: Given the fact that most users may be unfamiliar with
computers or software, data entry should be as simple as can be made. Actual
entry using the keyboard should be kept to the minimum. Allow for using the
mouse for selection from lists. It should be easy to ask for information of the
application.
3. Ease of obtaining the application’s response: Whenever we query the
application, the results should be easy to see and interpret. If the processing is
going to take a while, give visual feedback to the user on how long she can
expect to wait. At no point should a user feel lost, not knowing where s/he is in
the site or what she should do next. Context sensitive help should be available
throughout the site.
4. Intuitive, easy navigation around the site: As a visitor navigates around the
site, there should be some aids to helping her find her bearings. Things like a
site map and your location on it are useful. It should be possible to come back
to a reference point like the home page in a single click from anywhere deep in
the site. It is our application that should provide all navigation facilities and we
must not expect the user to use browser buttons to go around.
5. Robust and forgiving of errors: If there is any erroneous input, the
consequences should not be too inconvenient. We should expect a discreet and
graceful error message, not a disconnection from the server. It should not
happen that we land up in some error page that does not give us any explanation
of what went wrong.
Website users would not like to have to scroll and so we must try to see that this is not
required for any screen resolution. A horizontal scroll is much more irritating than a
vertical scroll to most users.
In this section we will look at some of the considerations for reviewing testing web
applications. The content of a website is the item of interest to the visitor and so we
must take care to review all content to make sure that there are no errors of fact or
language therein. Besides, the design of the site should be reviewed to catch errors
like difficulties in navigation or data entry.
It may not be very useful to merely check out the components of a website on a
standalone basis as part of unit testing. While in a conventional application a program
is the smallest unit that we test, in web applications it is more likely to be a single web
page. We should check out the content, the navigation and the links to other pages as
part of testing out a page. There should not be any broken links that leave the user
bemused. If there is some functionality being provided by that page, that part should
work correctly. This part of the software is close to a conventional application and the
actual processing that happens can be unit tested as usual. Where the processing is
done by using bought out components, it may not be necessary to unit test those
components. We would then only have to concentrate on checking out the full
functionality.
Once all the pages of the web application are ready we can perform integration
testing. We check out how the pages work together. Whenever an error is caught and
fixed we should repeat the tests to ensure that solving a problem has not caused
19
Web, Mobile and CASE tools
another problem elsewhere. It is possible that individual pages work well but not
together.
Unlike a conventional application, here we do not have much control (except our
instructions to users) on all parts of the working system. This is because we do not
know what browser, what version of it and what operating system the user will be
working with. While it may not be practical to test out with all possible combinations,
we should ensure that the application works with most sets of browsers and operating
systems. We should also see that the software works at different screen resolutions.
The network bandwidth expected should also be clearly decided and we should test
things out at all network speeds up to the lowest.
9.8 SUMMARY
This unit has been a very brief introduction to different aspects of engineering web
software applications. While a lot more could have been written about each topic, and
other topics could have been added here, we have been able to concentrate on only a
few important points here that are with in the scope.
o They have to be developed and put into use quickly and so try to make
use of reusable components as much as possible.
o The user interface is very important because they are used by lay visitors.
We need to think through the metrics we will use to evaluate project progress
and product quality of web applications.
20
Web Software
9.9 SOLUTIONS/ANSWERS Engineering
http://sei.cmu.edu/cmmi
http://standards.ieee.org
21
Mobile Software
UNIT 10 MOBILE SOFTWARE ENGINEERING Engineering
10.0 Introduction 1
10.1 Objectives 1
10.2 Transition from Design to Coding of Mobile Applications
2
10.2.1 Create a transition
10.2.2 Transition of Design to Coding using Wireframes
10.2.3 Prototyping mobile UI animations – the takeaway
10.2.4 Application Wireframing Features
10.2.5 Animate layout changes using a transition
10.2.6 Apply a transition
10.2.7 How to use Android wireframe effectively?
10.2.8 Benefits of using wireframe
10.3 Elements of Mobile Applications
9
10.3.1 Product Strategy
10.3.2 Comprehending what your application needs to deliver
10.3.3 User Interface Design (Ui)
10.3.4 Screen Resolution
10.3.5 Graphics has to be appealing
10.3.6 User Experience Design (UX)
10.3.7 Good Speed
10.3.8 User-friendly Navigation
10.3.9 Application Content
10.3.10 Mobile device performance
10.3.11 Social Sharing Option
10.3.12 Security
10.3.13 Power Consumption
10.3.14 Compatibility
10.3.15 Simplicity
10.3.16 Offline function
10.3.17 Have a high performance
10.3.18 Provide a Feedback Option
10.3.19 Regular Updates
10.3.20 Marketing
10.4 Approaches to the Development of Mobile Applications 13
10.4.1 Native Application Development
10.4.2 Cross-Platform Application Development
10.4.3 Hybrid Application Development
10.4.4 Rapid Mobile Application Development: RMAD
10.4.5 Progressive Web Applications: PWAs
10.5 Summary 19
10.6 Solutions/Answers 20
10.7 Further Readings
20
10.0 INTRODUCTION
The rapid proliferation and ubiquity of mobile, smart devices in the consumer market
has forced the software engineering community to quickly adapt developmental
approaches conscious of the novel capabilities of mobile applications. The
1
Web, Mobile and CASE combination of computing power, access to novel on board sensors and ease of
tools application transfer to market has made mobile devices the new computing platform
for businesses and independent developers. However, the growth of this new
computing platform has outpaced the software engineering work tailored to mobile
application development.
These powerful development tools and frameworks greatly simplify the task of
implementing a mobile application. However, they are predominantly focused on the
individual developer who is trying to create an application as quickly as possible. For
small and medium-sized mobile applications that can be built (and easily updated) by
a single developer, they represent a vast improvement on the previous generations of
tools, and encourage developers to adhere to the important principles of abstraction
and modularity that are built into the platform architectures.
However, as mobile applications become more complex, moving beyond inexpensive
recreational applications to more business critical uses, it will be essential to apply
software engineering processes to assure the development of secure, high-quality
mobile applications. While many “classic” software engineering techniques will
transfer easily to the mobile application domain, there are other areas for new research
and development.
10.1 OBJECTIVES
Transition holds information about animations that will be run on its targets during a
scene change. Subclasses of this abstract class may choreograph several child
transitions they may perform custom animations themselves. Any Transition has two
main jobs:
(1) capture property values, and (2) play animations based on changes to captured
property values. A custom transition knows what property values on view objects are
of interest to it, and also knows how to animate changes to those values.
Once you have defined the starting scene and the ending scene you want to change
between, you need to create a Transition object that defines an animation. The
framework enables you to specify a built-in transition in a resource file and inflate it
in your code or to create an instance of a built-in transition directly in your code.
2
look like and how the components should behave in order to keep the upfront Mobile Software
development effort and cost in its lowest minimum. Engineering
Android wireframes are screen sketches of Android apps (figure 10.1). It helps you
present and explain design ideas of applications to customers, which ultimately leads
to a consensus on the ideas transition into proposed.
Animated mobile transitions can be charming, useful and user-centric. They guide
users through a mobile application experience and ensure that both user goals and
conversion goals are catered to. But mobile UI designers have to resist the temptation
to animate for mobile animation’s sake. Animations should always be relevant,
targeted and with a purpose. That way, your UI will be as effective as these inspiring
examples of animated mobile transitions.
Transitions should offer a truly exclusive experience with a sliding, flipping, turning
or popping effect and Effects any event can have a popping, fading, sliding, folding,
dropping, bouncing effect – and many more.
10.2.4 Application Wire framing Features
Speed up your wire framing process with a modern tool. Designing wireframes that
behaves like the real deal and start getting real feedback from users testing your app
wireframe. Accelerate innovation. Avoid rework. Launch the right app.
A final prototype is made with all of the features incorporated into the application
design and sent to the development team for coding. After this one iteration, an MVP
is made and send to the client and if and as there are changes required, they are made
in the final design of the application. Every mobile application is made a success
through its functionality, code and calculations, regardless of how it looks and
works”, this sounds like an absolute fluke.
After all, today when we talk about mobile applications there is an immense need for
an exceptional UI and UX as much as a perfect backend code. In fact, UI/UX and
3
Web, Mobile and CASE visuals are the reason why some mobile applications become an instant hit in the
tools market and some are never downloaded in the first place.
Animated transitions can make the difference between a great mobile app and
transitions – those little animations that make UI elements visible or invisible – often
go unnoticed, but when executed right they contribute to a seamless user experience.
UI is the User Interface and UX stands for User Experience. For the fundamentals of
it, the app UX design process steps are more concerned with user retention which is
experience based and more subjective whereas, the UI design development process is
consists of the visuals and graphics of an app. UI is a sub-part of UX, although the
UI/UX design is an art, the mobile app design process of creating the graphics of an
application is more systematic and technical.
Transition’s mobile applications support increase your business agility and taking
advantage of mobile technologies improves productivity and provides added value.
Companies who embrace today’s world as “mobile-first” find that their processes run
smoother and simpler, while their business is more scalable, with mobile applications.
Transition’s system architecture ensures our mobile apps are secure, fully functional,
and embedded into your software and business workflows.
Android's transition framework allows you to animate all kinds of motion in your UI
by simply providing the starting layout and the ending layout. You can select what
type of animation you want (such to fade the views in/out or change the view sizes)
and the transition framework figures out how to animate from the starting layout to
the ending layout.
The basic process to animate between two layouts is as follows (figure 10.2):
1. Create a Scene object for both the starting layout and the ending layout.
However, the starting layout's scene is often determined automatically from
the current layout.
2. Create a Transition object to define what type of animation you want.
3. Call TransitionManager.go() and the system runs the animation to swap the
layouts.
4. The diagram in figure 1 illustrates the relationship between your layouts, the
scenes, the transition, and the final animation.
4
Mobile Software
Engineering
Create a scene
Scenes store the state of a view hierarchy, including all its views and their property
values. The transitions framework can run animations between a starting and an
ending scene.
You can create your scenes from a layout resource file or from a group of views in
your code. However, the starting scene for your transition is often determined
automatically from the current UI.
A scene can also define its own actions that run when you make a scene change. For
example, this feature is useful for cleaning up view settings after you transition to a
scene.
You can create a Scene instance directly from a layout resource file. Use this
technique when the view hierarchy in the file is mostly static. The resulting scene
represents the state of the view hierarchy at the time you created the Scene instance. If
you change the view hierarchy, you have to recreate the scene. The framework creates
the scene from the entire view hierarchy in the file; you cannot create a scene from
part of a layout file.
To create a Scene instance from a layout resource file, retrieve the scene root from
your layout as a ViewGroup instance and then call
the Scene.getSceneForLayout() function with the scene root and the resource ID of
the layout file that contains the view hierarchy for the scene.
The code snippets in the rest of this section show you how to create two different
scenes with the same scene root element. The snippets also demonstrate that you can
load multiple unrelated Scene objects without implying that they are related to each
other.
The main layout of an activity with a text label and a child layout.
A relative layout for the first scene with two text fields.
5
Web, Mobile and CASE A relative layout for the second scene with the same two text fields in different
tools order.
The example is designed so that all of the animation occurs within the child layout of
the main layout for the activity. The text label in the main layout remains static.
This layout definition contains a text field and a child layout for the scene root. The
layout for the first scene is included in the main layout file. This allows the app to
display it as part of the initial user interface and also to load it into a scene, since the
framework can load only a whole layout file into a scene.
The layout for the second scene contains the same two text fields (with the same IDs)
placed in a different order.
After you create definitions for the two relative layouts, you can obtain a scene for
each of them. This enables you to later transition between the two UI configurations.
To obtain a scene, you need a reference to the scene root and the layout resource ID.
In the app, there are now two Scene objects based on view hierarchies. Both scenes
use the scene root defined by the Frame Layout element
in res/layout/activity_main.xml.
You can also create a Scene instance in your code from a ViewGroup object. Use this
technique when you modify the view hierarchies directly in your code or when you
generate them dynamically.
To create a scene from a view hierarchy in your code, use the Scene (sceneRoot,
viewHierarchy) constructor. Calling this constructor is equivalent to calling
the Scene.getSceneForLayout() function when you have already inflated a layout file.
The following code snippet demonstrates how to create a Scene instance from the
scene root element and the view hierarchy for the scene in your code:
The framework enables you to define custom scene actions that the system runs when
entering or exiting a scene. In many cases, defining custom scene actions is not
necessary, since the framework animates the change between scenes automatically.
Animate views that are not in the same hierarchy. You can animate views for both the
starting and ending scenes using exit and entry scene actions.
Animate views that the transitions framework cannot animate automatically, such
as ListView objects.
To provide custom scene actions, define your actions as Runnable objects and pass
them to the Scene.setExitAction() or Scene.setEnterAction() functions. The
framework calls the setExitAction () function on the starting scene before running the
transition animation and the setEnterAction () function on the ending scene after
running the transition animation.
6
10.2.6 Apply a transition Mobile Software
Engineering
The transition framework represents the style of animation between scenes with
a Transition object. You can instantiate a Transition using several built-in subclasses,
such as AutoTransition and Fade, or define your own transition. Then, you can run the
animation between scenes by passing your end Scene and
the Transition to TransitionManager.go().
The transition lifecycle is similar to the activity lifecycle, and it represents the
transition states that the framework monitors between the start and the completion of
an animation. At important lifecycle states, the framework invokes callback functions
that you can implement to make adjustments to your user interface at different phases
of the transition.
An enter transition determines how views in an activity enter the scene. For example,
in the explode enter transition, the views enter the scene from the outside and fly in
towards the center of the screen.
An exit transition determines how views in an activity exit the scene. For example, in
the explode exit transition, the views exit the scene away from the center.
A shared elements transition determines how views that are shared between two
activities transition between these activities. For example, if two activities have the
same image in different positions and sizes, the changeImageTransform shared
element transition translates and scales the image smoothly between these activities.
Any transition that extends the Visibility class is supported as an enter or exit
transition. For more information, see the API reference for the Transition class.
The use of wireframe can bring many benefits to both the development team and
clients, but this is the case only when you use it wisely and properly. A typical misuse
of wireframe is to treat it as a replacement of screen design. This makes the
production and refinement difficult and costly, reducing the usefulness of
Wireframing. In this section, we will go through some of the effective Wireframing
tips.
7
Web, Mobile and CASE In a wireframe, instead of showing any actual content, we can replace a large
tools chunk of text (the actual context) with a placeholder of text. This is to avoid
time being spent on preparing the content unnecessarily, and to prevent the
readers from being distracted by the text content. But if the displaying of text
is needed, you may consider placing some dummy text there instead. You can
easily find a dummy text generator on the internet.
The use of annotation helps you describes an element (e.g. "Company logo")
or to explain something related to its behaviour (e.g. "Hide in 5 seconds").
Use it if necessary. But again, don't attempt to document each of the
wireframe elements. You should only use annotation whenever it necessary.
Wireframes can be hand-drawn, but we usually create wireframes with software for
more efficient and easier to manage of our works. Besides, some wireframe software
provides you with features that paper-and-pencil cannot accomplish. Here are three of
them:
State - The wireframing tool of Visual Paradigm supports the concept of state,
which allows you to create a child wireframe based on an existing one. It is not
only save you time in creating a screen flow with a sequence of similar child
wireframes, it also makes refinements of the related child wireframes much easier
(as we make changes in the initial state of a wireframe, the changes will also be
reflected in all its' child states wireframes)
Managing wireframes by User story - User story is an agile tool for recording
user's concerns and requirements. To include wireframes as part of a user story's
scenario shows how user will use the feature in performing part of their job
described in that user story. Besides, when developer start implementing the user
story, they can check the wireframe to gain ideas about user's expectations.
8
Once these screens are sent off to the client, developers begin a collaborative design Mobile Software
process. They often find that clients like different parts of each concept – the button Engineering
from this one, the colours in that one – so we’ll try to pull these together and refine
them into a unified design, rather than a Frankenstein’s Monster of various designs.
This gives us a finalized visual design, which can be combined with the UX flow to
create a working prototype. This is essentially a collection of images of each screen,
with tappable hotspots that make it possible to move from screen to screen as if you’re
using the real application. It can be installed on a device, meaning it’s accessible from
an icon just like any other application, and often find that people don’t realize it’s not
a fully-functional application.
Full-blown, high-fi screen designs takes time to develop, which lead to high
development cost. Wireframing is easy to create and edit. It is an inexpensive way to
create basic screen sketches. It also makes tweaking or even overhauling sketches
simple and inexpensive.
You may not be the first person to come up with an application idea, and in most
cases, developers tend to improve on what already exists. For this reason, there are
many products in application stores that have similar purposes, and as you can
imagine, the nature of the competition you are likely to face is high.
Entrepreneurs in tech valleys all across the globe have already paid attention to this
and are trying to make the best of the available opportunities. There’s no denying the
fact, that mobile applications have become a part of our everyday lifestyle and most of
us remain dependent on them constantly for taking care of several critical operations.
As easy as it may sound using them, it is a whole different ball game when it comes to
developing each application. Few things to keep in mind while developing a mobile
application:
9
Web, Mobile and CASE 10.3.1 Product Strategy
tools
The first component of a successful mobile application is a thorough product strategy
that solves your immediate business goals and addresses long-term growth
opportunities.
There are many business cases for mobile applications and countless opportunities to
streamline processes or introduce new customer value streams with mobile solutions.
The key is choosing one that makes the most impact within the context of a broader
business strategy.
The same type of project analysis techniques used in other areas of business can apply
to mobile application development prioritization. It’s essential to start thinking about
the mobile application development project with this frame of mind, so one can
develop a product that delivers intentional and measurable business value.
Before developing an application for your business, give in some time to understand
what all aspects of your business the application needs to cover. It is important to
place the priorities of your business out there through your application because this is
how both your business and application will be able to succeed in the long run.
Work on your User Interface Design (UI) and application usability, which are the
subsets of user experience design. You will have to come up with decent and useful
features.
When building your mobile application, you should also consider the screen size and
resolution of various mobile devices that operate on the platforms you wish to launch
your application. In terms of resolution, you have to achieve the right pixels per inch
or standard screen resolution for your application. More about this information is
available on the application store technical guidelines.
Appearance is very vital to this process and in the end, the outcome has to be easy and
comfortable to the user's eyes. The graphics of your application have the tendency to
determine its failure and success, so it will be a big mistake to ignore it. It’s necessary
that the application automatically adjusts to all screen sizes without any issues and
looks just as good when users are accessing it on a mobile phone screen of any size.
Applications with quality graphic art or design are captivating to the eyes of the users.
When you do not wish to use text, it is essential to know that a picture is worth a
thousand words. Therefore, you need to use high quality and intuitive images,
animations, visuals and designs to keep your users engaged.
The interaction between your application and the users should create positive
emotions and attitudes. It is more about how users feel when they are using your
application. You need to design your application with the users in mind. You need to
10
come up with intuitive and interactive designs, making east easy for the user to know Mobile Software
the right thing to do. Engineering
Most users tend to show less patience to an application that has poor navigation. It
pays to have a simple application that allows users to find and use what they need
with ease. You should aim to provide a clutter-free experience. Focus on delivering a
simple and easy to use application.
You do not need a complex interface and navigation system to appear modern, and
sometimes simplicity is the ultimate sophistication. Most users do not have all the
time to waste trying to explore your application; there are enough puzzle games in the
application store for them to play.
In Mobile Application Development, you need text to label your buttons, provide
guidelines and explain specific terminologies. The content in your application should
be explicit and precise. Stuffing keywords for SEO optimization may distort the
message you are trying to communicate. Applications with updated content and
information look new to all users, potential and repeat customers. Most experts talk
about delivering accurate and specific content.
There are a few different routes you can take to make your online product ready
for mobile devices. The option you choose largely depends on three main factors:
Size matters especially when the user has limited storage capacity and slow internet.
A well-designed and straightforward application tends to consume less space. Size
matters because it keeps the mobile device’s CPU and RAM free, making your
application easy and fast to load.
11
Web, Mobile and CASE Some applications will overwork the processor leading to high battery usage. Gaming
tools applications are known to consume more juice from a mobile device. The
development of your mobile application should be in such a way that it does not
consume too much energy.
When listening to music, reading an article or playing a game, some users may want
to share the experience with others on social media. For this reason, an application
should be able to integrate with popular social networking sites for easy and fast
sharing. With a built-in viral mechanism that promotes social sharing, you let your
customer market the application for you.
10.3.12 Security
The security of your application is the most crucial factor to consider above all other
considerations. You need to think about all the possible ways you can make your
users safe. This factor takes into account the type of technology you use to encrypt
user information and data.
10.3.13 Power Consumption – many aspects of an application affect its use of the
device’s power and thus the battery life of the device. Dedicated devices can be
optimized for maximum battery life, but mobile applications may inadvertently make
extensive use of battery-draining resources.
10.3.14 Compatibility
If your mobile application is to be available for all users, then you’ll have to consider
the iOS or Android versions available. As one upgrades from one version to the other,
application updates should also be available. Creating unique features for various
platform versions makes it easy for the user to see the change and keep them
engaged.
Overall, your application has to be simple and loads quickly. Application users are
always looking for something new and attractive to try. The success of your project
relies on the ten most important elements of mobile application development.
10.3.15 Simplicity
Making an application usable even without the network coverage is definitely a plus.
The availability of the internet is questionable in some areas of the world. If your
application works with internet support, there are more chances of increased use and
popularity. Also, this would enable the application to have more users from
developing countries.
12
10.3.17 Have a high performance Mobile Software
Engineering
A poorly performing mobile applications get usually abandoned by users. An
important component that gauges the success of an application is how the application
perform. A majority of mobile application users stops using an application that
perform poor more than twice. Performance is an extremely important component for
application success, and only high-performance applications get in the list of
successful applications.
Make quality improvements and add necessary features because regular updates based
on the users’ experience and reviews engage the users in the most practical way.
Frequent updates will also help improve the rating of your application. with every
update, you may deal with some new suggestions, complaints, and feedback. Keep up
with them and stay successful with your mobile application.
10.3.20 Marketing
The purpose of this topic is to put the spotlight on different mobile development
approaches and guide to the best way to develop applications based on what you need.
13
Web, Mobile and CASE Types of Mobile Development Approaches are;
tools 1) Native Application Development 2) Cross-Platform Application Development 3)
Hybrid Application Development 4) Rapid Mobile Application Development: RMAD
5) Progressive Web Applications: PWAs
A Step in the Right Direction
Having considered the different types of mobile development approaches, their main
features, and advantages, it is obvious that every approach is different and so will be
the resulting application.
For project owner, it should be in the best interest to define the purpose of the mobile
application in accordance with the exact needs of the target audience. This will help to
estimate the project timeline, the financial and technical resources needed, after which
it will be able to choose the most favourable development approach to follow.
Applications are distinct in their own ways. If the goal and desire is to develop a long-
term project, an application that will be responsive, have a superior quality user
experience, smooth performance, and reliable security, then the native development
approach is very advisable. On the other hand, if looking to compromise in budget
plans or you desire speed in development time, it can consider the cross-platform
approach.
However, there are ample other convincing reasons to embrace this platform for app
development:
Let’s take a closer look at what Apple and Google offer as a native mobile technology
stack for their platforms.
14
Native iOS Application Development Stack Mobile Software
Engineering
Objective-C
There are still plenty of mobile enterprise applications operating on the Objective-C
code, irrespective of the rise of Swift. This could be because it is a difficult process to
switch to Swift, especially if you have existing applications written in Objective-C
that need regular updates. All the same, Objective-C is very well-preferred by some
developers for projects of complexity and software engineering challenges.
Swift
The prominence and rise of the Swift language are as a result of its use for creating
Apple iOS and Linux OS applications. It is proclaimed to be a multi-purpose and
multi-paradigm programming language. However, the main reason for its popularity is
effective performance, when compared to other favorable languages.
Swift has the advantage of being an open-source programming language with code
less prone to error because it gives inline support that can manipulate data and text
strings. Additionally, Swift includes dynamic libraries. These libraries can be
uploaded directly to memory, thereby slashing the size of applications developed and
significantly increasing their performance.
The employment of Swift to develop applications for iOS simplifies the task of
development, plus, maintenance is stress-free. It also enhances code reusability, and
readability.
15
Web, Mobile and CASE There are two major toolsets used for iOS application development: Xcode and
tools AppCode.
AppCode
AppCode is a fast upcoming tool for programing native iOS application and comes as
an alternative to Xcode. Some developers have put out the word that it enables faster
coding than its rival Xcode. Nonetheless, it has a disadvantage. AppCode can only
design interfaces with the use of written code, unlike Xcode. AppCode supports
various programming languages for the Swift development environment, such as
JavaScript, C, C++, and Objective-C.
Apple Xcode
Xcode can be named the official IDE of Apple. Therefore, it is an appropriate choice
of a toolset for iOS application developed. The full-featured development
environment of Xcode enables the production of not only mobile applications, but
desktop applications too. To buttress being a good user interface development tool, it
works best for gaming applications.
Kotlin is a more recent programming language in comparison to Java. In any case, it’s
an appropriate technology option for Android Studio that is fast becoming more
stable. Purposefully, it is not just object-oriented but also an open-source
programming language. Furthermore, it is highly-functional and supports higher-order
functions.
Kotlin has powerful syntax with fewer errors than other languages used to develop
native Android applications. Equally important, it is faster to code, clean, lightweight,
and less verbose. Originally based on the Java Virtual Machine, interoperability with
Java makes it possible for developers to combine codes from Java-based projects with
Kotlin.
Runs on multi-platform
Concise and secure code
Interoperability with Java
Functions can be extended
Big community support
Easy code maintenance
16
Java Mobile Software
Engineering
There is no debate to it that Java is said to be one of the most widely used
programming languages. Without compromising, it is dominantly the most used class-
based, object-oriented language for developing Android applications. Java is ideal for
mobile and web applications, Big Data, among others. On top of that, it is also famous
for rich open-source tools and libraries that facilitate the easy and fast development of
top-notch applications.
Top development speed and product quality are the most prominent advantages of
Java. However, it has a downside of being comparatively slow and consuming
memory space. Nevertheless, you can consider Java for complex mobile projects,
especially if you want scalability and robustness. Big players such as Google
continuously work to make the Java language better. The main parts of the Android
OS are programmed with Java.
Highly secure
Great network capability
Portable and scalable code
Automatic management of memory
Robust programming language
Easy to use and compile
Not limited to any platform
Toolset
For a native integrated development environment, Android Studio and Eclipse are the
most favoured software.
Eclipse
The Eclipse software development kit (SDK) is another free, open-source mobile
development software. Originating from IBM visual and primarily coded in Java, its
main purpose is for the development of Java applications. The good news here is that
developers can extend their use of Eclipse by coding plug-in modules specially for
themselves, or by using other plug-ins as development toolkits.
Android Studio
The integrated development environment from Google is called Android Studio.
Usually, developers employed it to edit written code, handle performance tooling, and
debugging. With such characteristics as flexible development and an immediate
build/deploy system, Android studio enables making unique, high-quality Android
applications. Notably, there is a major difference if compared to Xcode, which
functions specifically for Mac OS. The Android studio works with other PC operating
systems.
17
Web, Mobile and CASE Uniformity across all platforms
tools Effective for budget control or low funding
Implementation is easy
Publishing can be at once for all platforms
The source code can be reusable
High demographic coverage
Fast time to market
The blend of native and web applications is known as hybrid app or hybrid
application. In a computing device, native applications are installed for a certain
program. But, to run web applications, multiple frameworks are available over the
internet. Hybrid apps are often mentioned in the context of mobile computing.
Resulting applications from the hybrid development approach have the speed of a
regular web application and the user experience similar to any type of native mobile
app. Notably, the use of a single code base enables deployment to all platforms
lowering the cost if compared to native applications. Lastly, hybrid applications with
hardware-dependent features have access to device hardware components and native
platform libraries.
It can be applied with several development platforms, examples are Alpha Software,
MobileFrame, and MobileSmith. They all possess the no-code and low-code options.
Advantages of MobileSmith:
Rapid mobile developers declare the functions and features of applications on the
frontend and the backend translates the specifications into code. In this case, the
frontend uses metadata to function. Effectively, this is done by summarizing the major
18
information about the functions of an application like asset managers or user interface Mobile Software
elements in a database. Thus, it cuts off the need for database coding. Engineering
Secure
Works online and offline
Good backend data integration
Works on all platforms including web
Code-free development
Little experience as a developer is need
Reusable components
Low cost of production
The last type of development approach, but not the least, which we cannot exclude is
the Progressive Web Application development. In this case, the engagement of HTML
is principal here.
Progressive Web Apps are the future of the world. Progressive Web Apps merge the
web world and the native app world. Simply put, PWAs are the native app like web
applications that are making everyone’s lives much easier.
10.5 SUMMARY
Mobile applications are vital to business growth. Therefore, the process and strategy
of mobile application development must be designed in a way that various parameters
are taken into consideration. It hopes that found the outlines of the transition of design
to development, important elements to consider in development with various
approaches are recommended for any application development project useful. It is
more involved than simply having an idea for a product or service that it had like to
introduce by just building an application.
19
Web, Mobile and CASE 10.6 SOLUTIONS / ANSWERS
tools
Reference Websites
http://developer.apple.com/iphone/index.action
http://developer.android.com/guide/index.html
http://scrum.org
20
Case Tools
UNIT 11 CASE TOOLS
Structure Page Nos.
11.0 Introduction 31
11.1 Objectives 31
11.2 What are CASE Tools? 31
11.2.1 Categories of CASE Tools
11.2.2 Need of CASE Tools
11.2.3 Factors that affect deployment of CASE
Tools in an organisation
11.2.4 Characteristics of a successful CASE Tool
11.3 CASE Software Development Environment 35
11.4 CASE Tools and Requirement Engineering 36
11.5 CASE Tools and Design and Implementation 39
11.6 Software Testing 42
11.7 Software Quality and CASE Tools 43
11.8 Software Configuration Management 44
11.9 Software Project Management and CASE Tools 45
11.10 Summary 46
11.11 Solutions/Answers 47
11.12 Further Readings 48
11.0 INTRODUCTION
Software Engineering is broadly associated with the development of quality software
with increasing use of software preparation standards and guidelines. Software is the
single most expensive item in a computer system as the cost of software during the
life time of a machine is equivalent to more than 95% of the total cost (including
hardware). Software Engineering requires a lot of data collection and information
generation. Since the computer itself is a very useful device as the information
processor, it may be a good idea to automate software engineering tasks. Computer
Aided Software Engineering (CASE) tools instill many software engineering tasks
with the help of information created using computer. CASE tools support software
engineering tasks and are available for different tasks of the Software Development
Life Cycle (SDLC). You have been introduced to CASE tools in Unit 10 of
MCS-014. This unit covers various aspects of these CASE tools and their
functionality for various phases of software development.
11.1 OBJECTIVES
After going through this unit, you should be able to:
define different kinds of CASE tools and the needs of the CASE tools;
describe the features of analysis, design, tools use in Software Engineering; and
identify software configuration management, and project management tool.
31
Web, Mobile and
CASE tools
software development life cycle such as analysis, design, etc., including umbrella
activities such as project management, configuration management etc. The CASE
tools in general, support standard software development methods such as Jackson
Structure programming or structured system analysis and design method. The CASE
tools follow a typical process for the development of the system, for example, for
developing data base application, CASE tools may support the following development
steps:
Creation of data flow and entity models
Establishing a relationship between requirements and models
Development of top-level design
Development of functional and process description
Development of test cases.
The CASE tools on the basis of the above specifications can help in automatically
generating data base tables, forms and reports, and user documentation.
Thus, the CASE tools –
support contemporary development of software systems, they may improve the
quality of the software
help in automating the software development life cycles by use of certain
standard methods
create an organsiation wide environment that minimizes repetitive work
help developers to concentrate more on top level and more creative problem-
solving tasks
support and improve the quality of documentation (Completeness and non-
ambiguity), testing process (provides automated checking), project management
and software maintenance.
Most of the CASE tools include one or more of the following types of tools:
Analysis tools
Repository to store all diagrams, forms, models and report definitions etc.
Diagramming tools
Screen and report generators
Code generators
Documentation generators
Reverse Engineering tools (that take source code as input and produce graphical
and textual representations of program design-level information)
Re-engineering tools (that take source code as the input analyse it and
interactively alters an existing system to improve quality and/or performance).
Some necessary features that must be supported by CASE tools in addition to the
above are:
Back up and
Recovery Prototyping
Tools
The
repository
Documentation tools Configuration
management
Analysis and
Integrated
Design Models
Screen designer CASE tool
Report designer
Code designer
Program editor
(Lower CASE tools)
Programmer’s
Tool kits Source code
Compliers
Linkers
Interpreters
Debuggers
Machine
Instructions
33
Web, Mobile and
CASE tools 11.2.2 Need of CASE Tools
The software development process is expensive and as the projects become more
complex in nature, the project implementations become more demanding and
expensive. The CASE tools provide the integrated homogenous environment for the
development of complex projects. They allow creating a shared repository of
information that can be utilised to minimise the software development time. The
CASE tools also provide the environment for monitoring and controlling projects such
that team leaders are able to manage the complex projects. Specifically, the CASE
tools are normally deployed to –
Reduce the cost as they automate many repetitive manual tasks.
Reduce development time of the project as they support standardisation and
avoid repetition and reuse.
Develop better quality complex projects as they provide greater consistency and
coordination.
Create good quality documentation
Create systems that are maintainable because of proper control of configuration
item that support traceability requirements.
But please note that CASE tools cannot do the following:
Complex functionality
Many project management problems are not amenable to automation. Hence,
CASE tools cannot be used in such cases.
35
Web, Mobile and
CASE tools Present CASE tools support Unified Model Language (UML).
We will elaborate on the features of CASE tools for various stages of software
development process in coming sub-sections.
CASE and Web Engineering
CASE Tools are also very useful in the design, development and implementation of
web site development.
Web Engineering requires tools in many categories. They are:
Site content management tools
Site version control tools
Server management tool
Site optimisation tools
Web authoring and deployment tools
Site testing tools that include load and performance testing
Link checkers
Program checkers
Web security test tools.
A detailed discussion on these tools is beyond the scope of this unit. However, various
stages of development of a web project also follows the normal SDLC. These are
discussed in the subsequent sections.
One of the major risk factors that affect project schedule, budget and quality can be
defined as the ability to successfully elicit requirements to get a solution.
Statistically it has been seen that about 80% of rework in projects is due to
requirement defects.
How can a CASE tools help in effective Requirements Engineering (RE)
A good and effective requirements engineering tool needs to incorporate the best
practices of requirements definition and management.
The requirements Engineering approach should be highly iterative with the goal of
establishing managed and effective communication and collaboration.
Thus, a CASE tool must have the following features from the requirements
engineering viewpoint:
a dynamic, rich editing environment for team members to capture and manage
requirements
to create a centralised repository
to create task-driven workflow to do change management, and defect tracking.
But, what is a good process of Requirements Engineering for the CASE?
36
A simple four-step process for requirements engineering is given in Figure 11.3. Case Tools
Requirement
Elicitation
Requirements
Requirement Specification
Management Engineering
Validation
One of the major features supported by CASE tools for specification is that the design
and implementation should be traceable to requirements. A good way to do so is to
support a label or a tag to the requirements. In addition it should have the following
features:
37
Web, Mobile and
CASE tools What do we expect from the tool?
It should allow development of a labeled requirements document that helps in
traceability of requirements.
It should allow both functional and non-functional requirements with related
quality attributes to be made.
We should be able to develop the associated models.
38
Validation of Requirements Case Tools
Most CASE Tools store requirement baselines, including type, status, priority and
change history of a software item. Such traceability may be bi-directional in nature.
Structured Chart.
Pogram Document Language (PDL).
Optimisation of ER and other models.
Flow charts.
Database design tools.
File design tools.
Some of functions that these diagrams tool support are simple but are very
communicative as far as representations of the information of the analysis and design
phases are concerned. CASE Tools also support standard representation of program
architecture; they also contain testing items related to the design and debugging.
Automatic support for maintenance is provided in case any of the requirements or
design items is modified using these diagrams. These CASE tools also support
39
Web, Mobile and
CASE tools error-checking stages. They allow checks for completeness and consistency of the
required functional design types and consistency at various levels of cross referencing
among the documents consistency checking for these documents during the
requirements analysis and design phases.
Proper modeling helps in proper design architecture. All the CASE tools have strong
support for models. They also help in resolving conflicts and ambiguity among the
models and help in optimising them to create excellent design architecture and process
implementation.
But why do we need to model?
Can you understand code? If you understand it, then why would you call it code?
Models also help in better planning and reduction of risk as one can make top down
models, thus controlling complexity.
CASE tools provide continuously synchronized models and code, thus also help in
consistent understanding of information and documentation. It also helps other
software developers to understand the portions and relationships to portions other
team members are working on.
Help in management of source code through a more visual model.
40
Refactoring of the code allows a re-look and improvement of code, as modeling tools Case Tools
contains, thus are most continuously sychronised code and models suitable for
refactoring.
Modeling can help in creating good patterns including modeling patterns, language
specific patterns and basic patterns for common operations such as implementing
interfaces, etc.
Models also facilitate reverse engineering.
Given the task of maintaining software that was built by a team that has moved on to a
new project, there may be very little documentation available for the project.
The value of a modeling tool can be tremendous in such cases. The developer can take
the existing code, create models for it to understand the software. This can save a lot
of time for the developer.
A modeling tool should have been integrated with requirements tools, so that
architects see consistently unambiguous information.
Models: Flow models, state models, data models, UML document etc.
41
Web, Mobile and
CASE tools The CASE repository has two primary segments.
1. Information repository
2. Data dictionary.
Information Repository includes information about an organisation’s business
information and its applications.
The CASE tools manage and control access to repository. Such information data can
also be stored in corporate database.
Data dictionary contains all the data definitions for all organisational applications,
along with cross-referencing if any.
Its entries have a standard definition, viz., element name and alias; textual description
of the element; related elements; element type and format; range of acceptable values
and other information unique to the proper processing of the element.
CASE Repository has additional advantages such that it assists the project
management tasks; aids in software reusability by enabling software modules in a
manner so that they can be used again.
Implementation tools and CASE
CASE tools provide the following features for implementation:
Diagramming tools enable visual representation of a system and its components
Allow representing process flows.
Help in implementing the data structures and program structures
Support automatic creation of system forms and reports.
Ready prototype generation.
Create of both technical and user documentation.
Create master templates used to verify documentation and its conformance to all
stages of the Software Development Life Cycle (SDLC).
Enable the automatic generation of program and database from the design
documents, diagrams, forms and reports stored in the repository.
Design: In design the prime focus of the quality starts with the testing of the
architecture of the software. CASE tools help in detecting, isolating and resolving
structure deficiency during the design process. On an average, a developer makes 100
to 150 errors for every thousand lines of code. Assuming only 5% of these errors are
43
Web, Mobile and
CASE tools serious, if software has ten thousand lines of code you may still have around 50
serious coding errors in your system. One of the newer software development
processes called the Agile process helps in reducing such problems by asking the
developer to design their test items first before the coding.
A very good approach that is supported by CASE tools specially running time
development of C, C++, JAVA or .NET code is to provide a set of automatic run time
Language tools for development of reliable and high performance applications.
Testing: Functionality and performance testing is an integrated part of ensuring high
quality product. CASE support automated testing tools that help in testing the
software, thus, helping in improving the quality of testing. CASE tools enhance the
speed breadth and reliability of these design procedures. The design tools are very
important specifically in case of a web based system where scalability and reliability
are two major issues of design.
Deployment: After proper testing a software goes through the phase of deployment
where a system is made operational. A system failure should not result in a complete
failure of the software on restart. CASE tools also help in this particular place. In
addition, they support configuration management to help any kind of change thus to
be made in the software.
Quality is teamwork: It involves integration of workflow of various individuals. It
establishes a traceability and communication of information, all that can be achieved
by sharing workload documents keeping their configuration items.
44
This documents a software build and enables versions to be reproduced on Case Tools
demand
Configuration lookup scheme that enables only the changed files to be rebuilt.
Thus, entire application need not be rebuilt.
Dependency detection features even hidden dependencies, thus ensuring correct
behaviour of the software in partial rebuilding.
Ability for team members to share existing objects, thus saving time of the team
members.
Figure 11.8 shows a simple Configuration Management based rebuilding and
deployment process.
Configuration
Approval
An SCM Completion status Test management
Environment Environment support for
automatic
deployment
Version Package
controlled ready for
software deployment
build
A software team involves designers, developers, and testers who work together for
delivering the best solution in the shortest time. Sometimes, these teams can be
geographically dispersed. Managing such a team may be a major change requests, and
task management.
The CASE tools help in effective management of teams and projects. Let us look into
some of the features of CASE in this respect:
Sharing and securing the project using the user name and passwords.
Allowing reading of project related documents
Allowing exclusive editing of documents
Linking the documents for sharing
Automatically communicative change requests to approver and all the persons
who are sharing the document.
You can read change requests for yourself and act on them accordingly.
Setting of revision labels so that versioning can be done.
Any addition or deletion of files from the repository is indicated.
Any updating of files in repository is automatically made available to users.
Conflicts among versions are reported and avoided
Differences among versions can be visualized.
45
Web, Mobile and
CASE tools The linked folder, topics, and change requests to an item can be created and
these items if needed can be accessed.
It should have reporting capabilities of information
The project management tools provide the following benefits:
They allow control of projects through tasks so control complexity.
They allow tracking of project events and milestones.
The progress can be monitored using Gantt chart.
Web based project related information can be provided.
Automatic notifications and mails can be generated.
Some of the features that you should look into project management software are:
It should support drawing of schedules using PERT and Gantt chart.
It should be easy to use such that tasks can be entered easily, the links among
the tasks should be easily desirable.
Milestones and critical path should be highlighted.
It should support editing capabilities for adding/deleting/moving tasks.
Should map timeline information against a calendar.
Should allow marking of durations for each task graphically.
It should provide views tasks, resources, or resource usage by task.
Should be useable on network and should be able to share information through
network.
Check Your Progress 3
1) How do CASE tools support quality?
……………………………………………………………………………………
……………………………………………………………………………………
11.10 SUMMARY
This unit provides an introduction to CASE tools in action. The CASE tools are
primarily used to automate the stages of the Software Development Life Cycle. It
automates most of the tasks of software engineering such as requirements analysis,
modeling, designing, support for testing, and implementation, project management,
software configuration management, software quality management, etc. CASE tools
also help in traceability of requirements. They are useful tools for reverse engineering.
Presently, many CASE tools which integrate the complete Software Development Life
Cycle are available and can be deployed successfully in an organisation. These CASE
tools support standard methodology, provide flexibility of environment, strong
integration of various software development stages, reverse engineering, project
management, and configuration management under one single environment.
However, it is to be noted that all deployments of CASE have not succeeded.
46
Successful CASE tools are those which are simple to use support standard Case Tools
methodology, and reverse engineering and have a strong vendor support including
training.
11.11 SOLUTIONS/ANSWERS
Check Your Progress 1
1) CASE tools are needed for
Development of cost effective software
Minimisation of development time
Standardising the software development process
Avoiding repetition and maximising reuse
Development of better quality product
Collaborative developments etc.
2) CASE tools
Follow standard methodology
Allow integration of information
Allow traceability
Help improving of quality
Reduce cost
Support reverse engineering
Provide on-line help
Check for inconsistency of information
Provide tools for configuration management and project management.
47
Web, Mobile and
CASE tools the design phase they may point out any inconsistency, in the test phase they
may point out the reliability of software, etc.
2) CASE tools control the baseline configuration items thus support a strict
change control such that any changes made during any life cycle phase results
in automatic flagging of the various documents of various stages of SDLC
affected by that change. They also help in version control.
3) No. They are only predictors of various failures to meet the schedule of the
project.
48
Advanced Topics in
UNIT 12 ADVANCED TOPICS IN SOFTWARE Software Engineering
ENGINEERING
Structure Page Nos.
12.0 Introduction 49
12.1 Objectives 50
12.2 Evolution of Formal Methods 50
12.3 Use of Mathematics in Software Development 51
12.4 Formal Methods 51
12.4.1 What Can Be Formally Specified?
12.4.2 Goals of Formal Specification
12.5 Application Areas 53
12.6 Limitations of Formal Specification Using Formal Methods 54
12.7 Cleanroom Software Engineering 55
12.8 Conventional Software Engineering Models Vs. Cleanroom Software
Engineering Model 56
12.9 Cleanroom Software Engineering Principles, Strategy and
Process Overview 56
12.10 Limitations of Cleanroom Engineering 57
12.11 Similarities and Differences between Cleanroom and OO Paradigm 58
12.12 Software Reuse and its Types 58
12.13 Why Component based Software Engineering? 59
12.14 Component based Software Engineering (CBSE) Process 60
12.14.1 Domain Engineering
12.14.2 Component based Development
12.15 Component Technologies Available 62
12.16 Challenges for CBSE 62
12.17 Reengineering: An Introduction 64
12.18 Objectives of Reengineering 64
12.19 Software Reengineering Life Cycle 65
12.20 Summary 66
12.21 Solutions / Answers 67
12.22 Further Readings 68
12.23 Glossary 68
12.0 INTRODUCTION
In the first few units we have studied the various methods for conventional software
engineering. Software engineering methods can be categorised on a “formality
spectrum.” The analysis and design methods discussed previously would be placed at
the informal to moderately rigorous end of the spectrum. In these methods, a
combination of diagrams, text, tables, and simple notation is used to create analysis
and design models.
At the other end of the formality spectrum are formal methods, which are completely
mathematical in form. A specification and design are described using a formal syntax
and semantics that specify system function and behaviour. Other specialised models
being the Cleanroom software engineering, component-based software engineering,
re-engineering and reverse engineering.
Harlan Mills has developed the Cleanroom software engineering methodology, which
is an approach for integrating formal methods into the lifecycle. The Cleanroom
approach combines formal methods and structured programming with Statistical
Process Control (SPC), the spiral lifecycle and incremental releases, inspections, and
software reliability modeling. It fosters attitudes, such as emphasising defect
prevention over defect removal, that are associated with high quality products in non-
software fields.
49
Web, Mobile and
CASE tools In most engineering disciplines, systems are designed by composition (building
system out of components that have been used in other systems). Software
engineering has focused on custom development of components. To achieve better
software quality, more quickly, at lower costs, software engineers are beginning to
adopt systematic reuse as a design process. There are various ways to achieve this and
one of the models is the Component-based software engineering.
Let us study the various specialised software engineering models like the formal
method, Cleanroom engineering, component-based engineering, re-engineering and
reverse engineering in this unit.
12.1 OBJECTIVES
After going through this unit, you should be able to:
understand the pitfalls of the conventional software engineering;
know various advanced methods of software engineering – their advantages and
drawbacks;
describe the methodology of formal methods and Cleanroom software
engineering, and
discuss the Re-engineering and Reverse engineering process.
51
Web, Mobile and The major concerns of the formal methods are as follows:
CASE tools
i) The correctness of the problem
o producing software that is “correct” is famously difficult;
o by using rigorous mathematical techniques, it may be possible to make
probably correct software.
ii) Programs are mathematical objects
o they are expressed in a formal language;
o they have a formal semantics;
o programs can be treated as mathematical theories.
Formal methods support precise and rigorous specifications of those aspects of a
computer system capable of being expressed in the language. Since defining what a
system should do, and understanding the implications of these decisions, are the most
troublesome problems in software engineering, this use of formal methods has major
benefits. In fact, practitioners of formal methods frequently use formal methods solely
for recording precise specifications, not for formal verifications.
Formal methods were originally developed to support verifications, but higher interest
currently exists in specification methods. Several methods and languages can be used
for specifying the functionality of computer systems. No single language, of those
now available, is equally appropriate for all methods, application domains, and
aspects of a system. Thus, users of formal specification techniques need to understand
the strength and weaknesses of different methods and languages before deciding on
which to adopt. The distinction between a specification method and a language is
fundamental. A method states what a specification must say. A language determines
in detail how the concepts in a specification can be expressed. Some languages
support more than one method, while most methods can be used in several
specification languages.
Some of the most well-known formal methods consist of or include specification
languages for recording a system’s functionality. These methods include:
Z (pronounced “Zed”)
Communicating Sequential Processes (CSP)
Vienna Development Method (VDM)
Larch
Formal Development Methodology (FDM)
12.4.1 What can be Formally Specified?
Formal methods can include graphical languages. Data Flow Diagrams (DFDs) are the
most well-known graphical technique for specifying the function of a system. DFDs
can be considered a semi-formal method, and researchers have explored techniques
for treating DFDs in a completely formal manner. Petri nets provide another well-
known graphical technique, often used in distributed systems. Petri nets are a fully
formal technique.
Finally, finite state machines are often presented in tabular form. This does not
decrease the formalism in the use of finite state machines. So the definition of formal
methods provided earlier is quite encompassing.
Software engineers produce models and define the properties of systems at several
levels of abstraction. Formal methods can be employed at each level. A specification
should describe what a system should do, but not how it is done. More details are
provided in designs, with the source code providing the most detailed model.
For example, Abstract Data Types (ADTs) frequently are employed at intermediate
levels of abstraction. ADTs, being mathematical entities, are perfect candidates for
formal treatment and are often so treated in the literature.
Formal methods are not confined to the software components of large systems.
System engineers frequently use formal methods. Hardware engineers also use formal
methods, such as VHSIC Hardware Description Language (VHDL) descriptions, to
52
model integrated circuits before fabricating them. The following section lists the goals Advanced Topics in
Software Engineering
of the formal specification.
12.4.2 Goals of Formal Specification
Once a formal description of a system has been produced, what can be done with it?
Usable formal methods provide a variety of techniques for reasoning about
specifications and drawing implications. The completeness and consistency of a
specification can be explored. Does a description imply a system should be in several
states simultaneously? Do all legal inputs yield one and only one output? What
surprising results, perhaps unintended, can be produced by a system? Formal methods
provide reasoning techniques to explore these questions. Do lower level descriptions
of a system properly implement higher level descriptions? Formal methods support
formal verification, the construction of formal proofs that an implementation satisfies
a specification. The possibility of constructing such formal proofs was historically the
principal driver in the development of formal methods. Prominent technology for
formal verification includes E Dijkstra's “weakest precondition” calculus and Harlan
Mills’ “functional correctness” approach which we are not going to discuss here. The
following are the goals of the formal specification:
Removal of ambiguity: The formal syntax of a specification language enables
requirements or design to be interpreted in only one way, eliminating the
ambiguity that often occurs when using natural language. Removes ambiguity
and encourages greater rigour in the early stages of the software engineering
process.
Consistency: Facts stated in one place should not be contradicted in
another. This is ensured by mathematically proving that initial facts can be
formally mapped (by inference) into later statements later in the specification.
Completeness: This is difficult, even when using formal methods. Some
aspects of a system may be left undefined by mistake or by intention. It is
impossible to consider every operational scenario in a large, complex system.
Let us see the drawbacks of the formal specifications in the next section.
53
Web, Mobile and
CASE tools 12.6 LIMITATIONS OF FORMAL SPECIFICATION
USING FORMAL METHODS
Some problems exist, however formal specification focuses primarily on function and
data. Timing, control, and behavioural aspects of a problem are more difficult to
represent. In addition, there are elements of a problem (e.g., HCI, the human-machine
interface) that are better specified using graphical techniques. Finally, a specification
using formal methods is more difficult to learn than other analysis methods. For this
reason, it is likely that formal mathematical specification techniques will be
incorporated into a future generation of CASE tools. When this occurs,
mathematically-based specification may be adopted by a wider segment of the
software engineering community. The following are the major drawbacks:
Cost: It can be almost as costly to do a full formal specification as to do all the coding.
The solution for this is, don’t formally specify everything, just the subsystems you
need to (hard, complex, or critical).
Complexity: Not everybody can read formal specifications (especially customers and
users). The solution is to provide a very good and detailed documentation. No one
wants to read pure formal specifications–formal specifications should always be
interspersed with natural language (e.g. English) explanation.
Deficiencies of Less Formal Approaches: The methods of structured and object-
oriented design discussed previously make heavy use of natural language and a
variety of graphical notations. Although careful application of these analysis and
design methods can and does lead to high–quality software, sloppiness in the
application of these methods can create a variety of problems which are:
Contradictions: statements that are at variance with one another.
Ambiguities : statements that can be interpreted in a number of ways
Vagueness : statements that lack precision, and contribute little information.
Incomplete statements : a description is not functionally complete.
Mixed levels of abstraction : statements with high and low levels of detail are
interspersed, which can make it difficult to comprehend the functional
architecture.
This method gained popularity among the software developers who must build safety-
critical software like aircraft avionics and medical devices. But the applicability in the
business environment has not clicked.
Let us study the Cleanroom Software Engineering in the next section.
56
Certification: Once verification, inspection, and usage testing are complete and all Advanced Topics in
Software Engineering
defects removed, the increment is certified as ready for integration.
Figure 12.1 depicts the Cleanroom software engineering development overview:
Develop
operational Design Test
profile statistical integrated
tests system
59
Web, Mobile and the team now examines the requirements to determine what subset is directly
CASE tools amenable to composition, rather than construction.
For each requirement, we should question:
Whether any commercial off-the-shelf (COTS) components available to
implement the requirement?
Whether internally developed reusable components available to implement the
requirement?
Whether interfaces for available components compatible within the architecture
of the system to be built?
The team will attempt to modify or remove those system requirements that cannot be
implemented with COTS or in-house components. This is not always possible or
practical, but reduces the overall system cost and improves the time to market of the
software system. It can often be useful to prioritise the requirements, or else
developers may find themselves coding components that are no longer necessary as
they have been eliminated from the requirements already.
The CBSE process identifies not only candidate components but also qualifies each
component’s interface, adapts components to remove architectural mismatches,
assembles components into selected architectural style, and updates components as
requirements for the system change.
Two processes occur in parallel during the CBSE process. These are:
Domain Engineering
Component Based Development.
CBSE is facing many challenges today, some of these are summarised as follows:
Dependable systems and CBSE: The use of CBD in safety-critical domains,
real-time systems, and different process-control systems, in which the reliability
requirements are more rigorous, is particularly challenging. A major problem
with CBD is the limited possibility of ensuring the quality and other non-
functional attributes of the components and thus our inability to guarantee
specific system attributes.
Tool support: The purpose of Software Engineering is to provide practical
solutions to practical problems, and the existence of appropriate tools is
essential for a successful CBSE performance. Development tools, such as
Visual Basic, have proved to be extremely successful, but many other tools are
yet to appear – component selection and evaluation tools, component
repositories and tools for managing the repositories, component test tools,
component-based design tools, run-time system analysis tools, component
configuration tools, etc. The objective of CBSE is to build systems from
components simply and efficiently, and this can only be achieved with extensive
tool support.
Trusted components: Because the trend is to deliver components in binary
form and the component development process is outside the control of
component users, questions related to component trustworthiness become of
great importance.
Component certification: One way of classifying components is to certificate
them. In spite of the common belief that certification means absolute
trustworthiness, it is in fact only gives the results of tests performed and a
description of the environment in which the tests were performed. While
certification is a standard procedure in many domains, it is not yet established in
software in general and especially not for software components.
Composition predictability: Even if we assume that we can specify all the
relevant attributes of components, it is not known how these attributes
determine the corresponding attributes of systems of which they are composed.
The ideal approach, to derive system attributes from component attributes is still
a subject of research. A question remains - “Is such derivation at all possible?
Or should we not concentrate on the measurement of the attributes of
component composites?”
Requirements management and component selection: Requirements
management is a complex process. A problem of requirements management is
that requirements in general are incomplete, imprecise and contradictory. In an
in-house development, the main objective is to implement a system which will
satisfy the requirements as far as possible within a specified framework of
different constraints. In component-based development, the fundamental
approach is the reuse of existing components. The process of engineering
requirements is much more complex as the possible candidate components are
usually lacking one or more features which meet the system requirements
exactly. In addition, even if some components are individually well suited to the
62
system, it is not necessary that they do not function optimally in combination Advanced Topics in
Software Engineering
with others in the system- or perhaps not at all. These constraints may require
another approach in requirements engineering – an analysis of the feasibility of
requirements in relation to the components available and the consequent
modification of requirements. As there are many uncertainties in the process of
component selection there is a need for a strategy for managing risks in the
components selection and evolution process.
Long-term management of component-based systems: As component-based
systems include sub-systems and components with independent lifecycles, the
problem of system evolution becomes significantly more complex. CBSE is a
new approach and there is little experience as yet of the maintainability of such
systems. There is a risk that many such systems will be troublesome to maintain.
Development models: Although existing development models demonstrate
powerful technologies, they have many ambiguous characteristics, they are
incomplete, and they are difficult to use.
Component configurations: Complex systems may include many components
which, in turn, include other components. In many cases compositions of
components will be treated as components. As soon as we begin to work with
complex structures, the problems involved with structure configuration pop up.
Modification
Forward Engineering
System Requirements System Requirements
Reverse Engineering
Re specify
Re design
System Design System Design
Source code analysis phase: This phase refers to the identification of the parts of the
code that are responsible for violations of requirements originally specified in the
system’s analysis phase. This task encompasses the design of methods and tools to
inspect, measure, rank, and visualize software structures. Detecting error prone code
that deviates from its initial requirement specifications requires a way to measure
where and by how much these requirements are violated. Problem detection can be
based on a static analysis of the legacy system (i.e., analysing its source code or its
design structure), but it can also rely on a dynamic usage analysis of the system (i.e.,
an investigation of how programs behave at run-time).
Remediation phase: It refers to the selection of a target software structure that aims
to repair a design or a source code defect with respect to a target quality requirement.
Because legacy applications have been evolved in such a way that classes, objects,
and methods may heavily depend on each other, a detected problem may have to be
decomposed into simpler sub-problems.
Evaluation phase refers to the process of assessing the new system as well as
establishing and integrating the revised system throughout the corporate operating
environment. This might involve the need for training and possibly the need for
adopting a new improved business process model.
Such a reengineering life-cycle yields a reengineering process. First, the source code
is represented as an Abstract Syntax Tree. The tree is further decorated with
annotations that provide linkage, scope, and type information. Once software artifacts
have been understood, classified and stored during the reverse engineering phase, their
behaviour can be readily available to the system during the forward engineering phase.
Then, the forward engineering phase aims to produce a new version of a legacy
system that operates on the target architecture and aims to address specific
maintainability or performance enhancements. Finally, we use an iterative procedure
to obtain the new migrant source code by selecting and applying a transformation
which leads to performance or maintainability enhancements. The transformation is
selected from the soft-goal interdependency graphs. The resulting migrant system is
then evaluated and the step is repeated until the specific quality requirements are met.
65
Web, Mobile and 2) What is Reverse Engineering?
CASE tools
……………………………………………………………………………………
……………………………………………………………………………………
12.20 SUMMARY
In this unit, we have gone through the Formal Methods, Cleanroom software
engineering, Component Based Software Engineering and the Software
Reengineering process.
Formal methods promise to yield benefits in quality and productivity. They provide
an exciting paradigm for understanding software and its development, as well as a set
of techniques for use by software engineers. Formal methods can provide more
precise specifications, better internal communication, and an ability to verify designs
before executing them during test, higher quality and productivity. To get their full
advantages, formal methods should be incorporated into a software organisation’s
standard procedures. Software development is a social process, and the techniques
employed need to support that process. How to fully fit formal methods into the
lifecycle is not fully understood. Perhaps there is no universal answer, but only
solutions that vary from organisation to organisation.
Harlan Mills has developed the Cleanroom methodology, which is one approach for
integrating formal methods into the lifecycle. The Cleanroom approach combines
formal methods and structured programming with Statistical Process Control (SPC),
the spiral lifecycle and incremental releases, inspections, and software reliability
modeling. It fosters attitudes, such as emphasising defect prevention over defect
removal, that are associated with high quality products in non-software fields.
Component Based Software Engineering introduced major changes into design and
development practices, which introduces extra cost. Software engineers need to
employ new processes and ways of thinking – this, too, can introduce extra cost in
training and education. However, initial studies into the impact of CBSE on product
quality, development quality and cost, show an overall gain, and so it seems likely
that continuing these practices in the future will improve software development. It is
still not clear how exactly CBSE will mature, but it is clear that it aids in the
development of today’s large-scale systems, and will continue to aid in the
development of future systems, and is the perfect platform for addressing the
requirements of modern businesses.
66
iii) Automated programming: Automating the process of program Advanced Topics in
Software Engineering
generation.
Check Your Progress 2
1) The Cleanroom methodology is an iterative, life-cycle approach focused on
software quality, especially reliability. Begun by Harlan Mills, it combines
formal specifications, structured programming, formal verifications, formal
inspections, functional testing based on random selection of test data,
software reliability measurement, and Statistical Process Control (SPC) in an
integrated whole. The Cleanroom approach fosters attitudes, such as
emphasising defect prevention over defect removal, that are associated with
high quality products in fields other than software.
2) Statistical Process Control (SPC) is commonly used in manufacturing,
involves continuous process monitoring and improvement to reduce the
variance of outputs and to ensure that the process remains under control.
3) Benefits of Cleanroom software engineering include significant improvements
in correctness, reliability, and understandability. These benefits usually
translate into a reduction in field-experienced product failures, reduced cycle
time, ease of maintenance, and longer product life.
4) Cleanroom techniques are too theoretical, too mathematical, and too radical
for use in real software development. They rely on correctness verification
and statistical quality control rather than unit testing (a major departure from
traditional software development). Organisations operating at the ad hoc level
of the Capability Maturity Model do not make rigorous use of the defined
processes needed in all phases of the software life cycle.
Check Your Progress 3
1) Benefits of software reuse are:
Increased Reliability: components already exercised in working systems
Reduced Process Risk: Less uncertainty in development costs
Effective Use of components: Reuse components instead of people
Standards Compliance: Embed standards in reusable components
Accelerated Development: Avoid custom development and speed up delivery.
2) COTS systems usually have a complete applications library and also offers an
applications programming interface (API). These are helpful in building large
systems by integrating COTS components is a viable development strategy for
some types of systems (e.g., E-commerce or video games).
Check Your Progress 4
1) Software reengineering is a process that aims to either
i) Improve understanding of a piece of software, or
ii) Prepare for an improvement in the software itself (e.g., increasing its
maintainability or reusability).
As the name suggests software reengineering is applied to existing pieces of software,
in an after-the-fact fashion, via the reapplication of an engineering process. Software
reengineering is a very wide-ranging term that encompasses a great many activities.
For example, software reengineering could involve refactoring a piece of software,
redocumenting it, reverse engineering it or changing its implementation language.
2) Reverse engineering is a process which is used to improve the understanding of
a program. So-called program comprehension is crucial to maintenance.
Approximately 50% of the development time of programmers is spent
understanding the code that they are working on. Reverse engineering often
involves the production of diagrams. It can be used to abstract away irrelevant
67
Web, Mobile and implementation and design details to recover the original requirements of the
CASE tools program.
Mc Graw-Hill.
Reference websites
http://www.rspa.com
http://www.ieee.org
12.23 GLOSSARY
Software Reengineering: The examination and alteration of an existing subject
system to reconstitute it in a new form. This process encompasses a combination of
sub-processes such as reverse engineering, restructuring, redocumentation, forward
engineering, and retargeting.
Reverse Engineering: The engineering process of understanding, analysing, and
abstracting the system to a new form at a higher abstraction level.
Forward Engineering: Forward engineering is the set of engineering activities that
consume the products and artifacts derived from legacy software and new
requirements to produce a new target system.
Data Reengineering: Tools that perform all the reengineeering functions associated
with source code (reverse engineering, forward engineering, translation,
redocumentation, restructuring / normalisation, and retargeting) but act upon data
files.
Redocumentation: The process of analysing the system to produce support
documentation in various forms including users manuals and reformatting the
systems’ source code listings.
Restructuring: The engineering process of transforming the system from one
representation form to another at the same relative abstraction level, while preserving
the subject system’s external functional behavior.
68
Software Process
Improvement
UNIT 13 SOFTWARE PROCESS IMPROVEMENT
Structure
13.0 Introduction
13.1 Objectives
13.2 Software Engineering Institute Capability Maturity Model Integrated (SEI
CMMi)
13.3 Software Process Optimization through First Time Right framework.
13.3.1 Requirements Related Optimizations
13.3.2 Architecture and Design Related Optimizations
13.3.3 Security Related Optimizations
13.3.4 Testing Related Optimizations
13.3.5 Development Related Optimizations
13.3.6 DevOps Related Optimizations
13.3.7 Infrastructure Related Optimizations
13.3.8 Project Management Related Optimizations
13.3.9 Governance Related Optimizations
13.3.10 Tools
13.4 Software Process Optimization for Validation Phase
13.4.1 Performance Testing Tools
13.4.2 Performance Monitoring and Notification
13.4.3 Performance Monitoring Tools
13.5 SEI CMM Process Examples
13.5.1 Requirements Development
13.5.2 Technical Solution
13.5.3 Requirements Management
13.5.4 Product Integration
13.5.5 Project planning
13.6 Summary
13.7 Solutions/Answers
13.8 Further Readings
13.0 INTRODUCTION
29
Advanced Topics in
Software Engineering
13.1 OBJECTIVES
We have depicted the various levels of the SEI CMMi in the Figure 13.2.
The figure 13.2 elaborates all the SEI CMM levels and the key focus areas and
processes at each of the levels. The initial stage is the as-is stage of the organization.
Level 1 is called “Managed” wherein the key focus area is basic project management.
At this stage, we optimize and improve the processes related to requirements
management, project planning, project monitoring, supplier agreement, and
measurement, process and product quality assurance and configuration management.
31
Advanced Topics in Level 3 is “Defined” stage wherein we standardize the processes. We standardize the
Software Engineering processes related to requirements development, technical solution, process integration,
verification, validation, risk management, organizational process focus, organizational
process definition, and integrated project management and decision analysis.
Level 4 is called “Quantitatively managed” stage where quantitative management is
the main focus area. We aim to optimize the processes such as organizational process
performance and quantitative project management.
The final level 5 is called “Continuous process improvement” wherein we focus on
iteratively improving the organizational processes such as organizational innovation
and deployment and causal analysis and resolution.
We look at examples for various SEI CMM levels in later section.
We have detailed the first time right (FTR) framework that incorporates the best
practices at various phases of the software engineering. As part of the FTR framework
we have explained the key best practices, methods, tools and improvement techniques
during SDLC phases including requirements gathering, architecture and design,
testing, DevOps, Infrastructure, project management and governance.
In many scenarios the requirement gaps snowball into production issues. Hence it is
crucial to plug all the gaps in the requirements stage. We have proposed below given
optimizations during requirements elaboration stage:
Requirement traceability matrix: The business analysts and the project manager
should jointly own the requirement traceability matrix that maps each use
case/Jira story to the corresponding test case, code artefact and the release details
to ensure that there are no gaps in the delivery.
Metrics and SLA definition and sign-off: We need to quantify the functional
and non-functional requirements with accurate metrics and SLAs. For instance, a
requirement like “performance should be good” is vague and ambiguous; we
should formally quantity it as “the total page load time for the home page should
be less than 2 second with the maximum concurrent user load of 100 users in the
North American geography”. We need to define the metrics related to application
response time, availability, scalability, security and get a formal signoff from
business ness.
NFR definition and sign-off: All the non-functional requirements such as
security, performance, scalability, accessibility, multi-lingual capability and such
should be properly defined and signed off by the business.
Business stakeholder engagement: The business stakeholders should be actively
engaged throughout the requirement elaboration phase. Without active
stakeholder engagement we would miss the requirements and we would face
challenges in getting the sign-off.
Prototype demos: We should prepare the mockups/prototypes iteratively and
should do frequent demos to showcase the design, user journeys and multi-device
experience. This helps us to pro-actively solicit the feedback comments from all
the stakeholders and incorporate them.
Design Thinking Approach: Leverage the design thinking approach to
empathize with the user and iteratively define the optimal solution exploring the
alternatives. Use working ideation and prototype sessions to test the solutions.
During the architecture and design phase, we have has to ensure the following for
delivering the first time right design and architecture:
Patterns and best practices based design: The architect has to identify all the
application architecture patterns, Industry best practices and design patterns
applicable for the solution. As part of this exercise, we has to identify various
layers, components and the responsibilities.
Tools, frameworks, package evaluation and fitment: The architect has to
evaluate the market leading products, frameworks, open source libraries that are
best fit for the requirements. Leveraging proven frameworks, tools and open
source libraries greatly contribute to the improved productivity, turnaround time
and improved quality. For example as part of the architecture phase, the architect
has to critically evaluate technologies such as Angular vs React vs Vue for UI;
Spring Boot vs Serverless services, SQL vs NoSQL, mobile web vs hybrid app vs
native app, PaaS vs IaaS vs SaaS etc.
Standards and architecture principles definition: The architect has to define
the applicable standards for the solution and for the business domain. At this stage
the architect has to define the architecture principles such as headless design,
stateless integration, token based security etc. Few application domains need to
33
Advanced Topics in implement few standards for regulatory compliance (such as HIPAA for health
Software Engineering care domain)
Optimal NFR and Integration design: The architect has to design the
application to satisfy all the specified NFR (performance, scalability, availability
and such) and the integration SLAs.
Identification of automation tools: The architect has to identify all the
automation tools that can be used for the project. This includes automation tools
for code review, IDE, functional testing and such.
Feasibility validation PoCs: For complex requirements, we need to carry out the
feasibility assessment through proof-of-concepts (PoCs). This helps us to finalize
the tool, technology, integration method, performance and assess the scalability
and performance of the method.
As part of process improvement and optimization, we need to track the trends along
various dimensions such as architecture shift, technology shift, integration shift and
others and marked the recommended tenets for the solution. We have depicted the
sample architecture trends in Figure 13.4.
On the security front, we need to continuously monitor and audit for critical security
events (such as failed login attempts, password change events, impersonation events,
role change events etc.) and setup a notification infrastructure for the same.
We should also carry out the penetration testing and vulnerability testing iteratively to
discover the security vulnerabilities early.
A comprehensive validation is one of the key success factors for delivering the first
time right deliverable. The validation team needs to follow the below-given
optimizations:
Automated testing: The testing team has to use the automated tools such as
Apache JMeter or Selenium to automate the regression scenarios and other
functional test scenarios to improve the overall productivity.
Continuous iterative testing: The testing has to be a continuous and iterative
process across all sprints. The helps us to discover the defects in the early stage.
Testing metrics definition: The testing team has to define the quality metrics
such as defect rate, defect slippage rate, defect density and track the metrics with
each sprint.
34
Software Process
Dashboard based quality monitoring: The test lead should pro-actively monitor Improvement
all the testing metrics in a dashboard and notify the project manager in case of any
critical violations.
Sprint-wise early UAT: We have noticed that involving the business
stakeholders with each sprint delivery in the UAT phase helps us to uncover any
business related gaps early in the game. Additionally the team can incorporate the
feedback in the next sprint.
The big chunk of responsibility for first time right deliverable lies with the
development team. I will design and implement the below given optimizations for the
development team:
Code checklist and guidelines: Developers should use the code guidelines,
naming conventions and coding best practices in a checklist format. Before the
start of the project, the architect along with project manager has to create the
checklist, naming conventions, best practices and such. Some of the most
common code checklist are as follows:
o Language specific coding best practices
o Performance checklist
o Security coding checklist
o Code naming conventions
o Design checklist
Automated and Peer Review process: Developers should use automated static
code analyzers such as PMD/SonarQube to ensure the code quality. The
developers should also get their code reviewed by their peers and leads on a
frequent basis.
Code reusability: Developers should actively explore the code reusability
opportunities in the following order:
o Look for reusable libraries, code modules, components offered by the
underlying platform/product/framework/accelerators.
o Explore the availability of reusable libraries, code modules, components
at the organization level.
o Look for approved open source libraries that satisfies the functionality.
o If nothing is available, develop the code in modular way so that it can be
reused.
Performance driven development: Performance should not be an afterthought,
but it must be implemented from the very early stages. Developers need to pro-
actively carry out the performance testing of the integrated code to ensure that
their code is free of memory leaks, integration bottlenecks and others. We have
detailed the performance based design and web optimization framework in the
NFR section.
Optimal code coverage: Developers should ensure that their unit test cases
provide more than 90% code coverage. This ensures high code quality with
minimal defects. Developers should also try to use an automated tool for
generating unit test cases.
Quality gating criteria: We need to define multi-level code quality gating
criteria as follows (this could also go in as code check-in checklist):
o Developer-level code quality: The developer has to use the defined
coding checklist and naming conventions to adhere to those guidelines.
The developer can also use the IDE for the same.
o Automated Local code quality analyzer: The developer has to use the
static code analyzers such as PMD, SonarQube to analyze all coding
issues and fix the major and critical issues.
o Manual code review: The developers can request for peer review and
lead review of the code. Once all of the above is completed, the
developers can check in the code to the source control system.
35
Advanced Topics in o Integrated code review: We could setup a Jenkins job with SonarQube
Software Engineering to continuously review the integrated code and generate the report. The
Jenkins job can notify the developers and project managers for major and
critical violations.
Automated unit testability: Developers should use automated unit test
generators (such as EvoSuite, Veracode) to improve the quality and productivity
of the developer.
DevOps defines a set of tools and processes to ensure the proper delivery and release
of the application. Given below are the key optimizations from DevOps standpoint:
Release management: DevOps setup provides an opportunity for setting up
automated release management system
Automated testing: We can configure unit test jobs and functional testing jobs
(such as Selenium) to test the code from source control system
Automated deployment: We can use Jenkins pipelines and deployment jobs to
automate the deployment.
Continuous build: We can enable the continuous build to catch any errors with
integrated code.
Deployment pipelines: The pipelines enable and automate the code deployment.
Source control management: As part of DevOps process we also define the
source control management processes related to pull request, approval, code
check-in, code merge and such.
Automated reporting and project health notification: We could configure the
project health notification, reporting features to trigger the notification in case of
any SLA violation.
A right sized infrastructure is critical for the optimal application delivery. In order to
deliver the first time right solution, given below are the infrastructure related
optimizations:
36
Software Process
Health check monitoring setup: We need to setup the pro-active Improvement
healthcheck/heartbeat monitoring infrastructure to continuously monitor the
availability of the servers.
Proper capacity sizing: All the server and network capacity should be sized
based on the user load and related non-functional requirements (such as
scalability, availability, performance). Based on the availability requirements, we
should also setup the disaster recovery (DR) and the corresponding sync jobs.
Automated alerts and notification: We should be able to configure notification
triggers and the monitoring setup should notify the administrators in case of SLA
violation.
Monitoring dashboard: The monitoring dashboard should provide a snapshot of
all key parameters such as availability percentage, performance,
CPU/memory/network utilization, request rate and such.
Availability reports: The monitoring setup should be able to generate on-demand
monitoring reports for various infra-related parameters.
SLA based real time monitoring: We should also setup the real-time application
monitoring infrastructure across various geographies to understand the
performance and availability issues.
Single Point of Failure (SPOF) avoidance: Ensure that none of the systems in
the end to end request processing pipeline form the bottleneck leading to single
point of failure (SPOF). We can ensure high availability through cluster setup,
redundancy setup, DR setup, regular backup and by other means.
Additionally we should setup the automatic elastic scalability, optimal load balancing,
CDN based caching based on the application requirements.
13.3.10 Tools
We have given various tools that can be used for implementing the First time right
framework in Table 13.1.
38
Software Process
Table 13.1: FTR Tools Improvement
Tool Category Open Source/
Commercial Tool(s)
Web Page Analysis tools (HTML analysis, Yahoo YSlow , Google PageSpeed ,
performance benchmarking, improvement HTTPWatch , Dynatrace AJAX Edition
guidelines)
Page development tools (analysis of page Firebug, Google Chrome Developer
load times, asset size, asset load times and toolbar, Fiddler , HTTP Archive WEB
such.) PAGEiddle, CSSLint , JSLint , W3 CSS
Validator , W3 HTML validator
Asset merging and minification tools Yahoo UI (YUI) minifier, JSMini ,
(JS/CSS minification) JSCompress
Page Performance Testing tools (load JMeter, LoadUI, Grinder, Selenium
simulation)
Image compression tools PNGCrush, Smush It , Img min , JPEG
Mini
Web Server Plugins (for automatic Mod_pageSpeed , mod_cache,
compression, minification, merging, mod_SPDY
placement, caching etc.) mod_expiry , mod_gzip
Website Performance Testing GTMetrix , Pingdom
Synthetic monitoring (transactions Web Page test , DynaTrace Synthetic
simulation & performance statistics) monitoring
CDN Akamai, CloudFlare, KeyCDN,
Web Analytics (track user behavior, Google Web Analytics, Omniture,
performance reporting) Piwik
CSS Optimization tools CSS Sprites , SpriteMe , SpritePad
Bottleneck Analysis (dependency & WebProphet ,
bottleneck analysis) WProf
Real User Monitoring (RUM) (monitoring New Relic , Dynatrace , Gomez
& bottleneck analysis)
Network analysis (network traffic, HTTP Wireshark , Charles Proxy
headers, request/responses, protocol
analysis)
Application Performance Monitoring New Relic ,
(APM) (Layer wise monitoring of Dyna Trace Monitoring, Nagios
application code)
In this section we discuss the software process optimization for the performance
validation phase. 39
Advanced Topics in A robust web performance test methodology defines the sequence and activities for
Software Engineering various performance testing phases. We have detailed the performance test
methodology in Figure 13.7.
During requirement analysis phase, the performance testing team will get the
complete performance test needs and document the requirements. During this phase,
the testing team assesses the architecture and design documents. The team would also
analyze the business critical and performance critical transactions. The performance
validation team gets sign-off on performance-related NFRs (such as peak user load,
peak content volume and such) and performance-related SLAs (timing metrics for the
defined NFRs) during this phase. The team identifies the key performance indicators
(KPI) such as average page response time across all geographies, availability metrics,
performance metrics, performance SLA adherence rate and such. Some of the
common performance related questions are given below:
Which pages receive highest traffic?
How many pages have acceptable performance above configured performance
thresholds?
Which pages have bad performance?
What is the caching strategy used?
The planning and design phase, the performance testing team will break down the
scope into business transactions that need separate performance scripts. We also
characterize the workload model based on the load numbers we have gathered. The
performance testing team creates the overall performance test plan. The performance
environment will be setup after all the performance-testing tools are finalized.
Performance testing team develops the performance test scripts.
During the execution phase, the performance test team executes all the scripts and
record various timing metrics that are defined in the requirements analysis phase.
Various performance tests such as load testing, stress testing, endurance testing will
be carried out in this phase. Automation scripts will be used to automatically execute
the performance tests after each major release. The results will be analyzed and
document.
Reports will be published in the reporting and recommendation phase. Performance
testing teams recommends a “go” or a “no-go” decision based on the overall
performance and adherence of the performance results to the defined SLAs.
Performance testing and reporting will be done iteratively for various sprints of the
release.
40
Software Process
13.4.1 Performance Testing Tools Improvement
Given below are the key testing tools that can be used for web performance testing in
Table 13.2
A robust monitoring and alerting setup should be able to capture the system metrics
(CPU, memory), log metrics (system logs, application logs), errors, performance and
such. The monitoring setup should also be flexible to monitor various systems such as
Linux OS, database server, stand-alone server, performance and such. The alert and
notification setup should be flexible enough to send notifications to various channels
such as email, pager, incident management system and such. We should be able to
configure the performance thresholds and resource utilization thresholds that can
trigger the notification.
A comprehensive monitoring tool should support these features:
Core Monitoring capabilities
o Resource (CPU, Memory) monitoring
o Network (Router, Switch, and Firewall etc.) Monitoring
o Server Monitoring
o Windows Event Log Monitoring
o Applications Monitoring
o Virtual instances
Application Server monitoring capabilities
o Database Monitoring
o Web Page, Web Server/ Web Services Monitoring
o Middle Ware Monitoring
o Custom Application Monitoring
Reporting Dashboard
o Business service management views
41
Advanced Topics in o Comprehensive dashboard
Software Engineering
o Real Time trends and availability of devices
o Events and Correlated Alarms
Reporting
o Standard daily, weekly, monthly, quarterly, and yearly reports
We could leverage many open source and commercial tools for performance
monitoring. Table 13.3 lists the popular performance monitoring tools.
In this section we shall look at improving the processes at various SEI CMMi levels.
We have taken the focus areas and the best practices for each of the processes.
This is part of level 2 “Managed” stage wherein the expectation is to manage the
requirements and resolve any inconsistencies across various requirements.
This is part of level 2 “Managed” stage wherein the expectation is to define the
accurate project plan for managing the project
13.6 SUMMARY
In this unit, we started discussing main features of the SEI CMMi. We looked at
various 5 levels of the SEI CMMi methodology. The level 1 is called initial. The level
2 is termed as managed where the main focus area is basic project management.
Process standardization is the focus area of level 3 defined. The focus area of level 4
is quantitatively managed and the continuous process improvement is the focus area
of level 5. We then discuss the first time right (FTR) framework that discusses the
optimizations in the areas of requirements, security, testing, development, DevOps,
infrastructure, project management and governance. We also looked at the tools used
in the FTR framework. We then had a deep dive about the software process
optimization for performance validation framework. We then looked at five examples
of SEI CMMi process optimization examples related to requirements development,
technical solution, production integration, and project planning and requirements
management.
13.7 SOLUTIONS/ANSWERS
References
Shivakumar, S. K., Shivakumar (2018). Complete Guide to Digital Project
Management. Apress.
Team, C. P. (2002). CMMI for Systems Engineering/Software Engineering/Integrated
Product and Process Development/Supplier Sourcing, Version 1.1, Continuous
Representation. CMU/SEI.
Conradi, H., & Fuggetta, A. (2002). Improving software process improvement. IEEE
software, 19(4), 92-99.
https://en.wikipedia.org/wiki/Capability_Maturity_Model
https://en.wikipedia.org/wiki/Capability_Maturity_Model_Integration
47
Emerging Trends in
Software Engineering
UNIT 14 EMERGING TRENDS IN SOFTWARE
ENGINEERING
Structure
14.0 Introduction
14.1 Objectives
14.2 Drivers for Innovation
14.3 Key Emerging Trends in Software Engineering
14.4 Architecture Brief Details of Emerging Trends
14.4.1 Low Code and No Code Platforms
14.4.2 Artificial Intelligence (AI)
14.4.3 Blockchain
14.4.4 Internet of Things
14.4.5 Augmented Reality/Extended Reality
14.4.6 Containerization
14.4.7 Continuous Delivery
14.4.8 Cloud Platforms
14.4.9 Big Data
14.4.10 Software Development Methodologies
14.4.11 Other emerging trends
14.5 Summary
14.6 Solutions/Answers
14.7 Further Readings
14.0 INTRODUCTION
The field of Software Engineering is rapidly evolving. Fast paced changes, rapid
innovations, market demands and ever increasing user demands result in continuous
changes and improvements in the software engineering field. Innovations and changes
happen in the software engineering tools, software engineering process, programming
languages, hosting/delivery platforms and other areas. It is imperative of software
engineers to track the industry changes and keep oneself up to-date with the changes.
The key drivers behind the changes are productivity improvement, quality
improvement, and quick time to market, cost optimization, high performance, high
availability and high scalability.
In this unit we shall examine the key emerging trends in the field of software
engineering
14.1 OBJECTIVES
The key drivers for the software engineering innovations that lead to the emerging
trends are given below:
Productivity Improvement: Software engineering methods (such as low-
code/no code, containerization) and delivery models (such as cloud delivery
model) aim to improve the overall productivity of the developers thereby
reducing the time to market.
Quality Improvement: Process innovations such as continuous
improvement, agile delivery enhances the overall delivery quality reducing
the risk.
User Experience Improvement and User engagement: Innovations such as
AR, VR, AI, blockchain and machine learning improve the end user
experience and provide the relevant, contextual information in quick time.
Automation: AI and Machine learning are the key enablers for driving the
automation.
We will look at the each of the trends in next sections
30
Emerging Trends in
Other trends include serverless functions, conversational applications,
Software Engineering
analytics, computer vision, service orchestration, Software as Service (SaaS),
cross platform development
In this section we look at the details of emerging trends. For each of the trends, we
shall look at the motivation, key concepts, tools, technologies involved as a part of the
trend.
The low code and no code platforms (LCNC) allow the users to rapidly build the user
interfaces (UI), solution components, integrations with zero or minimal code. While
enterprises demand rapid application development, on the other hand there is a
shortage of the skilled developers; LCNC platforms are designed to fill this gap.
LCNC platforms provide visual interfaces, wizards, drag and drop features that users
can leverage to rapidly develop the solution components. LCNC is the new avatar of
the Rapid Application Development (RAD) tools. LCNC goes a step ahead and
provide pre-built integrators, reusable UI templates, solution components and
configurable modules to ease the development. Due to the minimal custom coding
involved, the testing effort, maintenance effort is also reduced.
LCNC platforms reduce the hand coding effort, automate the code generation process
by abstracting the finer details of the software development. LCNC platforms heavily
use automated code generation, visual programming paradigm and model based
design.
AI and Machine learning are redefining the ways people interact with machines, the ways
enterprises analyze data and offer many features such as learning, prediction, forecasting, trend
identification and such.
AI is an interdisciplinary field that has borrowed various methods, concepts, theories from
various fields. We have given the list of fields that has contributed to the AI. We have depicted
the fields of AI in figure 14.2.
32
Emerging Trends in
Software Engineering
Mathematics
Concepts such as Probability, Logic (such as propositional logic and predicate logic),
algorithms, decidability and Formal representation and proof algorithms, automated
reasoning, Formal Logic and knowledge representation. Historically the concepts such
as intractability (time for solving the problem exponentially increases with the input
size such as NP complete problems), reduction (transformation of one class of
problems to another class with known solution), probability theory (Probability
contributes the “degree of belief” to handle uncertainty in AI), Decision theory
combines probability theory and utility theory 33
Advanced Topics in
Software Engineering
Economics
Concepts such as the following influence the field of AI:
Game theory
Formal theory of rational decisions
Combination of decision theory and probability theory for decision making
under uncertainty
Markov decision processes
Linguistics
Concepts such as grammar, natural language processing, and knowledge
representation are key influences to the AI field along with the below given topics:
Understanding natural languages through different approaches.
Formal languages
Syntactic and semantic analysis
Knowledge representation
Relationship between language and thought process
Statistics
Topics such as regression models, learning from data, modeling uncertainty are used
in artificial intelligence.
Neuroscience
The key ideas influenced by neuroscience are:
Neurons as information processing units used in artificial neural networks.
Study of brain functioning
Psychology
Concepts related to behaviorism and cognitive psychology (the study of information
processing by brain) are areas of interest in psychology. The key factors of
psychology influencing the artificial intelligence are:
• Phenomena of perception and motor control
• Human adaptation analysis
• Human behavior analysis, (how people think and act)
• The study of human reasoning and acting
• How do humans learn and process knowledge
• Study of learning, memory and thinking
• Provides reasoning models for AI
• Human brain as an information processing machine.
34
Emerging Trends in
Computer Science Software Engineering
Most of the core concepts of the computer science such as programming, algorithms,
design patterns, parallel computing, data structure, large scale computing, Machine
learning, pattern detection, grid computing and such.
Control Theory
The main concepts influenced by control theory are as follows:
Stability of systems
Simple optimal agent design (systems that maximize objective function over time)
How can artifacts operate under their own control?
Optimal agents receiving feedback from the environment.
Adaptation of the artifacts and their actions to:
Do better for the environment over time
Based on an objective function and feedback from the environment
Given below are some of the key AI related applications
Autonomous vehicles: Self-driving automobiles is a fast-emerging area that
heavily involves AI methods to perform tasks such as obstacle sensing,
automatic navigation, autonomous planning, real-time sensor data processing,
reasoning and decision making and such.
Conversational Interface: Chatbots, virtual assistants (such as Apple Siri,
Amazon Alexa) converse with humans in natural language and can perform
structured tasks (such as booking appointments, route navigation, search,
recommendations, activity planning, reminders and such).
Computer Vision: Machines can perceive the images through computer vision
methods.
Robotics: Commercial and industrial robots employ AI methods to perform
well-defined and structured tasks such as car washing, floor cleaning,
assembling parts, motion planning and such. Highly advanced robots are also
used in complex surgeries.
Natural Language Processing: The key methods in this area are entity
extraction, part of speech (POS) identification, intent identification, language
“understanding” and such. Voice bots, chat bots, voice search, virtual
assistants heavily use natural language processing. Other tasks such as
machine translation, sentiment, information retrieval, text mining analysis
also rely upon NLP methods.
Expert systems: These systems are used for specialized activities such as legal
advisory, medical advisory, domain-specific problem diagnosis (such as
financial analysis, legal analysis, medical diagnosis, financial forecasting,
Spam controls, logistics planning, document summarization and fraud
detection). Expert systems store, process and use the knowledge for
performing the activities.
Game playing: Machines use AI methods such as automated reasoning,
decision making to identify the most optimal moves in games such as Chess,
Go, Checkers, Jeopardy!. As games have well-defined and structure rules,
they can be formally defined which computers can use and learn/adapt from
previous mistakes.
Theorem proving: Theorem provers are mainly used to prove the correctness
of mathematical theorems. 35
Advanced Topics in Vision/Perception: Computer vision agents help in object recognition, face
Software Engineering recognition, navigation, and information extraction.
Search engines and Question and answer systems
AI is rapidly advancing into all fields of technology. Given below are the key
emerging trends:
14.4.3 Blockchain
37
Advanced Topics in The figure 14.3 provides a sample IoT ecosystem wherein the sensors feed the data to
Software Engineering the analytics software running on IoT gateway. The analyzed data is then fed to the
enterprise ecosystem for further analysis and reporting.
38
Emerging Trends in
Software Engineering
As depicted in the figure 14.4, AR Module takes environmental/mask information from CV &
performs semantic interpretation. The computer vision Module performs all necessary
preprocessing on the individual frames required for the AR Module to work on. This is the
stage in the pipeline where data cleaning and refinement takes place. This is done on-device as
well as at cloud. The ML Model Training basically feeds in the initial trained model to the CV
Module. Additional layers/Suppression layers have been added to make the ML model less
cumbersome for mobile devices which would perform the real-time visualization on edge.
14.4.6 Containerization
Containers are virtualized environments that provide independent, portable computing
environments. With containers we could implement “write once, run anywhere”
concept. Containers consist of all software needed to execute the applications
including the libraries, tools, programming language, runtimes, dependencies,
configurations and others. Containers abstract the application from underlying OS.
Docker is one of the most popular container technologies. A docker image can be
created using all the necessary binaries and dependencies needed for the application;
these dependencies could include runtimes, database, application server and such. For
development related activities we could also create Docker image consisting of IDE,
debugging tools, browsers, SQL developer tools and others needed for development
activities. Due to its flexibility, containers are the preferred choice for deploying
microservices and provide elastic scalability.
40
Emerging Trends in
14.4.7 Continuous Delivery Software Engineering
The traditional waterfall development and deployment model needs higher time to
market and is prone to delivery and quality risks. With the increasing user demand,
market expectations and business changes, it is imperative to roll out the new release
iteratively and frequently. Agile delivery implements the best practices of continuous
delivery model that delivers the solution in a 2-week sprint cycles. With each delivery
an incremental update is pushed to the production. Through continuous deployment,
we deploy the updates automatically to the production on periodic basis. Continuous
delivery model makes the enterprises responsive to changes, implements the feedback
quickly, provides the features/fixes faster and reduces the delivery risk.
Continuous Integration (CI) is closely associated with continuous delivery (CD)
wherein the application is integrated frequently and iteratively to reduce the
integration risks. We can implement the CICD through popular tools such as Jenkins
or Azure DevOps.
Figure 14.6 depicts a sample Jenkins based CICD pipeline. In the development stage,
the GitHub is used for code merge and code review activities. During testing we could
configure SonarQube based static code analysis and Junit based unit testing as part of
Jenkins jobs. Fully tested artifacts are pushed to S3 for packaging. Maven can be used
for building artifacts automatically. Finally during the deploy stage, the artifacts are
deployed to the environment. We could configure AWS CloudWatch to monitor the
application.
41
Advanced Topics in
Software Engineering
We have depicted a typical 2-week sprint flow and various activities, owners and
metrics in Figure 14.8.
Cloud computing has redefined the way software applications are designed, built,
deployed and monitored. Cloud platforms provide the computing resources such as
servers, databases, network, storage on demand offering “pay-as-you-go” model.
Enterprises can innovate faster, reduce the IT costs and build agile models using the
cloud platforms. Microsoft Azure, Amazon Web Services, Google Cloud are the
popular cloud platforms. Enterprises can use public cloud (owned by third party cloud
providers), private cloud (enterprise-owned computing resources) or hybrid cloud
(data shared between public cloud and private cloud)
Given below are the main types of cloud services:
Infrastructure as Service (IaaS): Cloud platforms provide infrastructure
components such as virtual machines, servers, database, operating systems
and such.
Platform as Service (PaaS): Cloud platforms provide an end to end
environment for development, testing and deployment of software.
42
Developers can build their applications using the provided platform. PaaS Emerging Trends in
Software Engineering
platforms typically include operating systems, development tools along with
the underlying infrastructure components.
Software as Service (SaaS): In this model, the software applications are
available over the cloud typically on subscription basis. The SaaS providers
manage the security, infrastructure and maintenance of the software.
The field of Big Data involves management, analysis and reporting of massive amount
of data that cannot be handled by traditional data management software. With each
growing data, we are generating and consuming huge volumes of data through social
media posts, comments, pictures, videos and such. Storing, retrieving, managing and
searching this data needs a different way of managing the data. Big Data systems are
eventually consistency as per CAP (Consistency, Availability, Partition) theorem.
The sensor data and social media data are few examples of the big data. Big data
technologies handle the ingestion of large volume of data, sharing the data, searching
the data, updating the data, making the copies of data, reporting of data and such. Big
data applications include product recommendation, consumer behavior analysis, sales
forecasting, predictive analytics and such.
The three key attributes of Big Data are:
Volume indicating the massive amount of data generated to qualify as Big
Data. Though the definition of Big Data is changing with time, at this point
we consider anything above 1 Terabyte as big data.
Velocity indicates the speed at which the data gets generated
Variety indicates the format of the data that gets generated. This includes
structured data, semi-structured data, and unstructured data.
Besides these scenarios, there are numerous use cases that need Big Data systems
such as data needed for predicting customer churn, fraud detection data, risk
assessment data,
In cross platform development, we could develop the code only once and then reuse
the code for various mobile platforms such as Android, IoS, Windows, and Linux etc.
Figure 14.10 provides a sample architecture of Xamarin based cross-platform
solution. Many cross platforms provide inbuilt widgets, API integrations and
portability features. Xamarin and Google Flutter are popular cross platform
development technologies. We have depicted a sample Xamarin cross platform
solution in figure 14.10
Conversational Interfaces
AI-powered chatbots provide capabilities to understand and respond to natural
language queries. Conversational interfaces can be customized to handle the
functional domain specific data. Conversational interfaces are handling the first-level
queries in many sectors such as banking, retail and e-commerce domains. We have
depicted the high level components of a conversational interface in the figure 14.11.
45
Advanced Topics in
Software Engineering
14.5 SUMMARY
In this unit, we started discussing the main drivers of innovation. After briefly
discussing the key trends in software engineering, we discussed the low code and no
code platforms that provide visual tools for rapid application development. AI and
machine learning methods are adopted in almost all areas of software development to
provide automation and data analysis. We looked at blockchain technology for
distributed data handling. IoT ecosystem provide real time continuous monitoring of
the devices and make them smart. AR technology augments the real world with digital
objects. Containerization provide portable technology for application development
and deployment. Continuous Delivery provides an iterative and continuous
development and deployment. Big data technologies are designed to handle huge
volume of data.
14.6 SOLUTIONS/ANSWERS
46
Emerging Trends in
14.7 FURTHER READINGS Software Engineering
References
https://azure.microsoft.com/en-in/overview/what-is-cloud-computing/#benefits
https://en.wikipedia.org/wiki/Big_data
47
Introduction to UML
UNIT 15 INTRODUCTION TO UML
Structure
15.0 Introduction
15.1 Objectives
15.2 Background of Object Oriented Design
15.3 Key Concepts of Object Oriented Design
15.4 Introduction to UML diagrams
15.5 Structural UML Diagrams
15.5.1 Class diagram
15.5.2 Object diagram
15.5.3 Component diagram
15.5.4 Deployment diagram
15.5.5 Package diagram
15.6 Behavioral UML Diagrams
15.6.1 State chart diagram
15.6.2 Activity diagram
15.6.3 Sequence diagram
15.6.4 Use case diagram
15.6.5 Collaboration Diagram
15.7 Summary
15.8 Solutions/Answers
15.9 Further Readings
15.0 INTRODUCTION
The UML diagrams are used for modeling the object oriented design. UML stands for
Unified Modeling Language. UML provides a standards-base, general purpose
modeling language that helps everyone to understand various aspects of the system.
As UML is language independent, we can use UML for many different languages
such as Java, Python, C sharp and others. UML provides the software blueprint in the
visual representation.
15.1 OBJECTIVES
In the object-oriented programming, the data is exposed only through the interfaces.
The object-oriented programming follows a bottom up approach. The object normally
represents a logical unit or a real-world object. The object state contains all the object
properties/attributes and the behavior of an object is expressed through its functions or
methods.
The problems that are inherently complex are well suited for object oriented
programming. The object oriented programming is designed for change, allows reuse,
improves productivity, speeds up development time and improves maintainability. We
can build scalable and modular applications with object oriented programming.
In object oriented programming, the solution is composed of objects that are instances
of classes interacting with each other via relationships. Objects represent real world
entities. Objects encapsulate data and functions/behavior that control the data. While
objects are the basic building blocks of object oriented design, classes are the
blueprints of the objects.
The object oriented programming focuses on decomposition, encapsulation,
abstraction, modularity and inheritance.
The abstraction hides the inner details of the entity and exposes the behavior through
interface. It defines the clear boundaries of the object and provides the required
characteristics and behavior of an object. Abstraction can be implemented through a
well-defined interface. Abstraction plays a key role in the object modelling providing
the integrations only with the exposed interfaces and hides the user from the inner
details of the component.
In the encapsulation based design, the data is exposed only through the functions
and the class provides methods for binding data. Encapsulation eliminates the direct
dependencies between objects and hence avoids tight coupling. Encapsulation is also
called data hiding or information hiding.
In Inheritance the child class obtains the characteristics and behavior of its parent
class. It is possible to model the hierarchy through inheritance. You can also change
the behavior of the subclass through overloading and overriding.
UML model was released in 1997 as a common design language building and
modelling software applications. UML model provides the ways to depict the complex
the interaction between components, the behavior, and sequence, static and dynamic
nature of the software components. UML models are independent of the programming
language.
30
UML diagrams visually model and depict the system from various perspectives such Introduction to UML
as use case, implementation, process and deployment. We can visually depict, model,
document and build the system using UML diagrams.
Definition
A Unified Modeling Language is a structured language that provides the commonly
agreed vocabulary to communicate, model and document the structural and behavioral
aspects of the software system. UML is widely used as a blueprint to design, develop,
document, analyze, and comprehend the software systems.
UML diagrams model the big picture of the entire application and helps us to
analyze the application from various dimensions.
UML diagrams provide a common language and vocabulary to understand, model,
document and discuss the system design.
UML diagrams helps us to understand the conformance of the system to business
and technical requirements.
The team gets the clear understanding of the main classes, components, interfaces
and their relationship through UML diagrams. This helps the developers to
develop the low-level design faster and implement the system quicker.
During impact analysis or during major bug fixes or during system enhancements,
we can use the UML diagrams to analyze the key impact areas to come up with
optimal design.
We can implement the key architecture best practices such as loose coupling,
layered architecture, and separation of concerns by modeling the system in UML.
UML diagrams make the system easy to develop, maintain and change.
We can document the system from various perspectives through the UML
diagrams. UML diagrams also document the key architecture decisions.
UML diagrams help us visualize the overall structure and behavior of the system
and its various components.
We can broadly classify UML diagrams into two categories - static diagrams or
structure diagrams and dynamic diagrams or behavior diagrams.
Static or structural diagrams represent the static physical elements of the system.
Static diagram includes class diagrams, object diagrams, component diagrams and
deployment diagrams. The dynamic or behavior diagrams depict the runtime and
dynamic behavior of the software systems. The dynamic diagrams include sequence
diagram, collaboration diagram, state diagram and activity diagram. We have depicted
the main categories of UML diagrams in Figure 15.1.
31
Advanced Topics in
Software Engineering
The sequence diagram models the behavior of a single use case or a single
scenario. The sequence diagram visually depicts how each objects interact
with each other. In the sequence diagram we have a time ordered messages
where vertical dimension represents the time axis and horizontal dimension
represents the roles.
The activity diagram describes the business logic the business process and
work flows. The activity diagram models the use case.
The state diagrams describe the systems behavior through state transitions.
The state diagram depicts all possible states of an object when an event
occurs.
Static or structural UML diagrams depict the overall structure of the system
that remains static. The main structural elements depicted in the UML
diagram are classes, objects, nodes, interfaces, use cases, collaboration and
components. The main static UML diagrams are package diagram, class
diagram, component diagram, deployment diagram and object diagram.
A class diagram depicts the classes along with its attributes and operations.
The object diagram depicts the instance of class encompassing the state.
The package diagram organizes the elements of system into logical groups to
minimize the dependencies among them.
The deployment diagram defects the relationship between the software and
hardware components of the system. The nodes in the deployment diagram
represent servers or other computational elements. Deployment diagram
depicts how the components are organized in the system
Views Covered by UML Diagrams
As shown in figure 15.2, it is important to model the system from various views such
as implementation, design, deployment and process. Each view provides the specific
abstraction of the system. We can understand the system holistically by analyzing all
the views.
The design view essentially captures the functionality of the system. The static part of
the design is depicted through class diagram and the dynamic behaviour is captured in
the activity diagram and state chart diagram.
In process view, the UML diagrams primarily depict the sequence of steps and flow
and components involves in a use case. The Use case diagram models the requirement
of the system. We can understand the throughput and scalability of the system through
the use process view.
The deployment view covers the physical architecture of the system. We can
understand the overall distribution and topology of the application components. We
can assess the capacity and sizing of the overall solution in the deployment view.
We can use the below given features to extend the UML diagram:
33
Advanced Topics in Stereotypes allow us to extend the UML vocabulary by adding the
Software Engineering application specific elements. For example we can add the logging
framework details for the application using stereotype
Constraints allows us to add the business rules and conditions. For
example we could specify the value of “date” attribute to be greater than
01-Jan-1970
Tagging allows us to specify the additional metadata for the object. For
instance we can specify the details such as author name, version using
tagging.
Structural elements depicted in the UML diagrams are the static parts of the system.
Given below are the key structural elements depicted in the UML diagrams; normally
they are “Nouns” of the system.
Class: It is logical unit that encapsulate the state (through attributes), and
behavior (through operations) of the objects and can optionally implement
one or interfaces. A class can interact with other classes through relationships
such as generalization, composition and such. A class is depicted in rectangle
as shown in the Figure 15.3.
Object: An object is the instance of the class. Objects interact with each other
by passing messages and expose the data through operations. We have
depicted the Object in the figure 15.5.
34
Introduction to UML
Use case: A use case represents a specific functionality and represents the
flow for implementing the use case. A use case is represented in Figure 15.7.
The class diagram visually provides the object oriented design of the system and
depicts the relationship between implementation classes. The class diagram visually
provides the inheritance, composition, association relationship within classes.
In the class diagram we depict the class name, attributes, visibility (public, protected,
private), associations and operations and optionally comment.
The class diagram depicted in Figure 15.9 provides the details of three classes: User,
Seller and Buyer.
The User class is the parent class that has attributes such as “id” and “role” are
protected whereas the attributes such as “firstName”, “lastName” are private. The
User class has a public method “getRoles ()” the return the list of String objects. The
Figure 15.9 also depicts the generalization relation wherein the “Buyer” and “seller”
classes are sub/child classes of “User” class.
The object diagrams depict the instantiated objects and their state. The object diagram
also represent the relationship between objects. We have depicted an object diagram
in Figure 15.11.
A component represent logically related entities such as classes and their dependents
that interact with other components through well-defined interfaces.
The component diagram provides the physical view of the application wherein we
model the software components and their dependencies on other components. The
component diagram depicts the organization of physical entities of the application.
We can depict the high order solution components or packages in the component
diagram.
We have also depicted the interfaces exposed by the component and its interaction
with other component in Figure 15.13.
37
Advanced Topics in 15.5.4 Deployment diagram
Software Engineering
We depict the details of solution components deployed on the infrastructure in the
deployment diagram. Deployment diagram provide details of the hardware
components (such as servers, load balancers, firewalls, virtual machines, routers,
storage) and the software artefacts (such as files, Java Archives, libraries, executable
etc.) that are deployed on them. Nodes (infrastructure elements) and their
dependencies/relationships are modeled in the deployment diagram.
The systems support team and infrastructure team can understand the details of
hardware and other physical components needed for the solution deployment. We
could also understand the overall system topology, software used, the distribution
model, machine configurations and such details. The infrastructure team can use this
information to appropriately size the system and do the proper capacity planning. We
have depicted the deployment diagram in Figure 15.14.
The package diagram depicts the packages and its constituent elements. We can
organize the classes into logical groups through packages to enhance readability. The
package diagram also depicts the relationship between packages. Package diagrams
help us to logically group and organize the classes. By decomposing the system into
subsystems and subsystems into packages we can organize the overall system better.
We have depicted the package diagram in Figure 15.15.
Behavioral elements depicted in the UML diagrams are the dynamic parts of the
system. Given below are the key behavioral elements depicted in the UML diagrams;
normally they are “verbs” of the system.
State machine: The state machine represents various states of an object upon
receiving an event. We have represented the state in Figure 15.17.
The state chart depicts the event-driven state change behavior through various states
of a class and how the class can transition from one state to another for a specific
event. The state chart diagrams depict the system behavior for external and internal
events. The state chart has various element types – starting state or initial state which
is the starting point of the process. When the object transitions to various States it is
shown in the state chart diagram. The object in various states are connected by
transition lines. We also depict the decision points in the state chart diagram.
Statechart diagram helps us to understand the response of the system for the internal
and external events. We have depicted the state chart diagram in Figure 15.18.
39
Advanced Topics in 15.6.2 Activity diagram
Software Engineering
The activity diagram depicts the control flow from one activity to another. We can
model the system workflows, business rules, business process and understand the
parallel and sequential activities through the activity diagram. Activity diagram also
depicts the use case execution steps. Activity diagram is a type of state chart diagram
in which states are depicted as activities. Activity diagrams are business-friendly.
Similar to state chart diagram activity diagrams have initial stage with transition lines
connecting various activities in the business process. The conditions can to be
depicted in the activity diagram. The final activities that terminate the business
process connected to the termination point.
The sequence diagram depicts the flow for a specific use case or a scenario. The
objects perform the “call” by passing the messages. The sequence of messages are
ordered by time order in which they occur. Sequence diagrams help us to understand
the objects and the order in which they are invoked for the execution of a specific use
case.
As depicted in Figure 15.20, arrows represent the messages, narrow vertical rectangle
depict the activations and classes are in the top columns
Use case diagram depicts the functional behavior of the system in the visual format;
use case diagram usually represent a single logical use case. The use case diagram
provides visual depiction of relationship between the actors, use cases and various
components for a specific functionality from the user’s point of view. We can also
depict the interactions of the system with external interfaces and actors.
40
Introduction to UML
A collaboration diagram consists of objects and links that represent the systems and
the messages sent across the systems. A collaboration diagram is similar to a sequence
diagram.
15.7 SUMMARY
In this unit, we started discussing the key aspects of object oriented programming
such as encapsulation, abstraction, inheritance and others. UML diagrams are industry
standard for modeling the objects in the object oriented design. There are broadly two
types of UML diagrams – structural diagrams that depict the static elements and the
behavioral diagrams that depict the dynamic nature of the elements. Class diagrams
depict the classes along with their relationship. Object diagrams depict the class
instance along with its state. Component diagram depicts the components along with
its interfaces. The deployment diagram depicts the software artefacts and the
infrastructure elements. State chart diagram depicts the event-driven state transitions,
Activity diagrams model the control flow and sequence diagrams provide time order
sequence of objects. The use case diagram model a specific use case and the actors
involved in the use case. Collaboration diagram depicts the objects and the links.
15.8 SOLUTIONS/ANSWERS
References
The Unified Modeling Language User Guide, [G. Booch, J. Rumbaugh, I. Jacobson,
2000]
UML Explained, [Kendall Scott, 2001]
Applying UML and Patterns 2nd Ed., [Craig Larman, 2002]
UML Distilled 2nd Ed., [Martin Fowler with K. Scott, 2000
Rumbaugh, James, Ivar Jacobson, Grady Booch, the Unified Modeling Language
Reference Manual, Addison Wesley, 1999
Jacobson, Ivar, Grady Booch, James Rumbaugh, the Unified Software Development
Process, Addison Wesley, 1999
http://en.wikipedia.org/wiki/Object-oriented_programming
42
Data Science for
Software Engineers
UNIT 16 DATA SCIENCE FOR SOFTWARE
ENGINEERS
Structure
16.0 Introduction
16.1 Objectives
16.2 Applications for Data science
16.3 Background of Data Science
16.4 Data Science Tools
16.5 Data science and Big data
16.6 Phases involved in Data science process
16.6.1 Requirements Gathering and Data Discovery
16.6.2 Data Preparation stage
16.6.3 Data exploration stage
16.6.4 Model development and Prediction stage
16.6.5 Data visualization stage
16.6.6 A sample case study
16.7 Data science Methods
16.7.1 Clustering Method
16.7.2 Collaborative Filtering or Similarity Matching Method
16.7.3 Regression Methods
16.7.4 Classification Methods
16.7.5 Other Methods
16.8 Data science process for predicting the probability of product purchase
16.9 Summary
16.10 Solutions/Answers
16.11 Further Readings
16.0 INTRODUCTION
We are living in data-driven world where making sense out of raw data is the
information super power. With each passing day, data is growing exponentially. With
every tweet, Facebook post, Instagram picture, YouTube video users are generating
massive amounts of data. In addition to the social media popularity, the data generated
by Sensors of IoT enabled devices and wearable also generates data at high velocity.
Data science is gaining popularity with the emergence of Big Data. Data analysis has
been around from last many decades. The data analysis methods have evolved over
the period of time. As data scientists can crunch massive amount of data to detect
anomalies, patterns, trends, organizations want to leverage data science to reduce cost,
explore cross-sell/upsell opportunities, new market opportunities, forecast,
recommend for gaining competitive advantage. Data science is an interdisciplinary
field consisting of statistics, computer science, Machine learning and others.
Data science helps businesses to make data driven decision making. Organizations can
apply the data collection, data preparation and data analysis methods to mine massive
volume of data to understand customers’ behavior and explore the business
opportunities to influence their customers.
29
Advanced Topics in
Software Engineering 16.1 OBJECTIVES
As depicted in Figure 16.1, through exploratory data analysis, we can describe the
events, phenomenon and scenarios. We can also look at the data dimensions and do
the diagnosis to understand why the event happened. After data preparation, data
analysis, model development we can predict what will happen in future and prescribe
what can be done to make it happen or what can be done to prevent it from happening.
Data science is closely related to the field of statistics and mainly uses statistical
methods for data analysis. As such data analysis and the analysis methods have been
since 1960s. The term “Data science” can be traced back to 1974 when it was coined
by Peter Naur and was later popularized by C.F.Jeff Wu in 1985.
Let us understand how the data analysis has evolved by looking at the
recommendation use case. In the early 2010 we used the formal and rigid business
rules for product recommendation; It was followed by linear regression model in
2011. In 2013 we achieved greater accuracy using logistical regression. Decision trees
were widely used in 2014. Organizations like Amazon and Netflix leveraged
collaborative filtering in 2015 for product recommendations. Bayesian network was
used for recommendation in 2017. From 2019 onwards organizations are heavily
using the machine learning and deep learning methods for product recommendation to
achieve better accuracy.
31
Advanced Topics in
Software Engineering 16.4 DEFINITION OF DATA SCIENCE
The proliferation of Big Data has propelled the increase in popularity of Data Science.
The sources that generate Big Data increase in volume, velocity (massive rate of
increase), veracity and variety (structured, semi-structure, and unstructured) posing
challenges in organizing and analyzing the Big Data. Examples of Big Data are sensor
data, user click data, tweet data and such. We cannot easily manage Big Data through
traditional databases. Hence Big Data systems don’t strictly adhere to ACID
(Atomicity, Consistency, Integrity and Durability) properties but aim for eventual
consistency as per CAP (Consistency, Availability, Partition) theorem. Some of the
popular Big Data systems are NoSQL products such as MongoDB, DynamoDB,
CouchDB and such.
As part of Data science development, we build, explore and fine tune various models
to handle the massive data sets.
Big Data provide the massive data management, data processing technologies such as
Apache Hadoop, and NoSQL databases for data science methods.
We have depicted various phases involved in the data science process in the Figure
16.3.
In data science the data is processed through various stages in the pipeline. We have
depicted the stages in Figure 16.3. During each of the stages in the pipeline, the raw
data undergoes series of analysis and changes. The lifecycle stages are cyclic as we
continuously use the feedback from each stage to its previous stage.
We shall look at each of the stages in next sections.
33
Advanced Topics in
Software Engineering
16.6.1 Requirements Gathering and Data Discovery
We need to understand the business requirements, the goals, focus areas and
challenges. We need to understand the key data sources, data inventories, existing data
analysis tools and technologies, the subject matter experts (SMEs), project sponsor,
main stakeholders, time and budget for the program. It is essential to also understand
any existing data analysis initiatives undertaken to learn from the past experience.
Domain experts, business analysts for the business domain help us to provide the
heuristics related to the business domain using which we can formulate the initial
hypothesis. Once we thoroughly understand the business domain we can then
formulate the problem for applying the data science methods.
Once we fully understand the requirements, we need to collect data from various
sources such as data lakes, relational databases, ERP systems, internal and external
social media systems, collaboration systems and such. For instance for the customer
behavioral analysis, we need to gather data from various sources such as CRM system
(user case details), user profile details, order history, product review system (product
name, review details), email system, social media (user’s social media handle, user
details) and such.
Given below are some of the main activities as part of the data conditioning stage:
Removing duplicates
Bring the data to a common or standard format
Infering the missing values
Smoothing the data by removing the noise
Filtering and sampling the data
Making the data types consistent across the entire data set
Replace missing values with their mean or median values
The conditioned data will be used for exploration and model development.
During this stage, we extract the features from the data and process the data. Based on
the extracted features we can perform first cut analysis and form the initial hypothesis.
We also classify, cluster the data into the logical categories. We identify the
relationship between variables during this stage. We then select the key predictors that
are essential for the recommendation and for prediction.
For instance, in order to model the price of a used car, we need to examine massive
amount of historical used car sales transactions consisting of various attributes.
However key features such as car mileage, car age, kms driven, engine capacity,
purchase price have direct correlation with the car’s market price. These key features
directly influence the final price for the used car. Data scientists look at the data and
try to correlate the useful features and form the hypothesis. In the used car price
34
prediction use case, the hypothesis could be “The car age is inversely correlated to the Data Science for
Software Engineers
final price (with the increase in car age, the final price decreases)”.
16.6.4 Model development and Prediction stage
We design and develop the machine learning models in this stage. We train and fine
tune the model and test their performance on an iterative basis. Data scientists
evaluate various models for the selected data and finally the model that provides the
highest performance will be selected for prediction.
We use many statistical methods such as regression analysis, qualitative methods,
decision tree models, deep learning models for data analysis during this stage. We
evaluate the performance of the model using various data points such as the accuracy
of the model prediction, model performance on various training and test data sets and
such.
We then use the selected models for the prediction.
16.6.5 Data Visualization stage
In the final stage, we visually communicate the obtained insights using reports,
business intelligence (BI) tools to help the audience make informed decisions. We
also document the key findings, observations and the behavior of the model for
various test cases. Often we use the visual representations such as charts, infographics
to communicate the findings to the stakeholders.
Once the model is accepted by the stakeholders, we operationalize the model and use
it for business prediction. We need to continuously fine tune the model based on the
feedback and learning from the real world data.
Top 5 Top 5 Brand Buyer Buyer Buyer Buyer Produ Stor Sal
in last in last campai Age Age Age Inco ct e es
month year gn (Yes Group Group Group me
(Yes/N (Yes/N or No) 10-18 19-34 30-50 (10K
o) o) yrs. yrs. yrs. –
(Yes/N (Yes/N (Yes/N 30K)
o) o) o) Yes/
No
1 0 1 0 1 Nil 1 ABC Stor 500
e1
1 1 Yes 0 0 1 1 XYZ Stor 150
e1 0
0 1 ABC Stor 500
e1
Likewise we collect all the possible data from all stores for all combinations of
identified features
In the above example one of the values is “Yes” that needs to be coded to “1”.
Another value is “Nil” that will be converted to “0”. Third row of data is empty for
many features hence we will discard that row for the training purpose. The
conditioned data is depicted in table 16.2.
During this stage, we identify the prominent features that influence the overall
product’s popularity. In the above example, we identify that demographic data has
greatest influence on the overall product sales.
36
We understand the features that have positive/linear correlation with the product sales, Data Science for
Software Engineers
non-linear correlation with the product sales.
Prediction Stage
In this stage, we predict the product sales for each store. For this, we develop the
models that use the dependent features to predict the overall product sales for each
store. We can explore various models given below against the test data and compare
the accuracy and performance.
Once we finalize the model we can train it further and fine tune to achieve better
accuracy. We can then use the model to predict the top selling products.
In the data visualization stage, we provide the top predicted products for each store so
that the store owner can replenish the inventory for the popular products as depicted in
the Figure 16.5.
37
Advanced Topics in In this section we shall look at the most popular data analysis methods we use in the
Software Engineering data science projects.
38
Data Science for
Software Engineers
Time series prediction methods to analyze the events occurring at regular time
intervals
Text analysis and sentiment analysis using methods such as bag of words,
TFIDF, topic modelling to gain insights from the text.
Profiling involves characterizing the event or user or an object.
Reduction involves reducing the large data set into a smaller data set that
represents the key samples from the large data set.
In this sample case study let us look at various steps involved in the predicting the
probability of product purchase and understanding of the key features.
Requirement gathering and Data collection stage
39
Advanced Topics in The sample case study is aimed at understanding the key features that influence the
Software Engineering probability of product purchase and develop a prediction model given the key feature
values.
We have provided a sample data collected for eleven historical transactions in table
16.3 for reference.
Table 16.3 : Product purchase data
Age_LT30 Age_GT30 In_LT50 In_GT50 Loyal_CT onSale Prod_buy
0 1 0 1 1 1 1
0 1 0 1 0 1 1
1 0 0 1 1 1 1
0 1 0 1 1 1 1
1 0 Yes 0 1 1 0
0 1 Correct 0 1 1 1
1 0 Y 0 0 1 0
1 0 Less than 50 0 0 0 0
0 1 Confirmed 0 0 1 1
1 0 One 0 1 1 0
1 0 NA 0 1 1 0
In this stage, we identify the key features and its relation to the product purchase
decision. We apply the statistical methods to understand the data distribution and the
feature relationship. We can infer the following based on our analysis
Feature Age_GT30 is positively and linearly correlated to prod_buy.
Conversely Age_LT30 is inversely related to prod_buy.
Feature IN_GT50 is positively and linearly correlated to prod_buy.
Conversely In_LT50 is inversely related to prod_buy.
Loyal_CT and onSale are positively correlated to prod_buy
We can use these features and insights for building and training models.
Prediction Stage
In this stage we build and evaluate various models. We can evaluate various models
such as linear regression, logistic regression and others and understand their
performance. We have selected the decision tree model as it factors all the key
features. We can visualize the combination and impact of various features with the
decision tree model.
We validate the decision tree model with the test data to ensure that the decision tree
model does the accurate prediction.
Figure 16.6 provides sample decision tree for our product purchase prediction.
16.9 SUMMARY
In this unit, we started discussing main applications of the data science. We discussed
the interdisciplinary nature of the data science as it involves methods from various
fields such as computer science, big data, statistics, analytics, domain knowledge,
machine learning and others. We also looked the key tools of data science such as R,
Python, Matlab others. We discussed the relationship between data science and Big
data. In next section we had detailed discussion on various phases of the data science
lifecycle stages. The requirements gathering and data collection stage involves
gathering all the data sources, data preparation stage conditions the data and fixes the
errors. Data exploration stage involves close examination of the key features and
building the hypothesis. In Prediction stage we build models to predict the event.
Finally in the data visualization stage we document and showcase our findings. We
also had a deep dive discussion on various data science methods related to clustering,
collaborative filtering, regression and classification. Finally we look at a detailed case
study for using data science method for predicting a product purchase probability.
16.10 SOLUTIONS/ANSWERS
References
Provost, F., & Fawcett, T. (2013). Data Science for Business: What you need to know about
data mining and data-analytic thinking. " O'Reilly Media, Inc.".
42
Van Der Aalst, W. (2016). Data science in action. In Process mining (pp. 3-23). Springer, Data Science for
Software Engineers
Berlin, Heidelberg.
Amershi, S., Begel, A., Bird, C., DeLine, R., Gall, H., Kamar, E., ... & Zimmermann, T. (2019,
May). Software engineering for machine learning: A case study. In 2019 IEEE/ACM 41st
International Conference on Software Engineering: Software Engineering in Practice (ICSE-
SEIP) (pp. 291-300). IEEE.
Agarwal, R., & Dhar, V. (2014). Big data, data science, and analytics: The opportunity and
challenge for IS research.
43