[Biocorba-l] Biocorba IDL
Matthew Pocock
mrp@sanger.ac.uk
Fri, 20 Oct 2000 16:04:01 +0100
Hi Allan,
Alan Robinson wrote:
> Hi,
>
> I'm writing a Biocorba server currently (planned to be released next
> week), and whilst working with the Biocorba IDL I've come across the
> following issues:
>
Another server! Cool.
> The module is defined as org::Biocorba::Seqcore so "we look good in Java".
> Stylisticly, it should be org::biocorba::seqcore (Java packages are not
> capitalised, but Java objects are).
>
The module name thing is my fault, I guess. And yes, it should be lower case.
The way I rationalized the length to the powers that be at the time was that
the biocorba IDLs may well expand over time to encompas other sets of objects.
With this naming scheim we can add org::biocorba::otherStuff modules later,
and be nicely named. Naming it just Bio would be bad, imho, as it is very
likely that every bioinformatician and his dog will dream up the Bio module
for their personal Bio stuff. At the very least we should use
biocorba::seqcore.
>
> However, wouldn't it make more sense for the module to be just "Bio"? Then
> it would fit better with bioperl and make life easier for C interface
> users.
>
> The BioEnv interface defines methods to fetch a SeqDB by name, but it
> doesn't allow you to ask what SeqDB names it holds. A 'stringList
> get_SeqDB_names();' method would be useful here.
+1 (perhaps an iterator over the strings - we don't know how many string there
will be)
> For the iterators, it would be convenient to have a 'reset()' method that
> takes you back to the first item of the iterator, so that if we want to
> cycle over the values again, we don't have to re-create the object.
This makes implementing iterators *much* harder. The simplest form of iterator
is like the java pattern - 'boolean hasNext()' and 'thingy next()'. Once you
add reset(), goto(offset), previous() and all the other things life gets
complicated, and you are better off passing arround a List, vector, or
whatever the CORBA equivalent is. An iterator should be a very light-weight
object, and the overhead of fetching the things it iterates over will nearly
always be greater than the overhead of creating a new iterator instance. Also,
if iterators can be reset, this adds possibilities for accidently resetting an
iterator while some other code is relying on it proceeding from start to end.
> The exception "DoesNotExist" is not thrown by any methods of the IDL.
This should be used for any method where stuff is retrieved by an identifier,
and there is nothing associated with the identifier - e.g. fetching sequences
from a db.
> In the documentation for the iterators:
>
> boolean has_more(); // returns 1 when next_seq will give an object.
>
> Technically '1' is not a boolean. If the method really returns '1', it
> should be a 'short' being returned.
>
The docs should definitely be changed to realy underline that the return value
is boolean.
>
> cheers,
> al
>
Matthew
>
> --
> ============================================================
> Alan J. Robinson, D.Phil. Tel:+44-(0)1223 494444
> European Bioinformatics Institute Fax:+44-(0)1223 494468
> EMBL Outstation - Hinxton Email: alan@ebi.ac.uk
> Wellcome Trust Genome Campus
> Hinxton, Cambridge
> CB10 1SD, UK http://industry.ebi.ac.uk/~alan/
> ============================================================
>
> _______________________________________________
> Biocorba-l mailing list
> Biocorba-l@biocorba.org
> http://biocorba.org/mailman/listinfo/biocorba-l