0% found this document useful (0 votes)
53 views70 pages

Ch2 SW Processes

The document provides an overview of software processes. It discusses that a software process involves specification, design/implementation, validation, and evolution activities. It describes different types of software processes, including plan-driven processes, agile processes, the waterfall model, incremental development, and integration/configuration processes. The key activities involved in requirements engineering, design/implementation, and validation are also summarized.

Uploaded by

Shady Abdulaziz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views70 pages

Ch2 SW Processes

The document provides an overview of software processes. It discusses that a software process involves specification, design/implementation, validation, and evolution activities. It describes different types of software processes, including plan-driven processes, agile processes, the waterfall model, incremental development, and integration/configuration processes. The key activities involved in requirements engineering, design/implementation, and validation are also summarized.

Uploaded by

Shady Abdulaziz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Chapter 2 – Software Processes

30/10/2014 Chapter 2 Software Processes 1


The software process

 A structured set of activities required to develop a


software system.
 Many different software processes but all involve:
▪ Specification – defining what the system should do;
▪ Design and implementation – defining the organization of the
system and implementing the system;
▪ Validation – checking that it does what the customer wants;
▪ Evolution – changing the system in response to changing
customer needs.
 A software process model is an abstract representation
of a process. It presents a description of a process from
some particular perspective.
30/10/2014 Chapter 2 Software Processes 2
Software process descriptions

 When we describe and discuss processes, we usually


talk about the activities in these processes such as
specifying a data model, designing a user interface, etc.
and the ordering of these activities.
 Process descriptions may also include:
▪ Products, which are the outcomes of a process activity;
▪ Roles, which reflect the responsibilities of the people involved in
the process;
▪ Pre- and post-conditions, which are statements that are true
before and after a process activity has been enacted or a
product produced.

30/10/2014 Chapter 2 Software Processes 3


Plan-driven and agile processes

 Plan-driven processes are processes where all of the


process activities are planned in advance and progress
is measured against this plan.
 In agile processes, planning is incremental and it is
easier to change the process to reflect changing
customer requirements.
 In practice, most practical processes include elements of
both plan-driven and agile approaches.
 There are no right or wrong software processes.

30/10/2014 Chapter 2 Software Processes 4


Software process models

30/10/2014 Chapter 2 Software Processes 5


Software process models

 The waterfall model


▪ Plan-driven model. Separate and distinct phases of specification
and development.
 Incremental development
▪ Specification, development and validation are interleaved. May
be plan-driven or agile.
 Integration and configuration
▪ The system is assembled from existing configurable
components. May be plan-driven or agile.
 In practice, most large systems are developed using a
process that incorporates elements from all of these
models.
30/10/2014 Chapter 2 Software Processes 6
The waterfall model

30/10/2014 Chapter 2 Software Processes 7


Waterfall model phases

 There are separate identified phases in the waterfall


model:
▪ Requirements analysis and definition
▪ System and software design
▪ Implementation and unit testing
▪ Integration and system testing
▪ Operation and maintenance
 The main drawback of the waterfall model is the difficulty
of accommodating change after the process is
underway. In principle, a phase has to be complete
before moving onto the next phase.

30/10/2014 Chapter 2 Software Processes 8


Waterfall model problems

 Inflexible partitioning of the project into distinct stages


makes it difficult to respond to changing customer
requirements.
▪ 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
several sites.
▪ In those circumstances, the plan-driven nature of the waterfall
model helps coordinate the work.

30/10/2014 Chapter 2 Software Processes 9


Incremental development

30/10/2014 Chapter 2 Software Processes 10


Incremental development benefits

 The cost of accommodating changing customer


requirements is reduced.
▪ The amount of analysis and documentation that has to be
redone is much less than is required with the waterfall model.
 It is easier to get customer feedback on the development
work that has been done.
▪ Customers can comment on demonstrations of the software and
see how much has been implemented.
 More rapid delivery and deployment of useful software to
the customer is possible.
▪ Customers are able to use and gain value from the software
earlier than is possible with a waterfall process.
30/10/2014 Chapter 2 Software Processes 11
Incremental development problems

 The process is not visible.


