[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: No Collections API use?
From:       "Patrick Calahan" <pcal () bea ! com>
Date:       2004-08-13 17:08:33
Message-ID: 82447314F99FB04EB45A98AF96FD7F1705D67261 () ussfex01 ! bea ! com
[Download RAW message or body]

My $.02: 

  Strong typing, efficiency and contract minimization trump whatever
conveniences Collections may afford.  

FWIW, Sun agrees: xbeans here is consistent with the JavaBeans spec,
which mandates the use of arrays to expose 'indexed properties.'


Cheers,
-p


> -----Original Message-----
> From: David Smiley [mailto:dsmiley@mitre.org] 
> Sent: Friday, August 13, 2004 7:07 AM
> To: xmlbeans-dev@xml.apache.org
> Subject: Re: No Collections API use?
> 
> 
> On Aug 13, 2004, at 12:46 AM, David Waite wrote:
> ...
> > Actually, the speed trade-off was mine. This is due to 
> arrays being a
> > 'quasi-native' type in java, vs. collections which are just objects 
> > with references to one another forming a data structure.
>  >
> > Really though, Collections are used for manipulation, 
> correlation, and
> > indexing of data; arrays do not handle any of these well.
> 
> I hope I don't come across as condescending when I say this but, I 
> think you're missing the point of the Collections API.  It 
> *standardizes* the access and manipulation of objects into a 
> *separate* 
> object from whatever object it is that contains the things.  The 
> "standardize" point is obvious, but the "separate" point is 
> especially 
> relevant to XMLBeans because presently there are eight methods per 
> group of sub element type.  These eight methods could be replaced by 
> just one that returns a java.util.List.  The end result is 
> less API and 
> increased use of a standard API the Java programmer already knows 
> intimately.
> 
> >  On the other hand, collections in java (< 1.5) have a 
> major flaw, in
> > that they leave the contained data completely untyped.
> 
> I agree with your point that Collections being untypes prior 
> to 1.5 is 
> a problem, but I don't think it's "major".  We Java developers deal 
> with collections all the time, and they are plenty useful 
> nonetheless.  
> If it was so major of a problem then we wouldn't be using them much 
> right now.
> ...
> 
> Cheers,
> 	Dave Smiley
> 
> 
> 
> - 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: 
> xmlbeans-dev-help@xml.apache.org Apache XMLBeans Project -- 
> URL: http://xml.apache.org/xmlbeans/
> 
> 

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic