{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

7 Patterns-442-12-by6

Aelementa aelementb visitelementaaelementa pattern

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: bservers for certain events only Use notion of an aspect in subject Observer registers for one or more aspects 8. Complex updates Use change managers Change manager keeps track of complex relations among (possibly) many subjects and their observers and encapsulates complex updates to observers 112 Pattern Go5 Patterns Observer pattern Implementation issues (cont d) 9. Trivial case: collapse subjects and observers into one class Smalltalk: Subject and observer protocol are both deGined in class Object (the root of the class hierarchy) Useful when objects must act as both subjects and observers, but multiple inheritance is not supported by a language The Gang of Five (Go5) Researchers and software engineers at the Siemens Corporation in Germany The Go5 book: Buschmann, Meunier, Rohnert, Sommerlad, Stal. Pattern- Oriented Software Architecture, Wiley, 1996 A different approach from the Go4: Emphasis on software architecture 113 114 Go5 Patterns Go5 Patterns Patterns according to the Go5 Software architecture = The deGinition of the high-level components and component interfaces in a software system Software architecture = high-level design? To date, many ADLs (architecture description languages) exist, which allow for the deGinition of component interfaces and component behavior Caveat: Go5 patterns are not necessarily object-oriented The Go5 s taxonomy A two-tiered organization, aimed at facilitating the search for an appropriate pattern First tier based on three levels of abstraction, as opposed to purpose; second tier based on problem domain An interesting notion: Although Go4 s taxonomy is most sensible, often patterns of different groups apply to same problem, which can be confusing to programmers 116 115 Go5 Patterns Go5 Patterns The Go5 s taxonomy (cont First tier: 1. Architectural patterns d) The Go5 s taxonomy (cont 1. From mud to structure Top-level system structure d) Second tier: The architectural level High-level design; identify components (aka sub-systems) of overall software 2. Design patterns Intermediate-level des...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online