▪ Managers need regular deliverables to measure progress. If
systems are developed quickly, it is not cost-effective to produce
documents that reflect every version of the system.
 System structure tends to degrade as new increments
are added.
▪ Unless time and money is spent on refactoring to improve the
software, regular change tends to corrupt its structure.
Incorporating further software changes becomes increasingly
difficult and costly.

30/10/2014 Chapter 2 Software Processes 12


Integration and configuration

 Based on software reuse where systems are integrated


from existing components or application systems
(sometimes called COTS -Commercial-off-the-shelf)
systems).
 Reused elements may be configured to adapt their
behaviour and functionality to a user’s requirements
 Reuse is now the standard approach for building many
types of business system
▪ Reuse covered in more depth in Chapter 15.

30/10/2014 Chapter 2 Software Processes 13


Reuse-oriented software engineering

30/10/2014 Chapter 2 Software Processes 14


Key process stages

 Requirements specification
 Software discovery and evaluation
 Requirements refinement
 Application system configuration
 Component adaptation and integration

30/10/2014 Chapter 2 Software Processes 15


Advantages and disadvantages

 Reduced costs and risks as less software is developed


from scratch
 Faster delivery and deployment of system
 But requirements compromises are inevitable so system
may not meet real needs of users
 Loss of control over evolution of reused system elements

30/10/2014 Chapter 2 Software Processes 16


Process activities

30/10/2014 Chapter 2 Software Processes 17


Process activities

 Real software processes are inter-leaved sequences of


technical, collaborative and managerial activities with the
overall goal of specifying, designing, implementing and
testing a software system.
 The four basic process activities of specification,
development, validation and evolution are organized
differently in different development processes.
 For example, in the waterfall model, they are organized
in sequence, whereas in incremental development they
are interleaved.

30/10/2014 Chapter 2 Software Processes 18


The requirements engineering process

30/10/2014 Chapter 2 Software Processes 19


Software specification

 The process of establishing what services are required


and the constraints on the system’s operation and
development.
 Requirements engineering process
▪ Requirements elicitation and analysis
• What do the system stakeholders require or expect from the system?
▪ Requirements specification
• Defining the requirements in detail
▪ Requirements validation
• Checking the validity of the requirements

30/10/2014 Chapter 2 Software Processes 20


Software design and implementation

 The process of converting the system specification into


an executable system.
 Software design
▪ Design a software structure that realises the specification;
 Implementation
▪ Translate this structure into an executable program;
 The activities of design and implementation are closely
related and may be inter-leaved.

30/10/2014 Chapter 2 Software Processes 21


A general model of the design process

30/10/2014 Chapter 2 Software Processes 22


Design activities

 Architectural design, where you identify the overall


structure of the system, the principal components
(subsystems or modules), their relationships and how
they are distributed.
 Database design, where you design the system data
structures and how these are to be represented in a
database.
 Interface design, where you define the interfaces
between system components.
 Component selection and design, where you search for
reusable components. If unavailable, you design how it
will operate.
30/10/2014 Chapter 2 Software Processes 23
System implementation

 The software is implemented either by developing a


program or programs or by configuring an application
system.
 Design and implementation are interleaved activities for
most types of software system.
 Programming is an individual activity with no standard
process.
 Debugging is the activity of finding program faults and
correcting these faults.

30/10/2014 Chapter 2 Software Processes 24


Software validation

 Verification and validation (V & V) is intended to show


that a system conforms to its specification and meets the
requirements of the system customer.
 Involves checking and review processes and system
testing.
 System testing involves executing the system with test
cases that are derived from the specification of the real
data to be processed by the system.
 Testing is the most commonly used V & V activity.

30/10/2014 Chapter 2 Software Processes 25


Stages of testing

30/10/2014 Chapter 2 Software Processes 26


Testing stages

 Component testing
▪ Individual components are tested independently;
▪ Components may be functions or objects or coherent groupings
of these entities.
 System testing
▪ Testing of the system as a whole. Testing of emergent properties
is particularly important.
 Customer testing
▪ Testing with customer data to check that the system meets the
customer’s needs.

