38
1 1 CSC 330 OO Software Design CSC 330 OO Software Design Discipline of Software Design Discipline of Software Design

CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

11

CSC 330 OO Software DesignCSC 330 OO Software Design

Discipline of Software DesignDiscipline of Software Design

Page 2: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

22

ObjectivesObjectivesTo explain what design is and how various To explain what design is and how various types of design deal with different aspects types of design deal with different aspects of a productof a productTo present design as problem solving and To present design as problem solving and outline the roles of abstraction and outline the roles of abstraction and modeling in designmodeling in designTo place design in the software life cycleTo place design in the software life cycleTo survey software engineering design To survey software engineering design methodsmethods

Page 3: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

33

TopicsTopics

Software products and software Software products and software designdesignAbstraction and modelingAbstraction and modelingVarieties of designVarieties of designSoftware design in the life cycleSoftware design in the life cycleSoftware engineering design Software engineering design methodsmethods

Page 4: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

44

Importance of Software DesignImportance of Software Design

We live in a designed world.We live in a designed world.Design is economically important and Design is economically important and effects our quality of life.effects our quality of life.The quality of software design has The quality of software design has important consequences that software important consequences that software designers should be aware of and take designers should be aware of and take seriously.seriously.

Page 5: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

55

Software ProductsSoftware Products

A software product is an entity comprised of one or more programs, data, and supporting materials and services that satisfies client needs and desires either as

an independent artifact or as essential ingredient in some other artifact.

A software product is an entity comprised of one or more programs, data, and supporting materials and services that satisfies client needs and desires either as

an independent artifact or as essential ingredient in some other artifact.

Page 6: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

66

Software Design DefinedSoftware Design Defined

Software designers do what designers Software designers do what designers in other disciplines do, except they do it in other disciplines do, except they do it for software products.for software products.

Software design is the activity of specifying the mature and composition of software products that satisfy client needs

and desire, subject to constraints.

Software design is the activity of specifying the mature and composition of software products that satisfy client needs

and desire, subject to constraints.

Page 7: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

77

Design as Problem SolvingDesign as Problem Solving

An especially fruitful way to think about An especially fruitful way to think about design is as problem solving.design is as problem solving.AdvantagesAdvantages

Suggests partitioning information between Suggests partitioning information between problem and solutionproblem and solutionEmphasizes that there may be more than Emphasizes that there may be more than one good solution (design)one good solution (design)Suggests techniques such as changing the Suggests techniques such as changing the problem, trial and error, brainstorming, etc.problem, trial and error, brainstorming, etc.

Page 8: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

88

AbstractionAbstraction

Abstraction is an important problemAbstraction is an important problem--solving technique, especially in software solving technique, especially in software design.design.

Abstraction is suppressing or ignoring some properties of objects, events, or

situations in favor of others.

Abstraction is suppressing or ignoring some properties of objects, events, or

situations in favor of others.

Page 9: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

99

Importance of AbstractionImportance of Abstraction

Problem simplificationProblem simplificationAbstracting allows us to focus on the most Abstracting allows us to focus on the most important aspects of a problem in (partially) important aspects of a problem in (partially) solving it.solving it.

Structuring problem solvingStructuring problem solvingTopTop--down strategydown strategy: Solve an abstract version of : Solve an abstract version of the problem, then add details (the problem, then add details (refinementrefinement))BottomBottom--up strategyup strategy: Solve parts of a problem and : Solve parts of a problem and connect them for a complete solutionconnect them for a complete solution

Page 10: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1010

ModelingModeling

A model represents a target by having model A model represents a target by having model parts corresponding to target parts, with parts corresponding to target parts, with relationships between model parts relationships between model parts corresponding to relationships between target corresponding to relationships between target parts.parts.

Page 11: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1111

Modeling in DesignModeling in DesignModeling is used for the following purposes:Modeling is used for the following purposes:

Problem understandingProblem understandingDesign creationDesign creationDesign investigationDesign investigationDocumentationDocumentation

Modeling work because models abstract Modeling work because models abstract details of the target.details of the target.Models can fail if important and relevant Models can fail if important and relevant details are left out.details are left out.

Page 12: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1212

Static and Dynamic ModelsStatic and Dynamic Models

