Lecture5-2

advertisement
Informatics 43
Introduction to Software Engineering
Lecture 5-2
April 30, 2015
Emily Navarro
Duplication of course material for any commercial purpose without the explicit written
permission of the professor is prohibited.
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 1
Today’s lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 2
Today’s lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 3
Reminder: Essential Ingredients of Software
Engineering
• People
– who else would do the work?
– range from novice to very experienced
• Processes
– to organize and manage the efforts of individuals
– range from informal to very formal
• Tools
– to support the people and the processes
– range from simple to very advanced
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 4
Reminder: Processes
• Essential to achieve a quality product
• Scarce resource
– quality
– suitability
– cost
• Many different kinds of processes
– bug tracking
– change approval
– quality assurance
Instructor Reminder:
Play first “process” video:
https://www.youtube.com/watch?v=CT70iCaG0Gs
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 5
High Cost
Analysis
2%
Specification
5%
Design
6%
Maintenance
67%
Module Coding
5%
Module Testing
7%
Integration
8%
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 6
Cost of Change Progressively Higher
200
180
160
140
120
100
80
60
40
20
0
Analysis
SDCL
Software Design and
Collaboration Laboratory
Specification
Design
Implementation
Department of Informatics, UC Irvine
Integration
Maintenance
sdcl.ics.uci.edu 7
More Reminders
• Essential qualities
–
–
–
–
Complexity
Conformity
Changeability
Intangibility
• Potentially drastic or disastrous consequences
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 8
Today’s lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 9
Processes as a Remedy
• Software is engineered via a defined process
– Cover all steps from initial idea and requirements to delivery,
maintenance, and final retirement
– Make sure we do the right things/we do things right
– Make sure we do not forget to do anything
– Different processes for different kinds of software
• Not a silver bullet [Brooks “No Silver Bullet”]
– Software is still intrinsically difficult to deal with
– Processes help, but cannot guarantee anything
Remember: People + Processes + Tools  Product
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 10
Processes
• Elements
– Activities (“Phases”)
– Artifacts
• E.g., requirements document, design document, code, test cases…
• Can include process specifications
– Resources
• People (their time and their cost)
• Tools (their time and their cost)
• Relationships between the elements
– Precedence, requires, provides, refines to, …
• Constraints
– Time
– Cost
– Qualities (repeatable process?)
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 11
Fun with Models
Fashion
SDCL
Software Design and
Collaboration Laboratory
Student
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 12
Fun with Models
Fashion
Student
Model = Ideal
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 13
Fun with Models
Model = Simplified Representation
Software Process Model
Waterfall
Prototype
Spiral
Architecture Model
Layered
Client Server
Model View Controller
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 14
Fun with Models
Model = Simplified Representation
public class Elephant {
int weight;
// in kg
String name;
Species species;
public void forage() {
. . . .
}
}
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 15
What is Software Process Model for?
• A software process model can be thought of
– “prescriptively” – enforcing rules
– or “descriptively” – serving to describe or characterize
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 16
Software Life Cycle Models
•
•
•
•
•
•
•
•
•
Build-and-fix
Waterfall
Rapid prototyping
Incremental
Spiral
Rational Unified Process (RUP)
Open Source Software (OSS)
Extreme Programming (XP)
Agile
A software life cycle model is a high-level process
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 17
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 18
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 19
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 20
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 21
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 22
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 23
Build-and-Fix
Build first
version
Modify until
client is satisfied
Operations mode
Development
Maintenance
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 24
So…
• What is it good for? (strengths)
• What is it bad for? (weaknesses)
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 25
So…
• What is it good for? (strengths)
– Small programs that do not require much maintenance
• What is it bad for? (weaknesses)
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 26
So…
• What is it good for? (strengths)
– Small programs that do not require much maintenance
• What is it bad for? (weaknesses)
– Any nontrivial project
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 27
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 28
Waterfall
• First documented by Royce in 1970 (!)
• Has withstood the test of time
– Still being used worldwide…
– But not without problems…
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 29
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 30
Waterfall
• Has clear benefits/strengths
– “Forced” discipline (rigor/formality)
• Stepwise progression through well-defined phases
• Documentation-driven at each phase
• Each phase ends with Testing/Quality Assurance
– Validation, verification, and the ability to correct
– Feedback loops
• During product development
• Post-delivery maintenance
• So…
– What seems to be the problem(s)?
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 31
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 32
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 33
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 34
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 35
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 36
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 37
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 38
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 39
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 40
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 41
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 42
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 43
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 44
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 45
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 46
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 47
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 48
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 49
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 50
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 51
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 52
Waterfall
Requirements
phase
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 53
So…
• What is it good for? (strengths)
• What is it bad for? (weaknesses)
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 54
So…
• What is it good for? (strengths)
–
–
–
–
–
Promotes understanding of requirements first
Disciplined
Lots of documentation
Easy to track progress
Provides a framework upon which to create more dynamic, realistic
processes
– Good for short, simple projects will well-understood requirements
• What is it bad for? (weaknesses)
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 55
So…
• What is it good for? (strengths)
–
–
–
–
–
Promotes understanding of requirements first
Disciplined
Lots of documentation
Easy to track progress
Provides a framework upon which to create more dynamic, realistic
processes
– Good for short, simple projects will well-understood requirements
• What is it bad for? (weaknesses)
– No iterations
– Limited user input
– Bad for long-term projects with any ambiguity in requirements
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 56
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 57
Rapid Prototyping
Build and discard
simple prototype
Verify
Changed
requirements
Verify
Specification
phase
Verify
Design
phase
Verify
Implementation
phase
Test
Development
Maintenance
Integration
phase
Test
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 58
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 59
Incremental
Requirements
phase
Verify
Specification
phase
Verify
Architectural
design
Verify
Development
Maintenance
FOR EACH BUILD
Perform detailed design,
implementation, and
integration. Test.
Deliver to client.
Operations mode
SDCL
Software Design and
Collaboration Laboratory
Retirement
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 60
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 61
Looking forward to homework 2
• Multi-person
– What if people “step on each other’s toes?”
– What if people need to access each other’s files?
• Multi-version
– Each version has some shared files, and some files specific to that
version
– Versions may replace each other over time
– A prior version may need to be examined or modified
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 62
Version Control Software
• a.k.a. “Revision control,” “Source control”
• Manages changes over time by multiple people
• Tension between safety and flexibility, between control and
freedom
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 63
Homework 2
• Homework 2 will introduce you to the concepts and software
behind version control, using the example of Git
• Three parts
– Part A (due 5/12)
• Install Git
• Perform some basic commands
– Part B (due 5/19)
• Create a local repository
– Part C (due 5/26)
• Download and examine a public repository
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 64
Homework 2
• Homework 2 is posted
• For technical help/questions with the assignment, post on
Piazza
• Attend discussion tomorrow for an introduction to Git
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 65
Today’s Lecture
• Reminders
• Software Process Models
–
–
–
–
Build-and-fix
Waterfall
Rapid Prototyping
Incremental
• Homework 2
• Midterm study guide
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 66
Midterm
•
•
•
•
•
•
Next Thursday, May 7th
80 minutes long
Closed book, closed notes
You can leave when you are finished
Show your ID card to one of the teaching staff
Exit only through the two doors at the bottom of the
classroom
• Part multiple-choice, part short/long answer
• Advice: read questions carefully, re-read your answer and
check whether it clearly says what you mean, don’t rush out
at the end
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 67
Midterm Topics
• The two Brooks articles
• Software process models (through today’s lecture)
– Waterfall model + strengths/weaknesses
– Rapid prototyping and incremental models
•
•
•
•
Requirements engineering
Software qualities (security, usability, etc.)
Software failures
Software engineering big picture (definition, perspectives, essential
ingredients, characteristics, principles)
– Know one definition of SE word-for-word
• Use cases
• Software architecture, architectural styles, architectural evolution
• Anything else from lecture
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 68
Midterm Studying
•
•
•
•
SDCL
Lectures
Things I told you to study for quizzes
Quizzes
Discussion assignments
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 69
Midterm Studying
On the Unix or Linux command line, you can start with a file of records, then
filter them, sort them, and remove duplicate records. This architectural style
is called
Filter-and-pipe
Publish-subscribe
Pipe-and-filter
Layered
None of the above
Draw and label a diagram of the pipe-and-filter architectural style. Describe
one of its benefits.
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 70
Midterm Studying
The incremental software process model is a variation of:
The Spiral model
The Waterfall model
Extreme Programming
Rational Unified Process
Describe how the Incremental software process model improves upon the
Waterfall model.
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 71
Midterm Questions
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 72
Next time
• More software process models
SDCL
Software Design and
Collaboration Laboratory
Department of Informatics, UC Irvine
sdcl.ics.uci.edu 73
Download