30/10/2014 Chapter 2 Software Processes 27


Testing phases in a plan-driven software
process (V-model)

30/10/2014 Chapter 2 Software Processes 28


Software evolution

 Software is inherently flexible and can change.


 As requirements change through changing business
circumstances, the software that supports the business
must also evolve and change.
 Although there has been a demarcation between
development and evolution (maintenance) this is
increasingly irrelevant as fewer and fewer systems are
completely new.

30/10/2014 Chapter 2 Software Processes 29


System evolution

30/10/2014 Chapter 2 Software Processes 30


Agile software development

30/10/2014 Chapter 3 Agile Software Development 31


Rapid software development

 Rapid development and delivery is now often the most


important requirement for software systems
▪ Businesses operate in a fast –changing requirement and it is
practically impossible to produce a set of stable software
requirements
▪ Software has to evolve quickly to reflect changing business needs.
 Plan-driven development is essential for some types of
system but does not meet these business needs.
 Agile development methods emerged in the late 1990s
whose aim was to radically reduce the delivery time for
working software systems

30/10/2014 Chapter 3 Agile Software Development 32


Agile development

 Program specification, design and implementation are


inter-leaved
 The system is developed as a series of versions or
increments with stakeholders involved in version
specification and evaluation
 Frequent delivery of new versions for evaluation
 Extensive tool support (e.g. automated testing tools)
used to support development.
 Minimal documentation – focus on working code

30/10/2014 Chapter 3 Agile Software Development 33


Plan-driven and agile development

30/10/2014 Chapter 3 Agile Software Development 34


Plan-driven and agile development

 Plan-driven development
▪ A plan-driven approach to software engineering is based around
separate development stages with the outputs to be produced at
each of these stages planned in advance.
▪ Not necessarily waterfall model – plan-driven, incremental
development is possible
▪ Iteration occurs within activities.
 Agile development
▪ Specification, design, implementation and testing are inter-
leaved and the outputs from the development process are
decided through a process of negotiation during the software
development process.

30/10/2014 Chapter 3 Agile Software Development 35


Agile methods

30/10/2014 Chapter 3 Agile Software Development 36


Agile methods

 Dissatisfaction with the overheads involved in software


design methods of the 1980s and 1990s led to the
creation of agile methods. These methods:
▪ 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.
 The aim of agile methods is to reduce overheads in the
software process (e.g. by limiting documentation) and to
be able to respond quickly to changing requirements
without excessive rework.

30/10/2014 Chapter 3 Agile Software Development 37


The principles of agile methods

Principle Description
Customer involvement Customers should be closely involved throughout the
development process. Their role is provide and prioritize new
system requirements and to evaluate the iterations of the
system.
Incremental delivery The software is developed in increments with the customer
specifying the requirements to be included in each increment.

People not process The skills of the development team should be recognized and
exploited. Team members should be left to develop their own
ways of working without prescriptive processes.
Embrace change Expect the system requirements to change and so design the
system to accommodate these changes.

Maintain simplicity Focus on simplicity in both the software being developed and
in the development process. Wherever possible, actively work
to eliminate complexity from the system.

30/10/2014 Chapter 3 Agile Software Development 38


Agile method applicability

 Product development where a software company is


developing a small or medium-sized product for sale.
▪ Virtually all software products and apps are now developed
using an agile approach
 Custom system development within an organization,
where there is a clear commitment from the customer to
become involved in the development process and where
there are few external rules and regulations that affect
the software.

30/10/2014 Chapter 3 Agile Software Development 39


Agile development techniques

30/10/2014 Chapter 3 Agile Software Development 40


Extreme programming

 A very influential agile method, developed in the late


1990s, that introduced a range of agile development
techniques.
 Extreme Programming (XP) takes an ‘extreme’ approach
to iterative development.
▪ New versions may be built several times per day;
▪ Increments are delivered to customers every 2 weeks;
▪ All tests must be run for every build and the build is only
accepted if tests run successfully.

30/10/2014 Chapter 3 Agile Software Development 41


The extreme programming release cycle

30/10/2014 Chapter 3 Agile Software Development 42


