[Biococoa-dev] Base test

Koen van der Drift kvddrift at earthlink.net
Thu Aug 12 18:50:56 EDT 2004


John,

Why do you have a separate class for each base? Idon;t think that's how 
a singleton is supposed to work (although I don't have an example ready 
now that shows you how it *should* work :-).  You could just have a 
BCSequenceUnit (or whatever we decide to call it) class and create a 
base by eg passing only a name.  All the info about each base can be 
stored in an external plist file. The same BCSequenceUnit class can be 
used to create other structural objects.  This way most code for 
getting name, properties is written only once, instead repeated for 
each type of sequence unit.


So for instance:

BCSequenceUnit
|
|
----------------BCBase
|
|
----------------BCAminoAcid
|
|
----------------BCFunctionalGroup
|
|
----------etc


I also suggest that BCSequenceDNA should be a subclass of BCSequence, 
just as BCBase /BCSequenceDNABase should be a subclass of 
BCSequenceUnit:

BCSequence
|
|
----------------BCSequenceDNA
|
|
----------------BCSequenceProtein


- Koen.




More information about the Biococoa-dev mailing list