Re: Java OpenGroupware API - annotations

Helge Hess <[email protected]>
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <[email protected]>
On Montag, Sep 1, 2003, at 17:38 Europe/Berlin, Burkhard Sell wrote:
>> Well, I don't know the Iterator API, only the Enumerator one (which 
>> is also available in Objective-C).
> java knows enumerations too.
> but sometimes sun created a collection frameworks.

Yes, you already explained me. If they are actually the same thing, 
lets refer to them as enumerators ;-)

> but there are some cases the client needs think like element counting,
> getting elements by index, ...

Yes, in that case you need to read all elements anyway. Nothing against 
an additional, higher level, method which does that.

> so you *need* a list interface.

Sure.

> in those cases if you only provide a iterator the client will copy all 
> elements into its own list/array/...

Of course. Isn't there Java API like
   list = List(Enumerator e)
?
If it would be that simple, the burden could be placed on the client to 
keep the API slim. If creating an array from an enumerator involves 
more steps, you may want to create a convenience method.

>> Again, if you have thousands of records this will hit you big time 
>> because indexed access is wrong(tm) for big collections.
> what will the client do with this records...
> mostly it'll display them...so you need all elements in RAM.

If you strictly focus on an OGo specific GUI client, this may be true. 
In any other case it is not.
Mostly you will *not* keep them in memory - because you can't!

Examples:
JSP pages
- render object, forget object, render object, forget object
Export tools
- export CSV line, forget object, export CSV line, forget object
Glow GUI Client
- map JOGI Person to SDBC Contact, forget object, etc
OGo GUI Client
- extract attributes you need (name,street,email), forget object

> otherwise you can use the iterator() method

This will be the most commonly used method for scalabale solutions.

regards,
   Helge
-- 
OpenGroupware.org - http://www.opengroupware.org

-- 
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.