NSDistributedNotification and Developer Cooperation.. a request for discussion
NSDistributedNotification and Developer Cooperation.. a request for discussion
- Subject: NSDistributedNotification and Developer Cooperation.. a request for discussion
- From: Charles Bennett <email@hidden>
- Date: Wed, 10 Oct 2001 17:48:33 -0400
I'm coming up on the second beta release of PowerGuardian and it will
include several NSDistributedNotifications that will be "public" for developers
that might want their applications to "listen" to the power status of the system.
The passive nature of notifications makes it very low cost to include hooks
"just in case" a notification arrives, but doesn't require any commitment that the
notifications MUST arrive. Pretty cool really.
In the process of doing this I realized that there is a danger and an opportunity.
The danger is in NSDistributedNotification namespace collisions. Since notifications
are simply NSStrings and anyone can post any notification. The danger is that
in the case of a collision, information that is expected to be included would be
missing or different.
I suggest that we adopt the java like, class naming convention for notification names.
Instead of @"Power_Failure" it would be something like @"com.benatong.powerguardian.Power_Failure"
If we can agree on a naming convention then perhaps the next step would be some sort of
Notification Name Server (kind of a OS X specific UDDI) where we could post what "public" notifications our applications
are generating and a reference to the information that they contain.
This could give rise to all kinds of cool inter-application communications and
"fun"
Comments?
chuck