Static model examples include class and Static model examples include class and object models.object models.Dynamic model examples include state Dynamic model examples include state diagrams and sequence diagrams.diagrams and sequence diagrams.

A static model represents aspects of programs that do not change during program execution.

A dynamic model represents what happens during program execution.

A static model represents aspects of programs that do not change during program execution.

A dynamic model represents what happens during program execution.

Page 13: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1313

Product vs. Engineering DesignProduct vs. Engineering DesignProduct designersProduct designers are concerned with styling are concerned with styling and aesthetics, function and usability, and aesthetics, function and usability, manufacturability and manageability.manufacturability and manageability.

Industrial designers, (building) architects, interior Industrial designers, (building) architects, interior designers, graphic designers, etc.designers, graphic designers, etc.

Engineering designersEngineering designers are concerned with are concerned with technical mechanisms and workings.technical mechanisms and workings.

Structural, mechanical, chemical, and electrical Structural, mechanical, chemical, and electrical engineersengineers

Design teams often include both product and Design teams often include both product and engineering designers.engineering designers.

Page 14: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1414

Software Product DesignSoftware Product Design

Requires skills in user interface and Requires skills in user interface and interaction design, communications, interaction design, communications, industrial design, and marketingindustrial design, and marketing

Software product design is the activity of specifying software product features, capabilities, and interfaces to

satisfy client needs and desires.

Software product design is the activity of specifying software product features, capabilities, and interfaces to

satisfy client needs and desires.

Page 15: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1515

Software Engineering DesignSoftware Engineering Design

Requires skills in programming, algorithms, Requires skills in programming, algorithms, data structures, software design principles, data structures, software design principles, practices, processes, techniques, practices, processes, techniques, architectures, and patternsarchitectures, and patterns

Software engineering design is the activity of specifying programs and sub-systems, and their constituent parts and workings, to meet software

product specifications.

Software engineering design is the activity of specifying programs and sub-systems, and their constituent parts and workings, to meet software

product specifications.

Page 16: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1616

Waterfall Life Cycle ModelWaterfall Life Cycle Model

The waterfall The waterfall model captures model captures the logical, but not the logical, but not the temporal, the temporal, relationships relationships between software between software development development activities.activities.

Page 17: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1717

Design Across the Life CycleDesign Across the Life Cycle

Engineering Design

Product Redesign andEngineering Redesign

Product DesignRequirements Specification

Design

Implementation

Testing

Maintenance

Software Product Life Cycle

Page 18: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1818

““WhatWhat”” Versus Versus ““HowHow””

Traditional way to make the distinction Traditional way to make the distinction between requirements and design activitiesbetween requirements and design activitiesNot adequate becauseNot adequate because

Many Many ““whatwhat”” specifications turn out to be design specifications turn out to be design decisionsdecisionsMany Many ““howhow”” specifications turn out to be client or specifications turn out to be client or customer needs or desirescustomer needs or desires

Distinguish requirements from design based Distinguish requirements from design based on problem solving: requirements activity on problem solving: requirements activity formulates a problem solved in designformulates a problem solved in design

Page 19: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

1919

Design Problems and SolutionsDesign Problems and Solutions

Page 20: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2020

Software Design MethodSoftware Design Method

A software design method is an orderly procedure for generating a precise and complete software design solution that meets clients needs and constraints.

A software design method is an orderly procedure for generating a precise and complete software design solution that meets clients needs and constraints.

Page 21: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2121

Design Method ComponentsDesign Method ComponentsDesign ProcessDesign Process——A collection of related tasks A collection of related tasks that transforms a set of inputs into a set of that transforms a set of inputs into a set of outputsoutputsDesign NotationsDesign Notations——A symbolic representational A symbolic representational systemsystemDesign HeuristicsDesign Heuristics——Rules providing guidance, Rules providing guidance, but no guarantee, for achieving some endbut no guarantee, for achieving some endDesign methods also use Design methods also use design principlesdesign principlesstating characteristics of design that make stating characteristics of design that make them better or worse.them better or worse.

Page 22: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2222

Design Method TimelineDesign Method Timeline19711971 NiklausNiklaus Wirth introduces stepwise Wirth introduces stepwise

refinement.refinement.19741974 Stevens, Myers, Constantine introduce Stevens, Myers, Constantine introduce

structured design.structured design.Late 1970s to early 1980s Structured analysis Late 1970s to early 1980s Structured analysis

