210 likes | 336 Vues
This document provides an in-depth review and summary of essential design patterns used in software engineering, focusing on both behavioral and structural patterns. Key patterns discussed include the Command, Observer, Strategy, and Proxy patterns, along with practical examples for implementation. The material is tailored for students preparing for exams and includes design project topics relevant to the patterns. Additionally, insights into Java data structures and interface implementations relevant to common design patterns are provided to aid understanding and practical application.
E N D
CIS 644 Tues. Nov. 30, 1999 W15A … patterns
schedule: 30: patterns 2: review for exam 7: design proj 9: design proj email exam2
patterns: Coad … mostly PD patterns Gamma… mostly implementation patterns
Coad#1: collection - worker actually: worker - users - collection as: clerk - customers - videos
Coad#3: Participant- Transaction Coad#5: SpecificItem - Transaction as: Customer - Rental Video - Rental
and Coad#6: Transaction - TransLineItem as: Rental <>- RentalLineItem
Coad#7: Transaction - SubsequentTrans as: GrainReservation - TruckDelevery
Coad#14: Container - Contents as: Flight <>- Reservation
Coad#18: CompoundPart - Part same as: Composite - Component where: Component = PrimitiveComponent | Composite
Coad#20: Plan - Step (CIS project) as Budget <>- BudgetPeriod
Coad#26: Proxy - SpecificItem as : CachedItem - Item as: LocalItem - ServerItem as: EditPage - SourcePage
Coad#27: Publisher - Subscriber same as: Obervable - Observer as: PD_Item - Item_View
Java data structures: [Bailey1999] common "behavior" patterns: public interface Enumeration { boolean hasMoreElements(); Object nextElement(); } public interface Iterator extends Enumeration { … void reset(); Object value(); }
Java examples for three other "behavior" patterns: Terrazas ..visitor pattern Liu ........ command pattern Zhang ... state pattern
Coad chap 4: adaptor patterns: as: multiple adaptors multiple thread access
diagrams for other Gamma patterns: http: //ksi.cpsc.ucalgary.ca/~kremer/patterns/
Creational Patterns Abstract Factory Builder Factory Method Prototype x Singleton
Structural Patterns x Adapter Bridge x Composite Decorator Facade Flyweight x Proxy
Behavioural Patterns Chain of Responsibility x Command Interpreter x Iterator Mediator Memento x Observer x State Strategy Template Method x Visitor
reusable items: patterns: packages: interface, classes components: frameworks: software tools: