Re: Strategy for using common classes in multiple Cocoa plug-ins?
Re: Strategy for using common classes in multiple Cocoa plug-ins?
- Subject: Re: Strategy for using common classes in multiple Cocoa plug-ins?
- From: Andy Lee <email@hidden>
- Date: Sat, 21 May 2005 13:39:18 -0400
On May 21, 2005, at 1:18 PM, Mark Munz (DevList) wrote:
In an earlier discussion, it was pointed out that Cocoa classes all
share the same namespace per process. The problem I'm realizing is
that I have some common utility classes that I'm using that are used
in several plug-ins (and will be sharing the same space).
I'm wondering what the best strategy for dealing with this issue is in
writing these plug-ins?
If you own all the code for those common utilities, I would suggest the
low-tech approach of giving the class names a short prefix that isn't
likely to be used by someone else. This not only helps prevent the
namespace problem, it can help indicate groups of classes that belong
together. The Omni frameworks, for example, each use a different
prefix for class names.
I like to make names of everything pretty unique so that I can easily
do global search-and-replaces, because I'm always deciding on new names
for things. Objective-C doesn't have refactoring tools (that I know
of) like Java does, but even if it did, I would like to be able to do
global textual replaces, because refactoring tools can't detect class
names in comments.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden