I think that Johannes expresses a legitimate concern. Accessing the data from the COS model is very slow. To get any sort of semi-decent performance we need for the PDModel to be able to cache data. I know it may be stated in that link that the PD views are to be 'write-through', but that is simply not fast enough.
For read-only and single-VC use-cases this is trivial (since the particular PD view/control can invalidate its own cache). But for shared COS models in the authoring use-cases there needs to be an observer pattern in place in order to notify views to update. It shouldn't be too hard to introduce a simple, basic COSListener interface to listen for change events and extend the basic COS API to be able to add listeners. My $.02. -Mel -----Original Message----- From: Andreas Lehmkühler [mailto:[email protected]] Sent: Wednesday, March 03, 2010 7:53 AM To: [email protected] Subject: Re: Relation between COS and PD model Hi, Gesendet: Mi, 03. Mrz 2010 Von: Johannes Koch<[email protected]> > Hi, > > I wonder what the intended relation between the COS and the PD model is. > > Is the COS model the actual data model and the PD classes are only views > on this data? AFAIU yes > Is the PD layer supposed to cache data (for performance issues)? There may be some cases where data will be cached, but it wasn't intended. > If data is changed via methods in the PD layer, how are these changes > propagated to other PD objects? Do we need an observer mechanism for > data changes? I don't think so. Data changes should be writen to the COS model by the PD layer. At [1] you will find a brief description of the relation between the COS and the PD model. BR Andreas Lehmkühler [1] http://pdfbox.apache.org/userguide/index.html
smime.p7s
Description: S/MIME cryptographic signature
