From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-03-06 12:52:09
In message <7D72C1B2F7A3D21191F8006097149AC0A89D5E_at_[hidden]>,
Borgerding, Mark A. <MarkAB_at_[hidden]> writes
> 1) separates data from persistence media
>Separate the data from the method of persistence.
>Each must belong into it's own class hierachy.
>So the following hierarchies might exist in your project
>(Base classes ) (Subclasses )
> /---- car
>PersistentData <------- employee record
> \---- email message
> /--- file
>PersistenceMeans <-------- database
> \--- socket
Based on work I did in the past, you may also wish to consider breaking
the means up: the media (eg file, socket) and the representation (eg
native binary, text, CDR). This allowed the representation to be treated
as orthogonal to the media mechanism.
Also, I would question having to tie everyone into a hierarchy at all.
They can choose to do so if they wish, but a generic interface approach
should also be supported. To implement this PersistenceMeans needs to
support a member template that then wraps up its argument in a generic
adapter, ie PersistentData <---- PersistentDataAdapter<T>, so it's a
generic to an inheritance interface adapter.
Kevlin Henney Without art we are nothing
kevlin_at_[hidden] but monkeys with car keys
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk