


















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
introduction to Object oriented analysis and design
Typology: Exercises
1 / 90
This page cannot be seen from the preview
Don't miss anything!



















































































1
Based on material produced by John Vlissides
4
Fine for specification, documentation
At least as important as syntax
Most powerful reuse is design reuse Match problem to design experience
Part I: Motivation & Concept (cont’d)
abstraction flexibility modularity elegance
Part I: Motivation & Concept (cont’d)
Language- & implementation-independent A “micro-architecture” Adjunct to existing methodologies (RUP, Fusion, SCRUM, etc.)
Part I: Motivation & Concept (cont’d)
Part I: Motivation & Concept (cont’d)
Scope : domain over which a pattern applies Purpose : reflects what a pattern does
Part I: Motivation & Concept (cont’d)
Design Pattern Template (1st half)
NAME scope purpose
Intent short description of the pattern & its purpose Also Known As Any aliases this pattern is known by Motivation motivating scenario demonstrating pattern’s use Applicability circumstances in which pattern applies Structure graphical representation of the pattern using modified UML notation Participants participating classes and/or objects & their responsibilities
Part I: Motivation & Concept (cont’d)
Motivation & Concept (cont’d)
OBSERVER object behavioral
define a one-to-many dependency between objects so that when one object changes state, all dependents are notified & updated
an abstraction has two aspects, one dependent on the other a change to one object requires changing untold others an object should notify unknown other objects
16
Motivation & Concept (cont’d)
OBSERVER (cont’d) object behavioral
Consequences
Implementation subject-observer mapping dangling references update protocols: the push & pull models registering modifications of interest explicitly
Known Uses Smalltalk Model-View-Controller (MVC) InterViews (Subjects & Views, Observer/Observable) Andrew (Data Objects & Views) Pub/sub middleware (e.g., CORBA Notification Service, Java Messaging Service) Mailing lists
Part I: Motivation & Concept (cont’d)
19
7 Design Problems
Note that none of these patterns are restricted to document editors…
present document’s visual aspects drawing, hit detection, alignment support physical structure (e.g., lines, columns)
treat text & graphics uniformly no distinction between one & many