22
1 Software Engineering: A Practitioner’s Approach, 6/e Software Engineering: A Practitioner’s Approach, 6/e Chapter 5 Chapter 5 Practice: A Generic View Practice: A Generic View copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.

1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 5 Practice: A Generic View Software Engineering: A Practitioner’s Approach, 6/e Chapter

Embed Size (px)

Citation preview

1

Software Engineering: A Practitioner’s Software Engineering: A Practitioner’s Approach, 6/eApproach, 6/e

Chapter 5Chapter 5Practice: A Generic ViewPractice: A Generic View

copyright © 1996, 2001, 2005

R.S. Pressman & Associates, Inc.

For University Use OnlyMay be reproduced ONLY for student use at the university level

when used in conjunction with Software Engineering: A Practitioner's Approach.Any other reproduction or use is expressly prohibited.

2

What is “Practice”?What is “Practice”?

Practice is a broad array of concepts, principles, Practice is a broad array of concepts, principles, methods, and toolsmethods, and tools that you must consider as that you must consider as software is planned and developed.software is planned and developed.

It represents the detailsIt represents the details—the technical —the technical considerations and how to’s—that are below the considerations and how to’s—that are below the surface of the software process—the things that surface of the software process—the things that you’ll need to actually build high-quality you’ll need to actually build high-quality computer software.computer software.

3

The Essence of PracticeThe Essence of Practice

George Polya, in a book written in 1945 (!), George Polya, in a book written in 1945 (!), describes the essence of software engineering describes the essence of software engineering practice …practice …

Understand the problemUnderstand the problem (communication and analysis). (communication and analysis). Plan a solutionPlan a solution (modeling and software design). (modeling and software design). Carry out the planCarry out the plan (code generation). (code generation). Examine the result for accuracyExamine the result for accuracy (testing and quality (testing and quality

assurance).assurance).

At its core, good practice is At its core, good practice is common-sense common-sense problem solvingproblem solving

4

The Essence: Understand the The Essence: Understand the problemproblem

Who has a stake in the solution to the problems?Who has a stake in the solution to the problems? stakeholdersstakeholders

What are the unknown? What are the unknown? requirementsrequirements

Can the problem be compartmentalized? Can the problem be compartmentalized? smaller, easier-to-understand subsystemssmaller, easier-to-understand subsystems

Can the problem be represented graphically? Can the problem be represented graphically? Can an analysis model be created?Can an analysis model be created?

5

The Essence: Plan an solutionThe Essence: Plan an solution

Have you seen similar problems before?Have you seen similar problems before? Are there design patterns as a potential solution?Are there design patterns as a potential solution? is there existing software that implements the functions?is there existing software that implements the functions?

Has a similar problem solved? Has a similar problem solved? If so, are elements of the solution reusable?If so, are elements of the solution reusable?

Can subproblems be defined? Can subproblems be defined? If so, are solutions readily apparent for the subproblems?If so, are solutions readily apparent for the subproblems?

Can you represent a solution in a manner that Can you represent a solution in a manner that leads to effective implementation? leads to effective implementation? Design model?Design model?

6

The Essence: Carry out the The Essence: Carry out the planplan

Does the solution confirm the plan?Does the solution confirm the plan? Is the source code traceable to the design model?Is the source code traceable to the design model?

Is each component of the solution correct?Is each component of the solution correct? Has the design and code been reviewed?Has the design and code been reviewed?

7

The Essence: Examine the The Essence: Examine the resultresult

Is it possible to test each component of the Is it possible to test each component of the solution?solution? Has a reasonable testing strategy been implemented?Has a reasonable testing strategy been implemented?

Does the solution produce results that conform Does the solution produce results that conform to the data, functions, features and behavior that to the data, functions, features and behavior that are required?are required? Has the software been validated against all stakeholder Has the software been validated against all stakeholder

requirements?requirements?

8

Core Software Engineering Core Software Engineering PrinciplesPrinciples

