1Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
““Einstein looked for a simplified definition of nature as he believed that God is notEinstein looked for a simplified definition of nature as he believed that God is not
complex or arbitrary. No such belief will work for Software Engineers as Softwarecomplex or arbitrary. No such belief will work for Software Engineers as Software
Engineering is complex and arbitrary” – Fred BrooksEngineering is complex and arbitrary” – Fred Brooks
Lecture 2, 3 and 4Lecture 2, 3 and 4
Software ProcessSoftware Process
The software process
A structured set of activities required to develop a
A software process model is an abstract representation
of a process. It presents a description of a process from
some particular perspective.
2Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Generic software process models
The waterfall model
Separate and distinct phases of
specification and development.
Specification, development and
validation are interleaved.
Component-based software engineering
The system is assembled from existing
They are not mutually exclusive- used together, often
3Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
and unit testing
Oper ation and
4Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Waterfall model phases
Requirements analysis and definition
Consultation with system user
System and software design
System design partitions the requirements to hardware or
software design involves indentifying and distributing software
Implementation and unit testing
Unit testing involves verifying that each unit meets its
5Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Waterfall model phases
Integration and system testing
Testing as a complete system. Software is delivered to customer
Operation and maintenance
Longest software life cycle phase. Involves correcting errors that
were not discovered early, improvement of system units and
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 6
Waterfall model benefits
The result of each phase is one or more
Fits with other process models
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 7
Waterfall model problems
Inflexible partitioning of the project into distinct stages
makes it difficult to respond to changing customer
Therefore, this model is only appropriate when the
requirements are well-understood and changes will be
fairly limited during the design process.
Few business systems have stable requirements.
The waterfall model is mostly used for large systems
engineering projects where a system is developed at
One phase has to be complete before moving onto the
next phase- that is absent in reality where overlapping
is common. 8Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Waterfall model problems
Prone to Software freeze, problems are left for later
resolution, ignored or programmed around.
May result inefficient software and badly structured
9Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Based on the idea of
1. developing an initial implementation
2. Exposing this to the user for comments
3. Refining and retuning through many
versions until an adequate system is
10Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Objective is to work with customers
to evolve a final system from an initial outline
Should start with well-understood requirements
add new features as proposed by the customer.
11Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Objective is to understand the system
Should start with poorly understood
requirements to clarify what is really needed.
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 12
13Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Lack of process visibility;
Systems are often poorly structured;
Special skills (e.g. in languages for rapid
prototyping) may be required.
For small or medium-size interactive systems;
For parts of large systems (e.g. the user
For short-lifetime systems.
14Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Component-based software engineering
Based on systematic reuse where systems
are integrated from existing components or
COTS (Commercial-off-the-shelf) systems.
Happens when people working on project
know of designs or code which is similar to
This approach is becoming increasingly used
as component standards have emerged.
15Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
○ What components are required, what are
○ Not exactly what you need is found, so would you
use that or modify your requirements?
System design with reuse
○ Design the system in a way so that others are able
to reuse your system
Development and integration
○ Combining all of the reusable components
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 16
Benefits of CBSE
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 17
Drawbacks of CBSE
Mostly never meets requirements
Needs expert knowledge on component
analysis, reusability and integration
More or less depends on the pros and cons
of the components.
and integ ration
18Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
An in-between approach that combines waterfall and
Rather than deliver the system as a single delivery, the
development and delivery is broken down into
increments with each increment delivering part of the
User requirements are prioritised and the highest priority
requirements are included in early increments.
Once the development of an increment is started, the
requirements are frozen though requirements for later
increments can continue to evolve.
19Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 20
Incremental development advantages
Customer value can be delivered with each
increment so system functionality is
Early increments act as a prototype to help
elicit requirements for later increments.
Lower risk of overall project failure.
The highest priority system services tend to
receive the most testing.
User engagement with the system
Accelerated delivery of customer services
21Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Incremental development disadvantages
Increments should be relatively small
Each increment should provide system
Difficult to map customer’s requirements
onto increments of right size
Hard to identify common facilities that are
needed for all increments
22Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Incremental development disadvantages
Progress can be hard to judge and problems hard to
find because there is no documentation to
demonstrate what has been done.
The normal contract may include a specification;
without a specification, different forms of contract
have to be used.
Without a specification, what is the system being
Continual change tends to corrupt software structure
making it more expensive to change and evolve to
meet new requirements.
23Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Process is represented as a spiral rather
than as a sequence of activities with
Each loop in the spiral represents a phase in
No fixed phases such as specification or
design - loops in the spiral are chosen
depending on what is required.
Risks are explicitly assessed and resolved
throughout the process.
24Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Spiral model of the software
anal ysis Proto-
Simulations , models , benchmar ks
testService Develop , verify
next-level pr oduct
Evalua te alterna tives,
identify, resolv e risks
Deter mine objecti ves,
alterna tives and
Plan ne xt phase
and test plan
Requir ements plan
Life-cy cle plan
25Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Spiral model sectors
Specific objectives for the phase are identified.
Risk assessment and reduction
Risks are assessed and activities put in place to reduce the
Development and validation
A development model for the system is chosen which can
be any of the generic models.
The project is reviewed and the next phase of the spiral is
26Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Dissatisfaction with the overheads involved in design
methods led to the creation of agile methods. These
Focus on the code rather than the design;
Are based on an iterative approach to software development;
Are intended to deliver working software quickly and evolve
this quickly to meet changing requirements.
Agile methods are probably best suited to
small/medium-sized business systems or PC products.
27Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Principles of agile methods
28Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Problems with agile methods
It can be difficult to keep the interest of customers
who are involved in the process.
Team members may be unsuited to the intense
involvement that characterises agile methods.
Prioritising changes can be difficult where there are
Maintaining simplicity requires extra work.
Contracts may be a problem as with other approaches
to iterative development.
29Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Perhaps the best-known and most widely
used agile method.
Extreme Programming (XP) takes an
‘extreme’ approach to iterative
New versions may be built several times per
Increments are delivered to customers every 2
All tests must be run for every build and the
build is only accepted if tests run successfully.
30Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
The XP release cycle
stories to tasks
stories for this
31Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Extreme programming practices
Incremental planning Requirements are recorded on Story Cards and the Stories to be
included in a release are determined by the time available and
their relative priority. The developers break these Stories into
Small Releases The minimal useful set of functionality that provides business
value is developed first. Releases of the system are frequent and
incrementally add functionality to the first release.
Simple Design Enough design is carried out to meet the current requirements
and no more.
Test first development An automated unit test framework is used to write tests for a new
piece of functionality before that functionality itself is
Refactoring All developers are expected to refactor the code continuously as
soon as possible code improvements are found. This keeps the
code simple and maintainable.
32Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Extreme programming practices
Pair Programming Developers work in pairs, checking each otherÕs work and
providing the support to always do a good job.
Collective Ownership The pairs of developers work on all areas of the system, so that
no islands of expertise develop and all the developers own all the
code. Anyone can change anything.
Continuous Integration As soon as work on a task is complete it is integrated into the
whole system. After any such integration, all the unit tests in the
system must pass.
Sustainable pace Large amounts of over-time are not considered acceptable as the
net effect is often to reduce code quality and medium term
On-site Customer A representative of the end-user of the system (the Customer)
should be available full time for the use of the XP team. In an
extreme programming process, the customer is a member of the
development team and is responsible for bringing system
requirements to the team for implementation.
33Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
XP and agile principles
Incremental development is supported through small,
frequent system releases.
Customer involvement means full-time customer
engagement with the team.
People not process through pair programming,
collective ownership and a process that avoids long
Change supported through regular system releases.
Maintaining simplicity through constant refactoring of
34Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
In XP, user requirements are expressed as
scenarios or user stories.
These are written on cards and the
development team break them down into
implementation tasks. These tasks are the
basis of schedule and cost estimates.
The customer chooses the stories for
inclusion in the next release based on their
priorities and the schedule estimates.
35Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Story card for document downloading
Downloading and printing an article
First, you select the article that you want froma displayed list.You
then have to tell the systemhow you will pay for it - this can either
be through a subscription, through a company account or by credit
After this, you get a copyright formfromthe systemto fill in and,
when you have submitted this, the article you want is downloaded
onto your computer.
You then choose a printer and a copy ofthe article is printed.You
tell the systemifprinting has been successful.
Ifthe article is a print-only article, you canÕt keep the PDF version
so it is automatically deleted fromyour computer.
36Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Testing in XP
Incremental test development from
User involvement in test development and
Automated test harnesses are used to run
all component tests each time that a new
release is built.
37Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Task cards for document downloading
Task 1: Implement principal workflow
Task 2: Implement article catalog and selection
Task 3: Implement payment collection
Payment may be made in 3 different ways.The user
selects which way they wish to pay. Ifthe user
has a library subscription, then they can input the
subscriber key which should be checked by the
system.Alternatively, they can input an organisational
account number. Ifthis is valid, a debit ofthe cost
ofthe article is posted to this account. Finally, they
may input a 16 digit credit card number and expiry
date.This should be checked for validity and, if
valid a debit is posted to that credit card account.
38Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Test case description
Test 4:Test credit card validity
Astring representing the credit card number and two integers representing
the month and year when the card expires
Check that all bytes in the string are digits
Check that the month lies between 1 and 12 and the
year is greater than or equal to the current year.
Using the first 4 digits ofthe credit card number,
check that the card issuer is valid by looking up the
card issuer table. Check credit card validity by submitting the card
number and expiry date information to the card
OK or error message indicating that the card is invalid
39Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Writing tests before code clarifies the
requirements to be implemented.
Tests are written as programs rather than
data so that they can be executed
automatically. The test includes a check
that it has executed correctly.
All previous and new tests are automatically
run when new functionality is added. Thus
checking that the new functionality has not
40Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
In XP, programmers work in pairs, sitting together to
This helps develop common ownership of code and
spreads knowledge across the team.
It serves as an informal review process as each line of
code is looked at by more than 1 person.
It encourages refactoring as the whole team can
benefit from this.
Measurements suggest that development productivity
with pair programming is similar to that of two people
41Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Agile methods have received a lot of
attention but other approaches to rapid
application development have been used
for many years.
These are designed to develop data-
intensive business applications and rely on
programming and presenting information
from a database.
42Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
RAD environment tools
Database programming language
Links to office applications
43Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
A RAD environment
Database mana gement system
44Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Visual programming with
File Edit Views Layout Options Help
12th January 2 000
45Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh
Software Engineering by Ian Sommerville,
Chapter 4 and 17, 7th
Rushdi Shams, Lecturer, Dept of CSE, KUET, Bangladesh 46