DESIGNING A PERSISTENCE FRAMEWORKWITH PATTERNS
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS
The Problem: persistent obiects ● persistent object o An object that can survive the process or thread that created it. a persistent object exists until it is explicitly deleted e ProductDescription e Storage Mechanisms and persistent Objects Object databases Relational databases ● others
The Problem: Persistent Objects persistent object ⚫ An object that can survive the process or thread that created it. A persistent object exists until it is explicitly deleted ProductDescription Storage Mechanisms and Persistent Objects ⚫ Object databases ⚫ Relational databases ⚫ others
The Solution A Persistence service from a persistence framework The framework should provide functions such as store and retrieve objects in a persistent storage mechanism ● commit and ro∥ back transactions
The Solution: A Persistence Service from a Persistence Framework The framework should provide functions such as: ⚫ store and retrieve objects in a persistent storage mechanism ⚫ commit and rollback transactions
e persistence framework o general-purpose, reusable, and extendable set of types that provides functionality to support persistent objects ● framework o a set of collaborating abstract and concrete classes that may be used as a template to solve a related family of problems. It is usually extended via subclassing for application-specific behavior
persistence framework ⚫ general-purpose, reusable, and extendable set of types that provides functionality to support persistent objects framework ⚫ A set of collaborating abstract and concrete classes that may be used as a template to solve a related family of problems. It is usually extended via subclassing for application-specific behavior
Key Ideas e Mapping .Object identity Database mapper e Materialization and dematerialization e Caches Transaction state of object e Transaction operations e Lazy materialization vIrtual proxies
Key Ideas Mapping Object identity Database mapper Materialization and dematerialization Caches Transaction state of object Transaction operations Lazy materialization Virtual proxies