Provide value to the customer and the userProvide value to the customer and the user KIS—keep it simple!KIS—keep it simple! Maintain the product and project “vision”Maintain the product and project “vision” What you produce, others will consumeWhat you produce, others will consume Be open to the futureBe open to the future Plan ahead for reusePlan ahead for reuse Think!Think!

9

Software Engineering Software Engineering PracticesPractices

Consider the generic process Consider the generic process frameworkframework CommunicationCommunication PlanningPlanning ModelingModeling ConstructionConstruction DeploymentDeployment

Here, we’ll identifyHere, we’ll identify Underlying principlesUnderlying principles How to initiate the practiceHow to initiate the practice An abbreviated task setAn abbreviated task set

10

Communication PracticesCommunication Practices PrinciplesPrinciples

ListenListen Prepare before you communicatePrepare before you communicate Facilitate the communicationFacilitate the communication Face-to-face is bestFace-to-face is best Take notes and document decisionsTake notes and document decisions Collaborate with the customerCollaborate with the customer Stay focusedStay focused Draw pictures when things are unclearDraw pictures when things are unclear Move on …Move on … Negotiation works best when both parties Negotiation works best when both parties

win.win.

11

Communication PracticesCommunication Practices InitiationInitiation

The parties should be physically close to one anotherThe parties should be physically close to one another Make sure communication is interactiveMake sure communication is interactive Create solid team “ecosystems”Create solid team “ecosystems” Use the right team structureUse the right team structure

An abbreviated task setAn abbreviated task set Identify who it is you need to speak withIdentify who it is you need to speak with Define the best mechanism for communicationDefine the best mechanism for communication Establish overall goals and objectives and define the Establish overall goals and objectives and define the

scopescope Get more detailedGet more detailed

Have stakeholders define scenarios for usageHave stakeholders define scenarios for usage Extract major functions/featuresExtract major functions/features

Review the results with all stakeholdersReview the results with all stakeholders

12

Planning PracticesPlanning Practices PrinciplesPrinciples

Understand the project scopeUnderstand the project scope Involve the customer (and other stakeholders)Involve the customer (and other stakeholders) Recognize that planning is iterativeRecognize that planning is iterative Estimate based on what you knowEstimate based on what you know Consider riskConsider risk Be realisticBe realistic Adjust granularity as you planAdjust granularity as you plan Define how quality will be achievedDefine how quality will be achieved Define how you’ll accommodate changesDefine how you’ll accommodate changes Track what you’ve plannedTrack what you’ve planned

13

Planning PracticesPlanning Practices

InitiationInitiation Ask Boehm’s questionsAsk Boehm’s questions

Why is the system begin developed?Why is the system begin developed? What will be done?What will be done? When will it be accomplished?When will it be accomplished? Who is responsible?Who is responsible? Where are they located (organizationally)?Where are they located (organizationally)? How will the job be done technically and managerially?How will the job be done technically and managerially? How much of each resource is needed?How much of each resource is needed?

14

Planning PracticesPlanning Practices An abbreviated task setAn abbreviated task set

Re-assess project scopeRe-assess project scope Assess risksAssess risks Evaluate functions/featuresEvaluate functions/features Consider infrastructure functions/featuresConsider infrastructure functions/features Create a coarse granularity planCreate a coarse granularity plan

Number of software incrementsNumber of software increments Overall scheduleOverall schedule Delivery dates for incrementsDelivery dates for increments

Create fine granularity plan for first Create fine granularity plan for first incrementincrement

Track progressTrack progress

15

Modeling PracticesModeling Practices

We create models to gain a better understanding We create models to gain a better understanding of the actual entity to be builtof the actual entity to be built

Analysis modelsAnalysis models represent the customer represent the customer requirements by depicting the software in three requirements by depicting the software in three different domains: the information domain, the different domains: the information domain, the functional domain, and the behavioral domain. functional domain, and the behavioral domain.

Design modelsDesign models represent characteristics of the represent characteristics of the software that help practitioners to construct it software that help practitioners to construct it effectively: the architecture, the user interface, effectively: the architecture, the user interface, and component-level detail.and component-level detail.

16

