October 19, 2006

Refactoring code

Filed under: Uncategorized — frameworker @ 5:41 am

I spent the day, refactoring part of my codebase. I’d used a “has-a” rather than an “is-a” mechanism to encapsulate some behavior, but felt it was awkward, so I switched over to using categories on NSString and NSMutableArray. My problem arose when I previously hit the wall trying to subclass NSString, which is a “class cluster.” My motto then became: “Never subclass a ‘class cluster’.” Now I’ve revised that to read: “Never subclass a ‘class cluster’; Add a category instead 🙂


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: