Вы находитесь на странице: 1из 16

Software Lifecycle

John Jannotti
CSCI032 (cs032)

Feb 4, 2013

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

1 / 15

Course Announcements

Autocomplete is due today. Project groups are due today. Swing (not git) lab is going on now. Next week
Requirements analysis due Thursday. git lab

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

2 / 15

Requirements Gathering

First step in building a new system


Dene the problem from the users view Determine outlines of best solution Determine what is required & optional Determine limitations on resources Determine acceptance criteria All from the users point of view

Techniques
User studies; interviews; surveys Keep the user part of the team

First step for your term project You must understand what the user wants in order to build it!

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

3 / 15

Specications
Programmers requirements
Detail the problem: what the program does Dene the inputs and outputs Dene interfaces to existing systems Give a precise statement of what will be done Describe how this meets requirements Develop testing and acceptance plan What, not how not time for algorithms / data structures

Techniques
Stories & scenarios Design diagrams, UML User manual

You have to know what you are going to build in order to design it!

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

4 / 15

Software Design
What is involved
Dene system architecture Specify packages, classes and methods Develop data structures and algorithms Problem analysis Dene the solution down to a level where it can be easily implemented

Key principles
Risk Avoidance Simplicity Abstraction

A good spec should allow a good engineer to build your system. A good design should allow a mediocre engineer to build, maintain, and extend your system.

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

5 / 15

Design Process
Top-Level Design
Components and interfaces Dene the boundaries between components
Components allocated to individuals or groups All communication is through interfaces Pretend that subsystems will be used by outsiders.

Detailed design
Class implementations Helper classes, methods, . . .

Techniques
UML; interface code; XP: design as you go (and refactor)
XP does not excuse a lack of forethought.

Prototyping: try things out as part of design

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

6 / 15

Coding

AKA Programming
Should be the easiest part of the process. If not, youre probably conating it with design.

Techniques
Emphasis on programming style Emphasis on defensive programming Write tests with, or before, implementations

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

7 / 15

Testing

Types of Testing
Module or class testing unit tests Integration testing putting classes together Systems testing the whole shebang Acceptance testing by user

A successful test case nds a problem Writing tests forces you to think about API. Think about testing before design & coding
Design: design for and with testing XP: write the test cases rst Testing should be thorough and continuous

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

8 / 15

Maintenance

What it involves
Fixing bugs; adding features; adapting Fix a bug? Write a test.

Most costly and longest (hopefully) part


So work to minimize its cost A surprising way to think about software

Design for Maintenance


Flexibility; planning for change But better to be simple than to design in useless exibility

Coding for Maintenance


Simplicity; abstraction Coding style; defensive programming

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

9 / 15

Models of Software Engineering

Waterfall Feedback Prototyping Agile/XP

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

10 / 15

Waterfall Model

1 2 3 4 5 6

Requirements Specications Design Coding Testing Maintenance

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

11 / 15

Feedback Model

1 2 3 4 5 6

Requirements Specications Design Coding Testing Maintenance

Each step may return to a previous step.

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

11 / 15

Prototyping Model

Requirements Specications Design Coding Testing Maintenance

2a Prototype
2 3 4 5 6

Build a prototype from initial requirements.

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

12 / 15

Agile Programming

Whats wrong with these approaches?


Its Its Its Its unclear unclear unclear unclear what what what what the customer wants really needs to be built is dicult/easy to do the best design is a priori

Agile programming attempts to address these concerns.

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

13 / 15

Agile Workow

Write the test cases rst


This gets the design correct; ensures system continues to work

Work with the end user continually


Not just to get initial requirements. User is part of the development team.

Work in terms of scenarios


Implement vertical functionality; driven by user demand

Work with short development cycles


Each week, implement a set of scenarios Get feedback after each cycle to determine whats next

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

14 / 15

Agile/XP Model

Pair programming
Program in pairs, one writing, one reading We encourage you to try this on pair/group work

Shared responsibility
Everyone on the team is responsible for all the code in the project We may ask anyone in a group about any part of design.

Emphasis on simplicity
Write the simplest code possible Avoid complexity unless absolutely necessary

Encourage refactoring
The best design will evolve As you see ways to improve the design, do so incrementally

John Jannotti (cs32)

Software Lifecycle

Feb 4, 2013

15 / 15

Вам также может понравиться