• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Notifications vs. messaging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifications vs. messaging


  • Subject: Re: Notifications vs. messaging
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 1 Oct 2001 18:36:07 -0500

At 7:15 PM -0700 9/30/01, Brian Hook wrote:
That seems like a good rule. However, Sketch sets up a notification for when the tool palette changes. I'm curious why the sample code doesn't just have messages being sent directly -- is it because they don't know many documents might exist and thus registering all documents with the tool palette would be ugly?

The key word above is "registering." This, to me, indicates that you're building a loosely-coupled system. While Objective-C is pretty loosely coupled to begin with, some things probably shouldn't even have as much knowledge about each other as the sender of a message has about its receiver.

Thus notifications are essentially an implementation of the "observer" design pattern.

-- Chris


  • Prev by Date: Re: PB & Mac OS X 10.1
  • Next by Date: Taking a square root of NSDecimalNumber
  • Previous by thread: Re: Notifications vs. messaging
  • Next by thread: Re: How to determine a single pixels alpha?
  • Index(es):
    • Date
    • Thread