Extreme programming practices (a)

Principle or practice Description


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
development ‘Tasks’. See Figures 3.5 and 3.6.

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
implemented.
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.
30/10/2014 Chapter 3 Agile Software Development 43
Extreme programming practices (b)

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 take
responsibility for all of the code. Anyone can change anything.
Continuous integration As soon as the 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 overtime are not considered acceptable as
the net effect is often to reduce code quality and medium term
productivity
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.
30/10/2014 Chapter 3 Agile Software Development 44
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 working hours.
 Change supported through regular system releases.
 Maintaining simplicity through constant refactoring of
code.

30/10/2014 Chapter 3 Agile Software Development 45


Influential XP practices

 Extreme programming has a technical focus and is not


easy to integrate with management practice in most
organizations.
 Consequently, while agile development uses practices
from XP, the method as originally defined is not widely
used.
 Key practices
▪ User stories for specification
▪ Refactoring
▪ Test-first development
▪ Pair programming

30/10/2014 Chapter 3 Agile Software Development 46


User stories for requirements

 In XP, a customer or user is part of the XP team and is


responsible for making decisions on requirements.
 User requirements are expressed as user stories or
scenarios.
 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.

30/10/2014 Chapter 3 Agile Software Development 47


A ‘prescribing medication’ story

30/10/2014 Chapter 3 Agile Software Development 48


Examples of task cards for prescribing
medication

30/10/2014 Chapter 3 Agile Software Development 49


Refactoring

 Conventional wisdom in software engineering is to


design for change. It is worth spending time and effort
anticipating changes as this reduces costs later in the life
cycle.
 XP, however, maintains that this is not worthwhile as
changes cannot be reliably anticipated.
 Rather, it proposes constant code improvement
(refactoring) to make changes easier when they have to
be implemented.

30/10/2014 Chapter 3 Agile Software Development 50


Refactoring

 Programming team look for possible software


improvements and make these improvements even
where there is no immediate need for them.
 This improves the understandability of the software and
so reduces the need for documentation.
 Changes are easier to make because the code is well-
structured and clear.
 However, some changes requires architecture
refactoring and this is much more expensive.

30/10/2014 Chapter 3 Agile Software Development 51


Examples of refactoring

 Re-organization of a class hierarchy to remove duplicate


code.
 Tidying up and renaming attributes and methods to make
them easier to understand.
 The replacement of inline code with calls to methods that
have been included in a program library.

30/10/2014 Chapter 3 Agile Software Development 52


Test-first development

 Testing is central to XP and XP has developed an


approach where the program is tested after every
change has been made.
 XP testing features:
▪ Test-first development.
▪ Incremental test development from scenarios.
▪ User involvement in test development and validation.
▪ Automated test harnesses are used to run all component tests
each time that a new release is built.

30/10/2014 Chapter 3 Agile Software Development 53


Test-driven development

 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.
▪ Usually relies on a testing framework such as Junit.
 All previous and new tests are run automatically when
new functionality is added, thus checking that the new
functionality has not introduced errors.

30/10/2014 Chapter 3 Agile Software Development 54


Customer involvement

 The role of the customer in the testing process is to help


develop acceptance tests for the stories that are to be
implemented in the next release of the system.
 The customer who is part of the team writes tests as
development proceeds. All new code is therefore
validated to ensure that it is what the customer needs.
 However, people adopting the customer role have limited
time available and so cannot work full-time with the
development team. They may feel that providing the
requirements was enough of a contribution and so may
be reluctant to get involved in the testing process.

30/10/2014 Chapter 3 Agile Software Development 55


Test automation

 Test automation means that tests are written as


executable components before the task is implemented
▪ These testing components should be stand-alone, should
simulate the submission of input to be tested and should check
that the result meets the output specification. An automated test
framework (e.g. Junit) is a system that makes it easy to write
executable tests and submit a set of tests for execution.
 As testing is automated, there is always a set of tests
that can be quickly and easily executed
▪ Whenever any functionality is added to the system, the tests can
be run and problems that the new code has introduced can be
caught immediately.

30/10/2014 Chapter 3 Agile Software Development 56


