Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed objects: Code required on both sides?



On Apr 29, 2006, at 11:09 AM, James Bucanek wrote:

I now have a lot (and it's growing every day) of classes that only execute in the server. These objects never exist in my application except as proxy objects. I'd like to eliminate that code in my application so that the code only exists in the server.

Is this possible?

Yes. The way to do it is to define a protocol to represent the server-side object (which the server-side object should of course conform to) and to write your client-side code in terms of the protocol, e.g. "id<ServerSideObjectProtocol> foo;" rather than "ServerSideObject *foo;". This way your client-side code only references the protocol, and doesn't need implementations for the server-side objects.


  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Distributed objects: Code required on both sides? (From: James Bucanek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.