Re: DataObject and DataObjectList in Jamaica

Marcel van der Boom <[email protected]> Sat, 11 Apr 2009 14:34:26 +0200
Newsgroups gmane.comp.cms.xaraya.devel
Message-ID <[email protected]>
On 11 apr 2009, at 14:10, [email protected] wrote:

> Marcel van der Boom wrote:
>>
>> What are these reasons?
>>
>
>
<snip
>
Sounds good.

You are proposing this:
   Master
   ↳ Object
      ↳ List
with the rationale: 'list is an object with an items attribute added'  
Right?
(hope the arrows come thru allright)


Two alternatives perhaps worth considering:

1. Reverse the inheritance, so:
   Master
   ↳ List
      ↳ Object
with the rationale: 'object is a list where the items attribute is  
limited to 1 'thing''

2. Refactor into Items object and Decorate when needed
   Master
   ↳ Object

   ItemList

with the rationale: 'when we need a list, we decorate Object with an  
instance of Values and work from there. The latter is actually the  
same as 1 (because the items attribute would still be needed), but  
refactored one step further.

I'm just giving them for inspiration, I have no clear preference,  
still being out of sync with what the current code is.

marcel

PS
Did I see it right that the branch I pushed without <xar:mlstring/>  
tags was merged in? (i.e the merge + the many debris revisions?)

-- 
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV    -- http://www.hsdev.com
So! web applications -- http://make-it-so.info
Cobra Replica build  -- http://cobra.mrblog.nl

_______________________________________________
Xaraya_devel mailing list
[email protected]
http://xaraya.com/mailman/listinfo/xaraya_devel