and design methods are dominant.and design methods are dominant.Late 1980s ObjectLate 1980s Object--oriented analysis and design oriented analysis and design

methods rise to prominence.methods rise to prominence.19951995 UML 0.8 is released.UML 0.8 is released.20042004 UML 2.0 is released.UML 2.0 is released.

Page 23: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2323

Software Design Software Design Processes and Processes and ManagementManagement

Page 24: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2424

Analysis and ResolutionAnalysis and Resolution

Confusion arises around the term Confusion arises around the term designdesign..This confusion is removed by adopting This confusion is removed by adopting the following terminology.the following terminology.

Analysis is breaking down a design problem to understand it.

Resolution is solving a design problem.

Analysis is breaking down a design problem to understand it.

Resolution is solving a design problem.

Page 25: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2525

A ProblemA Problem--Solving ProcessSolving Process

1.1. Understand the problemUnderstand the problem2.2. Generate candidate solutionsGenerate candidate solutions3.3. Evaluate candidate solutionsEvaluate candidate solutions4.4. Select the best Select the best solution(ssolution(s))5.5. Iterate if no solution is adequateIterate if no solution is adequate6.6. Ensure the solution is complete and Ensure the solution is complete and

wellwell--documented, and deliver itdocumented, and deliver it

Page 26: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2626

A Generic Design ProcessA Generic Design Process

Page 27: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2727

A Design Resolution ProcessA Design Resolution Process

This diagram This diagram shows details shows details of the of the resolution resolution activity from the activity from the previous previous diagram.diagram.

Page 28: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2828

Design Process CharacteristicsDesign Process Characteristics

The best solutions are rarely the first The best solutions are rarely the first solutions designers think of.solutions designers think of.

Designers should generate many candidate Designers should generate many candidate solutionssolutions..

The design process is highly iterative.The design process is highly iterative.Designers must frequently reanalyze the Designers must frequently reanalyze the problem and must generate and improve problem and must generate and improve solutions many timessolutions many times..

Page 29: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

2929

Architectural and Detailed DesignArchitectural and Detailed Design

Architectural design is high-level software engineering design resolution.

Detailed design is low-level software engineering design resolution.

Architectural design is high-level software engineering design resolution.

Detailed design is low-level software engineering design resolution.

Page 30: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3030

Operations versus ProjectsOperations versus ProjectsOperationsOperations are standardized activities that are standardized activities that occur continuously or at regular intervals.occur continuously or at regular intervals.

PayrollPayrollHiring and performance evaluationHiring and performance evaluationShipping and receivingShipping and receiving

ProjectsProjects are oneare one--time efforts to achieve a time efforts to achieve a particular current goal.particular current goal.

Process improvementProcess improvementBusiness restructuringBusiness restructuringNew product introduction (including design)New product introduction (including design)

Page 31: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3131

Project Management ActivitiesProject Management ActivitiesPlanningPlanning——Formulating a scheme for doing a Formulating a scheme for doing a project.project.OrganizingOrganizing——Structuring the organizational entities Structuring the organizational entities involved in a project and assigning them authority involved in a project and assigning them authority and responsibilities.and responsibilities.StaffingStaffing——Filling the positions in an organizational Filling the positions in an organizational structure and keeping them filled.structure and keeping them filled.TrackingTracking——Observing the progress of work and Observing the progress of work and adjusting work and plans accordingly.adjusting work and plans accordingly.LeadingLeading——Directing and supporting people doing Directing and supporting people doing project work.project work.

Page 32: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3232

Project PlanningProject PlanningEstimationEstimation is calculation of the approximate cost, is calculation of the approximate cost, effort, time or resources required to achieve some effort, time or resources required to achieve some end.end.A A scheduleschedule specifies the start and duration of work specifies the start and duration of work tasks.tasks.Tasks are allocated resources based on the Tasks are allocated resources based on the schedule and estimates.schedule and estimates.Risk analysisRisk analysis is an orderly process of identifying, is an orderly process of identifying, understanding, and assessing understanding, and assessing risksrisks (any (any occurrence with negative consequences).occurrence with negative consequences).Policies, procedures, tools, and techniques are Policies, procedures, tools, and techniques are specified to govern work.specified to govern work.

Page 33: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3333

