19
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1 Supplementary Slides for Supplementary Slides for Software Engineering: Software Engineering: A Practitioner's Approach, 6/e A Practitioner's Approach, 6/e Part 2 Part 2 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. This presentation, slides, or hardcopy may NOT be used for short courses, industry seminars, or consulting purposes.

Ch05.ppt

  • Upload
    cmc0912

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1

Supplementary Slides forSupplementary Slides forSoftware Engineering:Software Engineering:

A Practitioner's A Practitioner's Approach, 6/eApproach, 6/e

Part 2Part 2copyright © 1996, 2001, 2005R.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.

This presentation, slides, or hardcopy may NOT be used forshort courses, industry seminars, or consulting purposes.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2

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, 2005R.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.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3

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.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4

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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5

Core Software Engineering Core Software Engineering PrinciplesPrinciples

Provide value to the customer and the Provide value to the customer and the useruser

KIS—keep it simple!KIS—keep it simple! Maintain the product and project Maintain the product and project

“vision”“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!

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6

Software Engineering Software Engineering PracticesPractices

Consider the generic process frameworkConsider the generic process framework 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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7

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.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 8

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 scopeEstablish overall goals and objectives and define the scope 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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 9

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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10

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?

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11

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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 12

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.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 13

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 (Chapter 8)Elements of the analysis model (Chapter 8) Data modelData model Flow modelFlow model Class modelClass model Behavior modelBehavior model

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 14

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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 15

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 (see Understand of the problem you’re trying to solve (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 of the Pick a programming language that meets the needs of the

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

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

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

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16

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 programming [BOH00] Constrain your algorithms by following structured programming [BOH00] practice.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 that are Understand the software architecture and create interfaces that are

consistent with it.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 coding standards.Select meaningful variable names and follow other local 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 aids Create a visual layout (e.g., indentation and blank lines) that aids

understanding.understanding.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17

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 uncovered.Perform unit tests and correct errors you’ve uncovered. Refactor the code. Refactor the code.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18

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 toward “in the Testing begins “in the small” and moves toward “in the

large”large” Exhaustive testing is not possibleExhaustive testing is not possible

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19

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