Lesson2-SWEprinciples
Lesson2-SWEprinciples
1
Topics: Principles of Software Engineering
The inherent challenge of software engineering
The importance of analysis and design
Best practices
2
Software Development Historical Analysis
No Silver Bullet – Brooks (1986)
Essential nature of SW engineering vs. the non-essential
Non-essential -- E.g., syntax of programming languages
Major advances already made for non-essential aspects
High level languages, IDEs, Application platforms,
Software and GUI tools, builds, source control, etc.
3
Essential Difficulties
Complexity
Combinatorial complexity of states and processes
Sheer size
Interactive, distributed, networked
Conformity
Expect software to conform to needs of hardware and
business domains, even if a more "logical" approach would
involve changing these external interfaces
4
Essential Difficulties (cont)
Changeability
Expect to modify incredibly complex systems
Many pressures to modify software: reality changes,
functionality extensions, easier than hardware, lasts longer
Invisibility
Software is abstract compared to to buildings, bridges, …
Difficult for visual diagrams to capture
5
Software Development Historical Analysis
• 1994 – W.W. Gibbs, "Software's Chronic Crisis", Scientific American, Sept., 1994
• 25% of large scale SW projects cancelled
• Average delivery is late by 50% (worse for
large scale projects)
• 75% of large scale SW projects – do not
function as intended or are not even used
6
The Need for a Software Engineering “Process”
1999 - (Jacobson, The Unified Software Development Process, 1999, pp.3-4)
"The software problem boils down to the difficulty developers face in pulling
together the many strands of a large software undertaking. The software
development community needs a controlled way of working. It needs a
process that integrates the many facets of software development. It needs
a common approach, a process that :
Provides guidance to the order of a team's activities.
Directs the tasks of individual developers and the team as a
whole.
Specifies what artifacts should be developed.
Offers criteria for monitoring and measuring a project's products
and activities.
"The presence of a well-defined and well-managed process is a key
discriminator between hyperproductive projects and unsuccessful ones."
7
Topics: Principles of Software Engineering
The inherent challenge of software engineering
The importance of analysis and design
Best practices
8
Importance of Maintainability
2% 5%
6%
5% Requirements
Analysis
7% Design
Coding
8% Testing
Integration
67%
Maintenance
9
Importance of a Good Start
Fixing faults is much cheaper earlier in life-cycle than later
60-70% faults in large projects specification/design faults.
Good A&D facilitate integration and maintenance
Greatest potential area for improvement and payback
Cost to Detect & Correct a Fault
400
350
Relative Cost
300
250
200
150
100
50
0
ts
n
n
ce
n
sis
io
t io
sig
en
an
at
y
ta
m
De
al
gr
en
en
An
ire
te
nt
em
qu
In
ai
M
pl
Re
Im
10
Increasing Costs to Detect and Correct Faults
11
Summary Points
Efficient development of quality software in a timely manner
is inherently difficult
Two-thirds of all the faults in large scale projects have been
observed to be specification or design faults. Two-thirds of
the life-cycle costs of a software system are incurred during
the maintenance phase.
12
Topics: Principles of Software Engineering
The inherent challenge of software engineering
The importance of analysis and design
Best practices
13
Greatest Potential (Brooks)
Rapid prototyping
Incremental development
Develop great designers
14
Value of OO Techniques
Widely accepted in the field as supporting good software
engineering principles and practices
Analysis and design closely integrated with implementation
Directly addresses 60-70% faults in specs and design
Objects support greater integrity of software components
Encapsulate implementation details
Leads to reusability, extensibility, and maintainability
Addresses other area of maximum potential payback
(maintenance)
15
Unified Process Delivers Best Practices
Develop Iteratively
Use
Manage Model Verify
Component Visually
Requirements Architectures Quality
Control Changes
16
Visually Model Software
Addresses one of Brooks’ “essential” difficulties (inherent
abstractness of software)
Helps to visualize, specify, construct and document
structure and behavior of a system
Using a standard modeling language (like UML) helps to
maintain consistency among system’s artifacts and
facilitates communication among team members
K12-13
17
What Is the UML?
The Unified Modeling Language (UML) is a language for
Specifying
Visualizing
Constructing
Documenting
18
Inputs to UML
Booch
Rumbaugh Jacobson
Fusion
Meyer
Operation descriptions,
Before and after
Message numbering
conditions
Embley
Harel
Singleton classes,
State charts
High-level view
Gamma, et.al
Wirfs-Brock
Frameworks, patterns,
Responsibilities
notes Shlaer - Mellor Odell
19
The UML Provides Standardized Diagrams
Models
Deployment Component
Diagrams Diagrams
20
Best Practices Address Root Causes
Visually model software
Develop software iteratively
Use component-based architectures
Manage requirements
Verify software quality
Control changes to software
K5-6
21
What Is a Software Development Process?
J4
22
RUP Key Features
Use case driven
Iterative and incremental
Models, workflows, phases, and iterations
Architecture centric
23
Rational Unified Process Is Use-Case Driven
24
Use-Cases Include a Flow of Events
Flow of events for the Withdraw Money Use-Case
1. The Use-Case begins when the client inserts an ATM card.
The system reads and validates information on the card.
2. The system prompts for the PIN. Client enters PIN. The
system validates the PIN.
3. The system asks which operation the client wishes to
perform. Client selects “Cash withdrawal.” System requests
amount.
4. Client enters amount. System requests the account type.
5. Client selects account type (checking, savings, credit). The
system communicates with the ATM network . . .
25
Benefits of a Use-Case Driven Process
Use-Cases are concise, simple, and understandable by a
wide range of stakeholders
End users, developers and acquirers understand functional
requirements of the system
Use-Cases drive numerous activities in the process:
Creation and validation of the design model
Definition of test cases and procedures of the test model
Planning of iterations
Creation of user documentation
Use-Cases help synchronize the content of different models
26
RUP Key Features
Use case driven
Iterative and incremental
phases, iterations, and workflows
Architecture-centric
27
Develop Software Iteratively
An initial design will likely be flawed with respect to its key
requirements
Late-phase discovery of design defects results in costly
over-runs and/or project cancellation
28
Traditional Waterfall Development
Requirements
Analysis
Design
Subsystem
Testing
System Testing
T I M E
29
Waterfall Development Delays Reduction of Risk
Requirements
R Analysis
I
Design
S
K Code & Unit
Testing
Subsystem
Testing
System Testing
T I M E
K6-7
30
Apply the Waterfall Iteratively to System Increments
T I M E
31
Iterative Development Accelerates Risk Reduction
K Iterative Waterfall
32
Lifecycle Phases
time
time
Life-cycle Life-cycle Initial Operational Product
Objective Architecture Capability release
Milestone Milestone Milestone
K60
34
Iterations and Phases
Each phase consists of one or several iterations.
time
Iteration Iteration Iteration Iteration Iteration Iteration Iteration Iteration
#1 #2 #3 #4 #5 #6 #7 #8
K62, J9
35
Overall Architecture of the Rational Unified Process
K45, J11
36
Benefits of Iterative Development
Serious misunderstandings become evident early in the life
cycle
Enables and encourages user feedback
Development focuses on critical issues
Objective assessment thru testing
Inconsistencies detected early
Workload of teams is spread out
Leverage lessons learned earlier
Stakeholders are kept up to date on project’s status
K8
37
RUP Key Features
Use case driven
Iterative and incremental
Models, workflows, phases, and iterations
Architecture-centric
38
Software Architecture Encompasses
Organization of a software system
Selection of the structural elements and their interfaces by
which a system is composed
Their behavior, as specified in collaborations among those
elements
The composition of these structural and behavioral elements
into progressively larger subsystems
K9-10
39
Example: Component-Based Architecture
Lead Tracking Licensing
User Interface User Interface
User Interface
Mechanisms
Key:
- Purchased Oracle Vantive
- Built
- New
K11
40
Benefits of using Component Architectures
K10-11
41
Review Questions
K13-14
42