L6 - Object Design Flashcards
Adapter Pattern
Connects incompatible components (wrapper: bank COBOL) + inheritance followed by delegation
Object Model Restructuring
improve understandability and extensibility
Black Box Reuse
Composition & Aggregation: New class offers aggregated functionality of existing classes.
Object Design focuses on …
reuse and specification.
Characteristics of Structural Patterns and Examples
Reduce Coupling & Extensibility & Encapsulation: Adapter/Bridge/Composite/Façade/Proxy
Specialization
superclass discovered first
Commercial-Off-The-Shelf Development fills design gap with …
standard components (‘buy’)
OOSE
Object-Oriented Software Engineering: System Design + Object Design + Implementation
Implementation Inheritance
Subclassing from implemented class that nearly has the same functionality (Stack/List: super bad). Reuse implemented functionality of superclass. PRO: Easy BUT: Bad Change Management / No Information Hiding
Types of Frameworks
infrastructure & middleware & whitebox & blackbox frameworks
Bridge Pattern
Delay design decision until runtime & provide multiple implementations under same interface & Bridge between Abstraction and Implementation: Delegation followed by inheritance
Strict Inheritance
Subclass can only add new methods and cannot override (keyword: final) = much better
Generalization
subclass discovered first (biology; leads to model transformation)
Characteristics of Behavioral Patterns and Examples
Choice between Algorithms & Model Complex Control Flows: Observer/Strategy
Strategy Pattern
Add algo w/o disturbing the application/other algo’s: Policy decides stragegy.
SA/SD
Structured Analysis/Structured Design: Preliminary Design + Detailed Design
Contraction
Method Overriding with empty bodies (violates Liskov’s Substitution Principle = bad)
Method Overriding
Implementation in subclass overrides function in superclass (same signature)
Frameworks
partial application that can be specialized to produce custom applications (reusability & extensibility)
Observer Pattern
models 1-to-Many Dependency between objects: ‘publish & subscribe’
Object Model Optimization
improve performance (response time & memory utilization & …)
Delegation
Catching operation and sending it to another object where it is already implemented. Reuse functionality of existing class. PRO: flexible & replaceable BUT: Encapsulation (inefficient)
Component-Based Software Engineering fills design gap with …
available components (‘build’)
Specification Inheritance
Subclassing from specification. Reuse of specified functionality of the superclass.