[Bioperl-l] Bio::Factory::SeqAnalysisParserFactoryI

Hilmar Lapp hlapp@gmx.net
Wed, 31 Jan 2001 11:10:30 -0800


Interface committed. Check out the documentation. If you approve
it, I'll add the implementation.

The obvious question with regard to SeqFeatureProducer is what
will happen to the add_features() method. In principle the
implementation is simple enough to just dismiss it; as we already
felt a couple of times it doesn't really add that much value. So,
let me know what you think.

	Hilmar

-------- Original Message --------
Subject: Bio::Factory
Date: Wed, 31 Jan 2001 01:08:46 -0800
From: Hilmar Lapp <hlapp@gmx.net>
Organization: Nereis 4
To: Bioperl <bioperl-l@bioperl.org>

In an attempt to address revisit/finalization of the
SeqAnalysisParser/SeqFeatureProducer stuff, I suggest to accept
the design change Ewan proposed couple of weeks ago:

------ <quote on>
Why not have

  Bio::SeqAnalysisParserFactoryI

  $parser = $factory->create_parser(-fh => \*FILE);

  Bio::SeqAnalyisParserI

  while( $next_feature = $parser->next_feature ) {

  }

same number of functions defined. Twice the number of interfaces,
but
these are the interfaces I would argue we want.

An implementation could implement ParserFactoryI and ParserI in
the
same module if so wished.
------ <quote off>

For the factory interface I propose to open a new directory
Bio::Factory, first to avoid cluttering of other directories, and
second because there are many places in BioPerl that can
eventually take advantage of a factory design (basically, wherever
hard-coded object creation occurs, e.g. in SeqIO::* etc), so that
directory hopefully won't stay empty for long.

Any objections? If not, I'll give it a go soon.

	Hilmar

-- 
-----------------------------------------------------------------
Hilmar Lapp                                email: hlapp@gmx.net
GNF, San Diego, Ca. 92122                  phone: +1 858 812 1757
-----------------------------------------------------------------