Software Engineering PPT - 2
Software Engineering PPT - 2
1
Introduction
● Emphasis has shifted
– from error correction to error prevention.
4
Introduction
7
Process framework
● Why process :
● A process defines who is doing what, when and
how to reach a certain goal.
● To build complete software process.
● Identified a small number of framework activities
that are applicable to all software projects,
regardless of their size or complexity.
● It encompasses a set of umbrella activities that are
applicable across the entire software process.
8
Process Framework
•Each framework
activities is populated by
a set for software
engineering actions – a
collection of related
tasks.
• Each action has
individual work task.
9
Generic Process Framework Activities
● Communication:
– Heavy communication with customers, stakeholders, team
– Encompasses requirements gathering and related activities
● Planning:
– Workflow that is to follow
– Describe technical task, likely risk, resources will require, work
products to be produced and a work schedule.
● Modeling:
– Help developer and customer to understand requirements (Analysis
of requirements) & Design of software
● Construction
– Code generation: either manual or automated or both
– Testing – to uncover error in the code.
● Deployment:
– Delivery to the customer for evaluation
– Customer provide feedback
10
The Process Model: Adaptability
11
Umbrella Activities
● Software project tracking and control
– Assessing progress against the project plan.
– Take adequate action to maintain schedule.
● Formal technical reviews
– Assessing software work products in an effort to uncover and remove errors before goes
into next action or activity.
● Software quality assurance
– Define and conducts the activities required to ensure software quality.
● Software configuration management
– Manages the effects of change.
● Document preparation and production
– Help to create work products such as models, documents, logs, form and list.
● Reusability management
– Define criteria for work product reuse
– Mechanisms to achieve reusable components.
● Measurement
– Define and collects process, project, and product measures
– Assist the team in delivering software that meets customer’s needs.
● Risk management
– Assesses risks that may effect that outcome of project or quality of product (i.e. 12
software)
Life Cycle Model
● A software life cycle model (or process
model):
– a descriptive and diagrammatic model of
software life cycle
– identifies all the activities required for product
development,
– establishes a precedence ordering among the
different activities,
– Divides life cycle into phases.
13
Software Life Cycle
● Software life cycle (or software
process):
– Series of identifiable stages that a
software product undergoes during its
life time:
● Feasibility study
● Requirements analysis and specification,
● Design,
● Coding,
● Testing
● Maintenance. 14
Why Model Life Cycle ?
● A written description:
– Forms a common understanding of activities among the
software developers.
– Helps in identifying inconsistencies, redundancies, and
omissions in the development process.
– Helps in tailoring a process model for specific projects.
16
Life Cycle Model (CONT.)
18
Life Cycle Model (CONT.)
20
Classical Waterfall Model
Feasibility Study
Req. Analysis
Design
Coding
Testing
Maintenance
21
Relative Effort for Phases
● Phases between feasibility
study and testing 60
– known as development phases.
50
Relative Effort
● Among all life cycle phases 40
– maintenance phase consumes
maximum effort.
30
20
● Among development phases,
10
– testing phase consumes the
maximum effort. 0
Maintnce
Design
Coding
Test
Req. Sp
22
Classical Waterfall Model
(CONT.)
23
Feasibility Study
● Main aim of feasibility study:determine whether
developing the product
– financially worthwhile
– technically feasible.
24
Activities during Feasibility
Study
● Work out an overall understanding of the
problem.
● Formulate different solution strategies.
● Examine alternate solution strategies in
terms of:
● resources required,
● cost of development, and
● development time.
25
Activities during Feasibility
Study
● Perform a cost/benefit analysis:
– to determine which solution is the best.
– you may determine that none of the
solutions is feasible due to:
● high cost,
● resource constraints,
● technical reasons.
26
Requirements Analysis and
Specification
● Aim of this phase:
– understand the exact requirements of
the customer,
– document them properly.
● Consists of two distinct activities:
– requirements gathering and analysis
– requirements specification.
27
Goals of Requirements Analysis
● Collect all related data from the
customer:
– analyze the collected data to clearly
understand what the customer wants,
– find out any inconsistencies and
incompleteness in the requirements,
– resolve all inconsistencies and
incompleteness.
28
Requirements Gathering
● Gathering relevant data:
– usually collected from the end-users
through interviews and discussions.
– For example, for a business accounting
software:
● interview all the accountants of the
organization to find out their requirements.
29
Requirements Analysis (CONT.)
● Object structure
– further refined to obtain the detailed design. 33
Implementation
● Purpose of implementation phase
– translate software design into
source code.
● During the implementation phase:
– each module of the design is coded,
– each module is unit tested
● tested independently as a stand alone unit,
and debugged,
– each module is documented.
34
Implementation (CONT.)
35
Integration and System
Testing
● Different modules are integrated in a
planned manner:
– modules are almost never integrated in one
shot.
– Normally integration is carried out through a
number of steps.
36
System Testing
37
Maintenance
● Maintenance of any software
product:
– requires much more effort than
the effort to develop the product
itself.
– development effort to
maintenance effort is typically
40:60.
38
Maintenance (CONT.)
● Corrective maintenance:
– Correct errors which were not discovered during the
product development phases.
● Perfective maintenance:
– Improve implementation of the system
– enhance functionalities of the system.
● Adaptive maintenance:
– Port software to a new environment,
● e.g. to a new computer or to a new operating system.
39
Iterative Waterfall Model
● Classical waterfall model is idealistic:
– assumes that no defect is introduced
during any development activity.
– in practice:
● defects do get introduced in almost every
phase of the life cycle.
● Defects usually get detected much later in
the life cycle:
– For example, a design defect might go unnoticed
till the coding or testing phase.
40
Iterative Waterfall Model
(CONT.)
41
Iterative Waterfall Model
Feasibility Study
Req. Analysis
Design
Coding
Testing
Maintenance
42
Iterative Waterfall Model
● Errors should be detected
• in the same phase in which they are
introduced.
● For example:
• if a design problem is detected in the
design phase itself,
• the problem can be taken care of much more
easily
• than say if it is identified at the end of the
integration and system testing phase.
43
Iterative Waterfall Model
● Iterative waterfall model is by far the most
widely used model.
– Almost every other model is derived from the
waterfall model.
● Irrespective of the life cycle model actually
followed:
– the documents should reflect a classical
waterfall model of development,
– comprehension of the documents is facilitated.
44
Prototyping Model
● Before starting actual development,
– a working prototype of the system should first
be built.
45
Reasons for developing a prototype
● Illustrate to the customer:
– input data formats, messages, reports, or
interactive dialogs.
● Examine technical issues associated with
product development:
– Often major design decisions depend on
issues like:
● response time of a hardware controller,
● efficiency of a sorting algorithm, etc.
46
Prototyping Model (CONT.)
47
Prototyping Model (CONT.)
48
Prototyping Model (CONT.)
Build Prototype
Test
Maintain
49
Prototyping Model (CONT.)
50
Prototyping Model (CONT.)
51
Prototyping Model (CONT.)
53
Evolutionary Model
● Evolutionary model (successive versions or
incremental model):
– The system is broken down into several modules which can be
incrementally implemented and delivered.
– The requirements, plan, estimates, and solution evolve over
the iterations, rather than fully defined and frozen
specification effort before.
– the development iterations begin.
57
Advantages of Evolutionary
Model
● Users get a chance to experiment with a partially
developed system:
– much before the full working version is released,
62
Spiral Model (CONT.)
4. Customer
Evaluation of 3. Develop Next
Prototype Level of Product
63
Objective Setting (First
Quadrant)
● Identify objectives of the phase,
● Examine the risks associated with these
objectives.
– Risk:
● any adverse circumstance that might
hamper successful completion of a
software project.
64
Risk Assessment and Reduction (Second
Quadrant)
65
Spiral Model (CONT.)
66
Spiral Model as a meta
model
● Subsumes all discussed models:
– a single loop spiral represents waterfall model.
– uses an evolutionary approach --
● iterations through the spiral are evolutionary levels.
– enables understanding and reacting to risks
during each iteration along the spiral.
– uses:
● prototyping as a risk reduction mechanism
● retains the step-wise approach of the waterfall
model.
67
Spiral Model as a meta
model
● For projects having many unknown risks that might
show up as the development proceeds, the spiral
model would be the most appropriate development
model to follow.
70
V-Model
● In each development phase, along with the
development of a work product, test case design
and the plan for testing the work product are
carried out, whereas the actual testing is carried
out in the validation phase.
71
Advantages of V-Model
● Much of the testing activities (test case design,
test planning, etc.) are carried out in parallel with
the development activities.
● Usually leads to a shorter testing phase and an
overall faster product development as compared
to the iterative model.
● The test team is associated with the project from
the beginning.
● Therefore they build up a good understanding of
the development artifacts, and this in turn, helps
them to carry out effective testing of the
software. 72
Disadvantages of V-Model
● Being a derivative of the classical waterfall
model, this model inherits most of the
weaknesses of the waterfall model.
73
Agile Model
● Agile software development is a group of software
development methods based on iterative and
incremental development, where requirements and
solutions evolve through collaboration
between self-organizing, cross-functional teams.
– Methods
– Iterative
– incremental
78
Disadvantages of Agile Model
● Lack of formal documents leaves scope for
confusion and important decisions taken during
different phases can be misinterpreted at later
points of time by different team members.
79
Extreme Programming (XP)
● Extreme programming (XP) is an important process
model under the agile umbrella and was proposed by
Kent Beck in 1999.
80
Extreme Programming (XP)
● XP is based on frequent releases, during which the
developers implement “user stories”.
● A user story is the conversational description by
the user about a feature of the required system.
● On the basis of user stories, the project team
proposes “metaphors”—a common vision of how the
system would work.
● The development team may decide to construct a
spike for some feature.
● A spike, is a very simple program that is
constructed to explore the suitability of a solution
being proposed. 81
Practices in XP
82
Practices in XP
● Code review: The programmers take turn in writing programs
and while one writes the other reviews code that is being
written.
● Testing: XP suggests test-driven development (TDD) to
continually write and execute test cases.
● Incremental development: It suggests that the team should
come up with new increments every few days.
● Simplicity: For creating the simplest code, one can ignore the
aspects such as efficiency, reliability, maintainability, etc.
● Design: This can be achieved through refactoring, whereby a
working code is improved for efficiency and maintainability.
● Integration testing: XP suggests that the developers should
achieve continuous integration, by building and performing
integration testing several times a day. 83
Why is it called “Extreme?”
● Extreme Programming takes the effective principles and
practices to extreme levels.
84
Extreme Programming Advantages
● Slipped schedules: Short and achievable development cycles
ensure timely deliveries.
● Cancelled projects: Focus on continuous customer
involvement ensures transparency with the customer and
immediate resolution of any issues.
● Costs incurred in changes: Extensive and ongoing testing
makes sure the changes do not break the existing
functionality.
– A running working system always ensures sufficient time
for accommodating changes such that the current
operations are not affected.
● Production and post-delivery defects: Emphasis is on the
unit tests to detect and fix the defects early.
85
Extreme Programming Advantages
● Misunderstanding the business and/or domain: Making the
customer a part of the team ensures constant communication
and clarifications.
● Business changes: Changes are considered to be inevitable
and are accommodated at any point of time.
● Staff turnover: Intensive team collaboration ensures
enthusiasm and good will.
– Cohesion of multi-disciplines fosters the team spirit.
86
Applicability of XP
● Projects involving new technology or research pro
jects: In this case, the requirements change rapidly
and unforeseen technical problems need to
be resolved.
● Small projects: Extreme programming was proposed
in the context of small teams as face to face
meeting is easier to achieve.
87
SCRUM Process model
● Scrum is a process framework within which you can employ
various processes and techniques.
● Scrum makes clear the relative efficacy of your product
management and development practices so that you can
improve.
● The Scrum framework consists of
– Scrum Teams and their associated roles, events, artifacts,
and rules.
– Each component within the framework serves a specific
purpose and is essential to Scrum’s success and usage.
● The rules of Scrum bind together the events, roles, and
artifacts, governing the relationships and interaction between
them.
88
Sequential vs. Overlap
Requirements Design Code Test
89
Scrum Framework
90
Scrum Framework
Roles
•Product owner
•Scrum Master
•Team Ceremonies
•Sprint planning
•Sprint review
•Sprint retrospective
•Daily scrum meeting
Artifacts
•Product backlog
•Sprint backlog
•Burndown charts 91
Scrum Roles
– Product Owner
● Possibly a Product Manager or Project Sponsor
● Decides features, release date, prioritization,
– Scrum Master
● Typically a Project Manager or Team Leader
● Responsible for enacting Scrum values and practices
● Remove impediments / politics, keeps everyone productive
– Project Team
● 5-10 members; Teams are self-organizing
● Cross-functional: QA, Programmers, UI Designers, etc.
● Membership should change only between sprints
92
Sprint in SCRUM
● The heart of Scrum is a Sprint,
– a time-box of two weeks or one month during which a
potentially releasable product increment is created.
● A new Sprint starts immediately after the conclusion of the
previous Sprint.
● Sprints consist of the Sprint planning, daily scrums, the
development work, the Sprint review, and the Sprint
retrospective.
● In Sprint planning, the work to be performed in the Sprint is
planned collaboratively by the Scrum Team.
● The Daily Scrum Meeting is a 15-minute time-boxed event for
the Scrum Team to synchronize the activities and create a plan
for that day. 93
Sprint in SCRUM
● A Sprint Review is held at the end of the Sprint to inspect
the Increment and make changes to the Product Backlog, if
needed.
● The Sprint Retrospective occurs after the Sprint Review and
prior to the next Sprint Planning.
● In this meeting, the Scrum Team is to inspect itself and
create a plan for improvements to be enacted during the
subsequent Sprint.
94
Scrum's Artifacts
● Scrum has remarkably few artifacts
– Product Backlog
– Sprint Backlog
– Burndown Charts
97
Sprint Backlog
● Individuals sign up for work of their own choosing
– Work is never assigned
● Estimated work remaining is updated daily
99
Hours
Sample Burndown Chart
100
Tasks Mon Tue Wed Thu Fri
Code the user interface 8 4 8
Code the middle tier 16 12 10 7
Test the middle tier 8 16 16 11 8
Write online help 12
50
40
30
Hours
20
10
0
Mon Tue Wed Thu Fri
101
Project characteristics not
suited to development using
agile models
● Stable requirements: Conventional development
models are more suited to use in projects
characterized by stable requirements. For such
projects, it is known that few changes, if at all, will
occur.
● Mission critical or safety critical systems: In the
development of such systems, the traditional SDLC
models are usually preferred to ensure reliability.
102
Comparison of Different Life
Cycle Models
● Iterative waterfall model
– most widely used model.
– But, suitable only for well-understood
problems.
– Not suitable for development of very large
projects and projects that suffer from large
number of risks.
103
Comparison of Different Life
Cycle Models
● Prototype model is suitable for projects
not well understood:
– user requirements
– technical aspects
– all the risks can be identified before the
project starts.
– This model is especially popular for
development of the user interface part of
projects.
104
Comparison of Different Life
Cycle Models (CONT.)
105
Comparison of Different Life
Cycle Models (CONT.)
108
How to select a life cycle model
109
How to select a life cycle model
110
111
How to select a life cycle model
114