Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Java OpenGroupware API - annotations: msg#00006

cms.opengroupware.xmlrpc.devel

Subject: Re: Java OpenGroupware API - annotations

> Burkhard Sell wrote:
>> i took a look @ your JOGI stuff.
>> It's a very nice thing ;)

Thanks!

>> i already told with helge about that and we think this is not the
>> best way doing so.
>> if there are queries with large results, this results in a expensive
>> utilization of resources. the better way should be to return iterator.

Well, when we (JOGI Team) first talked to you guys about our API,
either you or Helge (hm... can't remember), mentioned that too.


We didn't ignore that advice, and actually considered it at first.

One thing that bothers me about the Iterators, is that you cannot
find out the number of returned results. With a List, you simply
call size(), which could be a O(1) operation; when returning an Iterator,
you also have no good way of finding that out (besides walking the Iterator);

We return a java.util.List on purpose, since this allows us to choose the
implementation of the returned List. Currently we return ArrayLists
(or Vectors... hm... gotta look that up), but as an optimization
I have something of a lazy List in mind; this could basically do
the same thing as an Iterator, and not load anything at first,
only when something is accessed;

This brings the benefits of giving the user a List (like, allowing
the user to access contents by index instead of being forced to
walk the entire Iterator if not the first but n-th element is desired,
accessing the size,...).

And: with the Java Collections List, an Iterator object is only an
"iterator()" call away;


So... those are our considerations on that topic; If you find a
flaw in the logic, please point it out, and we shall reconsider;


>> so the client gets the iterator and each element is read when its
>> needed.

Well, my idea of some lazy List implementation would work the same
way; if someone uses resultList.get(0), the we only read the
0th element, and do not fill all the rest unless those elements
are requested.


>> maybe short queries can get slower but large queries will be fasten
>> up extremly. i think in most cases the client will iterate over the
>> lists anyway, don't they?

I suppose;


>> is it possible to change your API. please think about that.

We would be greatful if you could give us your opinion on our
considerations that I stated above;


>> it seems you're importing the libs using the "add external jar
>> feature". the better way is using variables or the "add jar" feature,
>> so it runs everywhere without changing any settings.

OK, noted; although, I don't think I have commited the .project or
.classpath lately;

>> u're using "net.sourceforge.ogojogi...".
>> ok, currently the project is hosted there but

well, actually, we didn't use that namespace because of
the project is hosted there, but because we using this
convention, we would have a unique namespace, without the
risk of clashing with another library's Namespace;

>> think "org.opengroupware.ogojogi"
>> sounds much better...don't it?

actually... it does; hm... I suppose, for our first real release
(not "EarlyAccess") we will change the Namespace to
org.opengroupware.ogojogi;

>> and eclipse supports refactoring ;)

I know, we actually had used the namespace "jogi.*" during initial
development, and had changed it to the Sourceforge one just prior
to the first Release (using Eclipses refactoring capabilities);


>> if you need/want help for your project...ask me for!

... bad move; we will surely take this offer seriously ;-)

murphee
(JOGI Team)


--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation