[Biococoa-dev] BCSequence class cluster

Alexander Griekspoor mek at mekentosj.com
Sat Jan 8 07:45:50 EST 2005


Man, I'm running behind, this one goes really back, but I still had a 
few comments....

>> I'm still wondering a bit how we're going to implement these kind of 
>> methods, as we now have to start ALL methods with a test what the 
>> sequence type is.

As charles pointed out, I'm wrong here as all subclasses can/will 
handle things differently.
>
> You only need to put the test in the init of the BCTools subclasses. 
> No need to keep them in BCSequence, et al. Another  possible solution 
> could be to create a DNATools/ProteinTools class, which has 
> convenience methods to various manipulations only for that type of 
> sequence (this is the BioJava approach - I like the first one better, 
> though).

The comment I had was one I've expressed before that I would strongly 
argue against DNA/ProteinTools for every thinkable manipulation of your 
sequence objects. Although I have to admit I haven't practically used 
BioJava much, one thing that annoyed me in there examples was that for 
even the simplest manipulation of your sequences you have to 
instantiate and use tools. I think tools are the way to go for complex 
things, but for things like reverse and complement I don't wanna think 
of needing tools for that, so un-cocoa like..

>> To implement mutable objects in the class cluster could be a bit 
>> tricky, because there are two conflicting subclass organizations 
>> here: mutable/immutable and dna/rna/protein/codon. To get all the 
>> combinations, it seems that we need 8 subclasses!!
>> Oops, Koen won't like this, LOL ;-) On the other hand, look at the 
>> number of NSNumber subclasses...
>
> No, I don't like that :D, see my comment above. Another possibility 
> (also stolen from BioJava) is to make a BCToolsEdit class that takes 
> care of editing a immutable class.

Although practically a valid option, again, this sounds weird, I think 
we've clearly made a bad design decision the moment you start editing 
immutable classes ?!
Alex


*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
              The Netherlands Cancer Institute
              Department of Tumorbiology (H4)
         Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                    Fax:  + 31 20 - 512 2029
                   AIM: mekentosj at mac.com
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

	Claiming that the Macintosh is inferior to Windows
	because most people use Windows, is like saying
	that all other restaurants serve food that is
	inferior to McDonalds

*********************************************************




More information about the Biococoa-dev mailing list