Composite and Related Patterns Kirk Scott. The pitohui, a poisonous bird of New Guinea.

Slides:



Advertisements
Similar presentations
COURSE: COMPUTER PLATFORMS
Advertisements

Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Matt Klein 7/2/2009.  Intent  Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.
More Interfaces, Dynamic Binding, and Polymorphism Kirk Scott.
Fall 2009ACS-3913 Ron McFadyen Composite Pattern Problem: How do we treat a composition structure of objects the same way as a non-composite object? Arises.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Design of Web-based Systems IS Development: lecture 10.
Software Design & Documentation – Design Pattern: Command Design Pattern: Command Christopher Lacey September 15, 2003.
Software Design and Documentation Individual Presentation: Composite Pattern 9/11/03.
The Composite Pattern.. Composite Pattern Intent –Compose objects into tree structures to represent part-whole hierarchies. –Composite lets clients treat.
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
UML CLASS DIAGRAMS. Basics of UML Class Diagrams What is a UML class diagram? Imagine you were given the task of drawing a family tree. The steps you.
1 PH Chapter 1 (pp. 1-10) GoF Composite Pattern (pp ) PH Ch 2 through Fundamentals (pp ) Presentation by Julie Betlach 5/28/2009.
Composite Design Pattern. Motivation – Dynamic Structure.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
Unit 2 Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet,
05 - Patterns Intro.CSC4071 Design Patterns Designing good and reusable OO software is hard. –Mix of specific + general –Impossible to get it right the.
Unit 25 Composite Summary prepared by Kirk Scott 1.
Design Patterns in Java Part IV Operation Patterns Chapter 20 Introducing Operations Summary prepared by Kirk Scott 1.
Design Patterns in Java Chapter 1 Introduction Summary prepared by Kirk Scott 1.
Unit 7 Generic Interfaces and Encapsulation, a Class in the Middle Kirk Scott.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Unit 15 Java Interfaces: Using an Interface to Accomplish a Specific Goal Kirk Scott.
Chapter 7 System models.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Design Patterns CSCI 5801: Software Engineering. Design Patterns.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
18 April 2005CSci 210 Spring Design Patterns 1 CSci 210.
Design Patterns CS 124 Reference: Gamma et al (“Gang-of-4”), Design Patterns.
Construction and Cloning Kirk Scott. Adonis From Wikipedia, the free encyclopedia Jump to: navigation, searchnavigationsearch For the Syrian poet, see.
ECE450S – Software Engineering II
INFORMATION SYSTEM-SOFTWARE Topic: OPERATING SYSTEM CONCEPTS.
Génie logiciel Software Engineering Summary C. Petitpierre.
Section 3.4 The Chain Rule. Consider the function –We can “decompose” this function into two functions we know how to take the derivative of –For example.
In this section, we will investigate how to take the derivative of a function that is the composition of multiple functions.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns VIII Chain of Responsibility, Strategy, State.
DESIGN PATTERNS -BEHAVIORAL PATTERNS WATTANAPON G SUTTAPAK Software Engineering, School of Information Communication Technology, University of PHAYAO 1.
Exploring Microsoft Access Chapter 7 Building Applications: The Switchboard, Macros, and Prototyping.
Behavioral Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 OO Analysis & Design - Introduction to main ideas in OO Analysis & design - Practical experience in applying ideas -A large element is use of UML as.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
CS212: Object Oriented Analysis and Design Lecture 39: Design Pattern-III.
Interface Patterns. Adapter Provides the interface a client expects, using the services of a class with a different interface Note Avoid using object.
SwE 455 Tutorial. What is Evolve? Evolve is a tool for defining components and connecting them together to form new components. Also provides a runtime.
Design Patterns. Outline Purpose Purpose Useful Definitions Useful Definitions Pattern Overview Pattern Overview.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
COMPOSITE PATTERN NOTES. The Composite pattern l Intent Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients.
Computer Science 313 – Advanced Programming Topics.
Overview of Behavioral Patterns ©SoftMoore ConsultingSlide 1.
CLASSIFICATION OF DESIGN PATTERNS Hladchuk Maksym.
Design Patterns CSCE 315 – Programming Studio Spring 2013.
Section 6.2 Molar Mass and Percent Composition 1.To understand the definition of molar mass 2.To learn to convert between moles and mass 3.To learn to.
Generic Interfaces and Encapsulation, a Class in the Middle
Chapter 10 Design Patterns.
Unit 11 Generic Interfaces and Encapsulation, Continued
Unified Modeling Language
Behavioral Design Patterns
More Interfaces, Dynamic Binding, and Polymorphism
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Java Interfaces: Using an Interface to Accomplish a Specific Goal
Composite Pattern Oct 7, 2003 A composite is a group of objects in which some objects contain others; one object may represent groups, and another.
Jim Fawcett CSE776 – Design Patterns Summer 2003
Behavioral Patterns Part-I introduction UNIT-VI
Design and Implementation
An Introduction to Software Architecture
Chapter 15 Section 1.
Software Design Lecture : 36.
Presentation transcript:

Composite and Related Patterns Kirk Scott

The pitohui, a poisonous bird of New Guinea

This is an introductory unit. These are the units/chapters belonging to this section of the course: Unit 25, Composite, book chapter 5 Unit 26, Chain of Responsibility, book chapter 12 Unit 27, Interpreter, book chapter 25 Unit 28, Visitor, book chapter 29

What will be given next is an extremely brief overview of these topics. You will find that the composite design pattern has a lot in common with trees Chain of responsibility, interpreter, and visitor all follow naturally, because interesting examples of those patterns can be built on top of composites/trees

Composite Book definition: The intent of the Composite pattern is to let clients treat individual objects and compositions of objects uniformly Comment mode on: A composite can consist of one or more components Each component may be a single item or another composite

In the verbal description above you may recognize the elements of a definition of a tree-like structure It is reminiscent of directory structures which can contain individual files as well as other directories This pattern has a distinctive UML diagram. See the next overhead

Chain of Responsibility Book definition: The intent of the Chain of Responsibility pattern is to avoid coupling the sender of a request to its receiver, by giving more than one object a chance to handle the request. Comment mode on: If a set of objects is linked together, you may call a method on one. Potentially that one calls a method on the next in the chain, and so on down the line

Interpreter Book definition: The intent of the Interpreter pattern is to let you compose executable objects according to a set of composition rules that you define. Comment mode on: This directly parallels composite Interpreters interpret commands Commands can consist of single commands or collections (composites) of commands

Visitor Book definition: The intent of Visitor is to let you define a new operation for a hierarchy without changing the hierarchy classes. Comment mode on: The relationship with composite is that the hierarchy you define the operation for may be the component/leaf/composite hierarchy which generates a tree

In Summary and Mnemonic Devices: Composite: = Tree Chain of Responsibility: Think “Tree of Responsibility” Interpreter: Remember the analogy between directory structures and program structures (routines and subroutines) Visitor: Visiting the branches and leaves of trees…

The End