Re: DataObject and DataObjectList in Jamaica
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
Marcel van der Boom wrote: > > What are these reasons? > 1. Clearer code Right now the common stuff is sitting on the master class, in particular the common routines of the constructor(s) and the common properties. I'd like to reduce that class. 2. Sharing methods The getItem routine of the object object for instance is limited to getting an item based on itemid, whereas we could consider it a special case of the getItems method. Conversely it would be convenient to be able to load a "current" item into the objectlist. 3. Reusing objects In those cases where both a list and an input form appear on a page we need to instantiate one of both, rather than reusing one object. Overall I want to slim down the classes as much as possible. If you strip out the stuff in objectlist that shouldn't really be there (pager, showviewoptions methods), the objectlist class (I'm exaggerating here, but not much) is basically an object with an items property that holds the array of items info. So the question naturally suggests itself as we move to deploy dd more widely. Recall that the alternative approach to implementing objectlist was to cast it in some form as an array of objects. With this approach I'm implicitly rejecting that (it was never more than an idea anyway), mainly for performance reasons.