Unformatted text preview: ign; design each component 3. Idioms Implementation-oriented Programming-language speciGic 117 Examples: Layers, Pipes and Gilters, Blackboard (hardly new) 2. Distributed systems Examples: Broker, Pipes and Gilters 3. Interactive systems Examples: Model-View-Controller (MVC), Presentation- Abstraction-Control (PACSimilar to MVC, but agent-based) 118 The Go5 s taxonomy (cont 4. Adaptable systems d) Go5 Patterns The Go5 s taxonomy (cont Second tier: The design level 1. Structural decomposition Example: Whole-Part 2. Organization of work Example: Master-Slave 3. Access control d) Go5 Patterns Second tier: The architectural level (continued) System that evolve (changing reqs) Examples: ReGlection, Microkernel Examples: Proxy (slightly improved wrt Go4), Iterator (Go4), Faade (Go4) 119 120 The Go5 s taxonomy (cont d) Go5 Patterns The Go5 s taxonomy (cont Second tier: Idioms Beyond the scope of Go5 book! d) Go5 Patterns Second tier: The design level (cont d) 4. Management of objects or services Examples: Command, Memento (Go4) 5. Communication Examples: Client-Dispatcher-Service, Observer (Go4), Forwarder-Receiver For most part, idioms are groups of patterns that deGine a programming style for a given language Go5 just report on two idioms for C++ 1. Singleton pattern (Go4) - Make sure that a class only has one instance (e.g., make constructors private) 2. Counted references - Way to keep track of garbage in C++ (which encourages use of reference and pointer identiGiers to obtain message polymorphism) 121 122 Pattern Broker pattern (Go5)
Name Broker (aka Dependents, Publish-Subscribe) Applicability A distributed environment must support a group of server objects that provide services to a group of clients Example: In the world wide web a set of browsers access pages supplied by a set of sites via unique URLs Clients and servers can be added and removed dynamically Clients must be insulated from protocol and location of servers
123 Broker pattern (cont
Problem Pattern d) Provide reliable i...
View Full Document
- Spring '12
- Object-Oriented Programming, Design pattern, Subroutine