• 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: Protocols on the fly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protocols on the fly?


  • Subject: Re: Protocols on the fly?
  • From: John Hörnkvist <email@hidden>
  • Date: Tue, 29 Apr 2003 00:48:53 +0200

On Tuesday, Apr 29, 2003, at 00:30 Europe/Stockholm, Sherm Pendley wrote:

However, I want my framework to be as transparent as possible, and preferable not force my host applications to provide me with a protocol.

Then don't use one. Protocol usage in DO is meant to be a convenience, not a burden - it allows for easier type- and sanity-checking, but a transparent framework that simply passes arbitrary objects along to its host application has no need for that sort of checking. That's why it's recommended to use a protocol, but not required - it's not always useful.

You'd only need to declare a protocol if your framework were *not* transparent - that is, if it expected the objects it receives to be able to handle a particular set of messages. In that case, you'd want to declare those methods in a protocol and verify that any objects it handles conform to that protocol.

There is more to it than that; by setting a protocol for a proxy, you decrease the number of round trips. If there's no protocol set for the proxy, it has to query the remote object for the method signature.

Cutting the number of round trips can be very important in DO applications.

Regards,
John Hornkvist
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Protocols on the fly? (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: Protocols on the fly?
  • Next by Date: embedding a dictionary in a dictionary.
  • Previous by thread: Re: Protocols on the fly?
  • Next by thread: NSMovieView Interface Object Question
  • Index(es):
    • Date
    • Thread