DOC PREVIEW
MSU CSE 870 - 08-design-patterns-notes

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE870: ChengCSE870: Advanced Software Engineering(Cheng) 1CSE870: Advanced Software Engineering (Design Patterns): ChengRRRDesign PatternsCSE870: Advanced Software Engineering (Design Patterns): ChengRRRAcknowledgementsMaterials based on a number of sources– D. Levine and D. Schmidt– R. Helm– Gamma et al– S. KonradCSE870: Advanced Software Engineering (Design Patterns): ChengRRRMotivation• Developing software is hard• Designing reusable software is morechallenging– finding good objects and abstractions– flexibility, modularity, elegance reuse– takes time for them to emerge, trial anderror• Successful designs do exist– exhibit recurring class and object structuresCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 2CSE870: Advanced Software Engineering (Design Patterns): ChengRRRDesign Pattern• Describes recurring design structure– names, abstracts from concrete designs– identifies classes, collaborations,responsibilities– applicability, trade-offs, consequencesCSE870: Advanced Software Engineering (Design Patterns): ChengRRRBecoming a Chess Master•First learn rules and physical requirements– e.g., names of pieces, legal movements, chessboard geometry and orientation, etc.•Then learn principles– e.g, relative value of certain pieces, strategic valueof center squares, power of a threat, etc.•To become a Master of chess, one muststudy the games of other masters– These games contain patterns that must beunderstood, memorized, and applied repeatedly.• There are hundreds of these patternsCSE870: Advanced Software Engineering (Design Patterns): ChengRRRBecoming a Software Design Master•First learn rules– e.g., algorithms, data structures, and languages ofsoftware.•Then learn principles– e.g., structured programming, modularprogramming, object-oriented programming, etc.•To become a Master of SW design, one muststudy the designs of other masters– These designs contain patterns that must beunderstood, memorized, and applied repeatedly.• There are hundreds of these patternsCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 3CSE870: Advanced Software Engineering (Design Patterns): ChengRRRDesign Patterns• Design patterns represent solutions to problems thatarise when developing software within a particularcontext– “Patterns == problem/solution pairs in a context”• Patterns capture the static and dynamic structure andcollaboration among key participants in softwaredesigns– Especially good for describing how and why to resolve non-functional issues• Patterns facilitate reuse of successful softwarearchitectures and designs.CSE870: Advanced Software Engineering (Design Patterns): ChengRRRDesign Patterns: Applications• Wide variety of application domains:– drawing editors, banking, CAD, CAE,cellular network management, telecommswitches, program visualization• Wide variety of technical areas:– user interface, communications, persistentobjects, O/S kernels, distributed systemsCSE870: Advanced Software Engineering (Design Patterns): ChengRRR“Each pattern describes a problem which occurs over and overagain in our environment and then describes the core of thesolution to that problem, in such a way that you can use thissolution a million times over, without ever doing it in the sameway twice”Christopher Alexander, A Pattern Language, 1977What Is a Design Pattern (1)Context: City Planning and Building architecturesCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 4CSE870: Advanced Software Engineering (Design Patterns): ChengRRRA pattern has 4 essential elements:• Pattern name• Problem• Solution• ConsequencesWhat Is a Design Pattern (2)CSE870: Advanced Software Engineering (Design Patterns): ChengRRR• A handle used to describe:• a design problem,• its solutions and• its consequences• Increases design vocabulary• Makes it possible to design at a higher level of abstraction• Enhances communicationBut finding a good name is often difficultPattern NameCSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Describes when to apply the pattern• Explains the problem and its context• Might describe specific design problems or classor object structures• May contain a list of conditions• must be met• before it makes sense to apply the patternProblemCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 5CSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Describes the elements that make up the• design,• their relationships,• responsibilities and• collaborations•Does not describe specific concrete implementation• Abstract description of design problems and• how the pattern solves itSolutionCSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Results and trade-offs of applying the pattern• Critical for:• evaluate design alternatives and• understand costs and• understand benefits of applying the pattern• Includes the impacts of a pattern on a system!s:• flexibility,• extensibility• portabilityConsequencesCSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Designs that can be encoded in classes andreused as is• (i.e. linked lists, hash tables)• Complex domain-specific designs (for an entire application or subsystem)They are:“Descriptions of communicating objects and classesthat are customized to solve a general designproblem in a particular context.”Design Patterns Are NOTCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 6CSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Object-Oriented Programming Languages:• more amenable to implementing designpatterns• Procedural languages: need to define• Inheritance,• Polymorphism and• EncapsulationWhere Design PatternsAre UsedCSE870: Advanced Software Engineering (Design Patterns): ChengRRR• Graphical notation is not sufficient• In order to reuse design decisions,• alternatives and trade-offs that led to thedecisions are important• Concrete examples are also importantHow to Describe Design PatternsCSE870: Advanced Software Engineering (Design Patterns): ChengRRRA Design Pattern• Describes a recurring design structure– names, abstracts from concrete designs– identifies classes, collaborations,responsibilities– applicability, trade-offs, consequencesCSE870: ChengCSE870: Advanced Software Engineering(Cheng) 7CSE870: Advanced Software Engineering (Design Patterns):


View Full Document

MSU CSE 870 - 08-design-patterns-notes

Documents in this Course
HW2

HW2

3 pages

splc1

splc1

21 pages

Lessons

Lessons

3 pages

revision

revision

13 pages

ft1

ft1

12 pages

john.dsn

john.dsn

21 pages

Survey

Survey

2 pages

revision

revision

38 pages

Load more
Download 08-design-patterns-notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view 08-design-patterns-notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view 08-design-patterns-notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?