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.
Legacy System
system that has evolved over decades and is considered irreplaceable
White Box Reuse
Inheritance/Subclassing: New Class reuses functionality of superclass + new functionality (use: specify interface + describe taxonomies)
Reuse
Identification of existing solutions (inheritance & off-the-shelf & design patterns)
Characteristics of Creational Patterns and Examples
Make System independent from the way its objects are created: Prototype/Singleton