Project Organization and StaffingProject Organization and StaffingOrganizational structuresOrganizational structures

Project organizationProject organizationFunctional organizationFunctional organizationMatrix organizationMatrix organization

Team structuresTeam structuresHierarchical teamsHierarchical teamsDemocratic teamsDemocratic teams

StaffingStaffingOften the single most important Often the single most important factor in success is having good factor in success is having good people to do the work.people to do the work.

Page 34: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3434

Project TrackingProject TrackingProjects may not go as planned for many Projects may not go as planned for many reasons.reasons.

Resource consumption is not as expected.Resource consumption is not as expected.Tasks do not take as long as expected.Tasks do not take as long as expected.Policies, procedures, tools, or techniques Policies, procedures, tools, or techniques cause problems.cause problems.Something bad occurs (illness, budget cuts, Something bad occurs (illness, budget cuts, equipment failures, etc.equipment failures, etc.

When plans fail they must be adjusted.When plans fail they must be adjusted.

Page 35: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3535

Leading a ProjectLeading a Project

Direction is needed to follow plans, Direction is needed to follow plans, use resources efficiently, etc.use resources efficiently, etc.Directing people is not enoughDirecting people is not enough——people need inspiration, help, a people need inspiration, help, a congenial work environment, congenial work environment, emotional support, etc.emotional support, etc.

Page 36: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3636

Iterative Planning and TrackingIterative Planning and TrackingGood planning requires knowledge of Good planning requires knowledge of tasks and their costs, risks, and other tasks and their costs, risks, and other details not known until the project is details not known until the project is under wayunder way——but this is not known when but this is not known when plans are made.plans are made.Iterative planning and trackingIterative planning and tracking is making a is making a rough base or initial project plan, and rough base or initial project plan, and refining it at fixed periods during a refining it at fixed periods during a project in light of tracking data and project in light of tracking data and completed work products.completed work products.

Page 37: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3737

Design Project ManagementDesign Project ManagementAll five project a management activities All five project a management activities are needed to manage a design project.are needed to manage a design project.Iterative planning and tracking is the best Iterative planning and tracking is the best approach to planning and tracking.approach to planning and tracking.The design project decomposition on the The design project decomposition on the next slide is useful for planning, next slide is useful for planning, organization, staffing, and tracking.organization, staffing, and tracking.Design constitutes the largest activity in Design constitutes the largest activity in software development, so design can drive software development, so design can drive an entire development project.an entire development project.

Page 38: CSC 330 OO Software Design Discipline of Software Designnatacha/TeachFall_2009/CSC330/SoftwareDe… · CSC 330 OO Software Design Discipline of Software Design. 2 Objectives ... To

3838

Design Project DecompositionDesign Project Decomposition

Detailed design modelsDetailed design modelsDetailed design Detailed design specispecifificationscationsDetailed design prototypesDetailed design prototypes

Resolution:Resolution:Detailed DesignDetailed Design

Architectural design modelsArchitectural design modelsArchitectural design Architectural design specispecifificationscationsArchitectural prototypesArchitectural prototypes

Resolution: Resolution: Architectural Architectural DesignDesign

Models (of the engineering problem)Models (of the engineering problem)Prototypes (exploring the problem)Prototypes (exploring the problem)AnalysisAnalysis

EngineerinEngineering Designg Design

Requirements Requirements specispecifificationscationsModels (of the product)Models (of the product)Prototypes (demonstrating the product)Prototypes (demonstrating the product)

Resolution:Resolution:Product Product SpeciSpecifificationcation

Client surveys, questionnaires, interview transcripts, Client surveys, questionnaires, interview transcripts, etc.etc.Problem domain descriptionProblem domain descriptionLists of needs, stakeholdersLists of needs, stakeholdersModels (of the problem)Models (of the problem)Prototypes (exploring needs)Prototypes (exploring needs)

Analysis:Analysis:Detailed NeedsDetailed Needs

Statement of interested parties, product concept, Statement of interested parties, product concept, project scope, markets, business goalsproject scope, markets, business goalsModels (of the problem)Models (of the problem)Prototypes (exploring the problem)Prototypes (exploring the problem)

Analysis:Analysis:Design ProblemDesign Problem

Product Product DesignDesign

Typical Work ProductsTypical Work ProductsWork PhaseWork Phase