Analysis Modeling PracticesAnalysis Modeling Practices

Analysis modeling principlesAnalysis modeling principles Represent the information domainRepresent the information domain Represent software functionsRepresent software functions Represent software behaviorRepresent software behavior Partition these representationsPartition these representations Move from essence toward implementationMove from essence toward implementation

Elements of the analysis model Elements of the analysis model (Chapter 8)(Chapter 8) Data modelData model Flow modelFlow model Class modelClass model Behavior modelBehavior model

17

Design Modeling PracticesDesign Modeling Practices PrinciplesPrinciples

Design must be traceable to the analysis modelDesign must be traceable to the analysis model Always consider architectureAlways consider architecture Focus on the design of dataFocus on the design of data Interfaces (both user and internal) must be designedInterfaces (both user and internal) must be designed Components should exhibit functional independenceComponents should exhibit functional independence Components should be loosely coupledComponents should be loosely coupled Design representation should be easily understoodDesign representation should be easily understood The design model should be developed iterativelyThe design model should be developed iteratively

Elements of the design modelElements of the design model Data designData design Architectural designArchitectural design Component designComponent design Interface designInterface design

18

Construction PracticesConstruction Practices

Preparation principles:Preparation principles: Before you write one line Before you write one line of code, be sure you:of code, be sure you:

Understand of the problem you’re trying to solve Understand of the problem you’re trying to solve (see (see communicationcommunication and and modelingmodeling))

Understand basic design principles and concepts.Understand basic design principles and concepts. Pick a programming language that meets the needs Pick a programming language that meets the needs

of the software to be built and the environment in of the software to be built and the environment in which it will operate.which it will operate.

Select a programming environment that provides Select a programming environment that provides tools that will make your work easier.tools that will make your work easier.

Create a set of unit tests that will be applied once Create a set of unit tests that will be applied once the component you code is completedthe component you code is completed.

19

Construction PracticesConstruction Practices

Coding principles: Coding principles: As you begin writing code, be sure you:As you begin writing code, be sure you: Constrain your algorithms by following structured Constrain your algorithms by following structured

programming [BOH00] practice.programming [BOH00] practice. Select data structures that will meet the needs of the design.Select data structures that will meet the needs of the design. Understand the software architecture and create interfaces Understand the software architecture and create interfaces

that are consistent with it.that are consistent with it. Keep conditional logic as simple as possible.Keep conditional logic as simple as possible. Create nested loops in a way that makes them easily testable.Create nested loops in a way that makes them easily testable. Select meaningful variable names and follow other local Select meaningful variable names and follow other local

coding standards.coding standards. Write code that is self-documenting.Write code that is self-documenting. Create a visual layout (e.g., indentation and blank lines) that Create a visual layout (e.g., indentation and blank lines) that

aids understanding.aids understanding.

20

Construction PracticesConstruction Practices

Validation Principles: Validation Principles: After you’ve completed After you’ve completed your first coding pass, be sure you:your first coding pass, be sure you:

Conduct a code walkthrough when appropriate.Conduct a code walkthrough when appropriate. Perform unit tests and correct errors you’ve Perform unit tests and correct errors you’ve

uncovered.uncovered. Refactor the code. Refactor the code.

21

Construction PracticesConstruction Practices

Testing PrinciplesTesting Principles All tests should be traceable to requirementsAll tests should be traceable to requirements Tests should be plannedTests should be planned The Pareto Principle applies to testingThe Pareto Principle applies to testing Testing begins “in the small” and moves Testing begins “in the small” and moves

toward “in the large”toward “in the large” Exhaustive testing is not possibleExhaustive testing is not possible

22

Deployment PracticesDeployment Practices

PrinciplesPrinciples Manage customer expectations for each incrementManage customer expectations for each increment A complete delivery package should be assembled and A complete delivery package should be assembled and

testedtested A support regime should be establishedA support regime should be established Instructional materials must be provided to end-usersInstructional materials must be provided to end-users Buggy software should be fixed first, delivered laterBuggy software should be fixed first, delivered later