Bioperl: Accessing sequences via Bio::DB::SeqI
James Gilbert
jgrg@sanger.ac.uk
Fri, 5 May 2000 10:37:41 +0100 (BST)
On Mon, 1 May 2000, Ewan Birney wrote:
> On Mon, 1 May 2000, Mark Dalphin wrote:
>
> > Thanks for the reply, Ewan. I have a further naive quetion about the use of the
> > modules:
> >
> > Following on from my earlier letter, I see now that Bio::DB::GenBank.pm ISA
> > RandomAccessI.pm and that SeqI.pm ISA a RandomAccessI.pm. And I understand your
> > design in making SeqI.pm a superset of RandomAccessI.pm.
> >
> > Where I am stuck is in "Why is RandomAccessI.pm ISA RootI.pm?" One needs to
> > eventiually inherit from a concrete class, I would think. In that case, I would
> > think that RandomAccessI.pm ISA Bio::Root::Object.pm would make more sense. Then one
> > could write:
>
> This is complex, so I appreciate your confusion. The RootI inheritance is
> correct. The interfaces should not mandate a particular implementation.
> The thing to keep in mind is that one might have a _radically_ different
> implementation behind an interface. The best example I know are C structs
> bound in via XS, providing hyper-fast bioperl "objects" without being
> implemented at all in Perl. It is very cute. (and works ...)
I think the BioPerl "I" modules confuse people who
are used to working with interfaces, because they
contain a lot of "decorator" methods, which
actually do things, and so are not pure abstract
interfaces. Bio::Root::RootI implements all of
its methods, so I think it _is_ the concrete class
that Mark is looking for.
James
James G.R. Gilbert
The Sanger Centre
Wellcome Trust Genome Campus
Hinxton
Cambridge Tel: 01223 494906
CB10 1SA Fax: 01223 494919
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================