Presentation is loading. Please wait.

Presentation is loading. Please wait.

Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.

Similar presentations


Presentation on theme: "Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes."— Presentation transcript:

1 Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes

2 Introduction to Patterns Created: 19 August 2004. Revised: 13 April 2010

3 Concept of Design Pattern Arose originally in the field of (building) architecture in 1970’s – Christopher Alexander Imported into software architecture and design in late 1980s and 1990s 1

4 Pattern Describes a particular recurring design problem that arises in specific design contexts Presents a well-proven generic scheme for its solution   The solution scheme is specified by describing its constituent components, their responsibilities and relationships, and the ways in which they collaborate 1

5 Characteristics of Patterns Describe solutions to recurring problems that arise in specific design situations. Distilled from practical experience Describe a group of components (e.g., classes or objects), how the components interact, and the responsibilities of each component.  Higher level abstractions than classes or objects. Provide vocabulary for communication among designers  Choice of name for pattern is very important. 2

6 Characteristics of Patterns (cont.) Help document architectural vision of a design  If vision clearly understood, then less likely violated when system modified Provide conceptual skeleton for solution, encourage the construction of software with well- defined properties Are building blocks for construction of complex designs Help designers manage complexity of software 3

7 Descriptions of Patterns ContextProblemSolution 4

8 Descriptions of Patterns Context Describes situation in which design problem arises 5

9 Descriptions of Patterns Problem Describes problem that arises repeatedly in the context  aspects that must be considered when attempting a solution  set of forces -- aspects that must be considered when attempting a solution requirements the solution must satisfy  e.g., efficiency constraints that must be considered  e.g., use of a certain algorithm or protocol desirable properties of a solution  e.g., easy to modify 6

10 Descriptions of Patterns Solution Describes a proven solution to the problem Specifies a configuration of elements to balance the forces associated with the problem  Describes static structure of the configuration, identifying components and connectors relationships among the components relationships among the components  Describes dynamic runtime behavior of the configuration, identifying control structure of components and connectors 7

11 Categories of Patterns Architectural patterns Design patterns Idioms Idioms 8

12 Categories of Patterns Architectural patterns “ An architectural pattern expresses a fundamental structural organization schema for software systems. It provides a set of predefined subsystems, specifies their responsibilities, and includes rules and guidelines for organizing the relationships between them ” “ An architectural pattern expresses a fundamental structural organization schema for software systems. It provides a set of predefined subsystems, specifies their responsibilities, and includes rules and guidelines for organizing the relationships between them ” High-level abstraction Fundamental design decision in development of a software system Independent of the implementation language Example: Pipes and Filters pattern 9

13 Categories of Patterns Design patterns “A design pattern provides a scheme for refining the subsystems or components of a software system, or the relationships between them. It describes a commonly- recurring structure of communicating components that solves a general design problem within a particular context.” “A design pattern provides a scheme for refining the subsystems or components of a software system, or the relationships between them. It describes a commonly- recurring structure of communicating components that solves a general design problem within a particular context.” Mid-level abstraction Affects the structure of a subsystem Independent of the implementation language Examples:   Adapter (or Wrapper) pattern   Iterator pattern   Strategy (or Policy) pattern 10

14 Categories of Patterns Idioms “An idiom is a low-level pattern specific to a programming language. An idiom describes how to implement particular aspects of components or the relationships between them using the features of the given language” “An idiom is a low-level pattern specific to a programming language. An idiom describes how to implement particular aspects of components or the relationships between them using the features of the given language” Low-level abstraction Language-specificExamples:   Language-specific iterator defined to implement interface Iterator in Java   Counted Pointer for storage management of shared objects in C++ 11

15 References Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal. Pattern-Oriented Software Architecture: A System of Patterns, Wiley, 1996. Mary Shaw and David Garlan. Software Architecture: Perspectives on an Emerging Discipline, Prentice-Hall, 1996. 12

16 Acknowledgement 13 This work was supported by a grant from Acxiom Corporation titled “The Acxiom Laboratory for Software Architecture and Component Engineering (ALSACE).” This work was supported by a grant from Acxiom Corporation titled “The Acxiom Laboratory for Software Architecture and Component Engineering (ALSACE).”


Download ppt "Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes."

Similar presentations


Ads by Google