[Biococoa-dev] BCPairwiseAlignment

Alexander Griekspoor a.griekspoor at nki.nl
Sun Mar 13 08:41:49 EST 2005

> On Mar 12, 2005, at 3:17 PM, Charles PARNOT wrote:
>> Categories are not 'evil'. They are often warned against, but this is 
>> mostly when using categories on Apple's classes, because you don't 
>> know in which order they are loaded, and you don't know if your 
>> category might interfere with someone else's category, and which one 
>> will override which in case two methods have the same name.
>> However, categories used inside your own code can be a nice way to 
>> cut your class in smaller chunks, both physically (different files), 
>> and logically (I believe the compiler will only recompile the 
>> category if only the catgory is modified, which makes for faster 
>> builds). For the user of our framework, it is completely transparent, 
>> as long as you put all the interfaces in the same header file, so 
>> that all the headers can be #import-ed at once.
> Thanks - I was under the impression that categories were intended to 
> be used to extend private frameworks, such as Foundation.
They are also. But they're used to separate code within the same .h/.m 
file as well.
Phil, the problem Koen and I have as far as I can speak for the two of 
us, is that we don't really see the structure you have in mind with the 
Charles is right, the class-subclass layering only has use if there's 
code that can be grouped together between in this case different 
algorithms. So, if there is lots of code to share between let's say a 
smith-waterman and needleman-wunsch alignment then it makes sense to 
create a superclass for all algorithms. If there's hardly any, than 
there's not much use.
So to clear things up from my side:
BCAlignment becomes BCSequenceAlignment, this is the net result of an 
alignment, some way to store them in the end
Then the question is what do we call for instance a Smith-Waterman 
local alignment and does it make sense to let them derive from a 
BCAlignmentAlgorithm (I believe Koen had a better name) superclass.
Finally, the categories. I'm not sure where this would fit in, but the 
reason I said to just incorporate the convenience method in the class 
was based on the idea that given a class named BCSmithWatermanAlgorithm 
(to mention a horrible name), it would just have a class method:
+ (BCSequenceAlignment *)alignmentOfSequences: (NSArray *)sequences 
criteria: (NSDictionary *) dict; (to mention another horrible method 
I don't really see where the categories come in and what structure Phil 
had in mind.. Does this make my remarks more clear?

                     ** 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
                   E-mail: a.griekspoor at nki.nl
	        AIM: mekentosj at mac.com
               Web: http://www.mekentosj.com

                  EnzymeX - To cut or not to cut


More information about the Biococoa-dev mailing list