Problems with test-first development

 Programmers prefer programming to testing and


sometimes they take short cuts when writing tests. For
example, they may write incomplete tests that do not
check for all possible exceptions that may occur.
 Some tests can be very difficult to write incrementally.
For example, in a complex user interface, it is often
difficult to write unit tests for the code that implements
the ‘display logic’ and workflow between screens.
 It difficult to judge the completeness of a set of tests.
Although you may have a lot of system tests, your test
set may not provide complete coverage.

30/10/2014 Chapter 3 Agile Software Development 57


Pair programming

 Pair programming involves programmers working in


pairs, developing code together.
 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 improving the system code.

30/10/2014 Chapter 3 Agile Software Development 58


Pair programming

 In pair programming, programmers sit together at the


same computer to develop the software.
 Pairs are created dynamically so that all team members
work with each other during the development process.
 The sharing of knowledge that happens during pair
programming is very important as it reduces the overall
risks to a project when team members leave.
 Pair programming is not necessarily inefficient and there
is some evidence that suggests that a pair working
together is more efficient than 2 programmers working
separately.
30/10/2014 Chapter 3 Agile Software Development 59
Process improvement

30/10/2014 Chapter 2 Software Processes 60


Process improvement

 Many software companies have turned to software


process improvement as a way of enhancing the quality
of their software, reducing costs or accelerating their
development processes.
 Process improvement means understanding existing
processes and changing these processes to increase
product quality and/or reduce costs and development
time.

30/10/2014 Chapter 2 Software Processes 61


Approaches to improvement

 The process maturity approach, which focuses on


improving process and project management and
introducing good software engineering practice.
▪ The level of process maturity reflects the extent to which good
technical and management practice has been adopted in
organizational software development processes.
 The agile approach, which focuses on iterative
development and the reduction of overheads in the
software process.
▪ The primary characteristics of agile methods are rapid delivery of
functionality and responsiveness to changing customer
requirements.

30/10/2014 Chapter 2 Software Processes 62


The process improvement cycle

30/10/2014 Chapter 2 Software Processes 63


Process improvement activities

 Process measurement
▪ You measure one or more attributes of the software process or
product. These measurements forms a baseline that helps you
decide if process improvements have been effective.
 Process analysis
▪ The current process is assessed, and process weaknesses and
bottlenecks are identified. Process models (sometimes called
process maps) that describe the process may be developed.
 Process change
▪ Process changes are proposed to address some of the identified
process weaknesses. These are introduced and the cycle
resumes to collect data about the effectiveness of the changes.

30/10/2014 Chapter 2 Software Processes 64


Process measurement

 Wherever possible, quantitative process data


should be collected
▪ However, where organisations do not have clearly defined
process standards this is very difficult as you don’t know what to
measure. A process may have to be defined before any
measurement is possible.
 Process measurements should be used to
assess process improvements
▪ But this does not mean that measurements should drive the
improvements. The improvement driver should be the
organizational objectives.

30/10/2014 Chapter 2 Software Processes 65


Process metrics

 Time taken for process activities to be


completed
▪ E.g. Calendar time or effort to complete an activity or process.
 Resources required for processes or activities
▪ E.g. Total effort in person-days.
 Number of occurrences of a particular event
▪ E.g. Number of defects discovered.

30/10/2014 Chapter 2 Software Processes 66


Capability maturity levels

30/10/2014 Chapter 2 Software Processes 67


The SEI capability maturity model

 Initial
▪ Essentially uncontrolled
 Repeatable
▪ Product management procedures defined and used
 Defined
▪ Process management procedures and strategies defined
and used
 Managed
▪ Quality management strategies defined and used
 Optimising
▪ Process improvement strategies defined and used
30/10/2014 Chapter 2 Software Processes 68
Discussion

30/10/2014 Chapter 2 Software Processes 69


 What is the suitable software process for the following
software projects?
▪ Edugate
▪ Improvement of Edugate
▪ Website of Saudi Airlines
▪ Microsooft Excel
▪ New version of Windows
▪ Autonomous car embedded software

30/10/2014 Chapter 2 Software Processes 70

You might also like