Re: Distributed Objects or NSFileHandle?
Re: Distributed Objects or NSFileHandle?
- Subject: Re: Distributed Objects or NSFileHandle?
- From: Kam Dahlin <email@hidden>
- Date: Thu, 21 Jun 2007 15:09:03 -0700
Thanks Uli,
So based on what I "think" you are saying - there is no issue with
sending data (like photos or music, etc) via Direct Objects?
For example - if I vend an object to my clients that has a NSData
object with meaningful data to my clients, this is just as valid of
an approach as writing that Data to an NSFileHandle and have my
clients pick up the data via the file handle notifications?
Regards,
Kam Dahlin
The best time to add insult to injury is when you are signing
someones cast.
On Jun 21, 2007, at 3:00 PM, Uli Kusterer wrote:
On 21.06.2007, at 20:30, Kam Dahlin wrote:
> Is it better to use NSFileHandles to read and write data across the
> network, or can I use DO and send the data to the clients inside of
> an NSData object? How do iTunes or iPhoto share out their
> libraries to clients? I am looking to do a similar kind of thing
> but with my own file type.
>
> I haven't seen any example code out there using DO like this, so I
> am guessing that NSFileHandles are the way to go, but DO is really
> powerful and it would be great if I could share my data to the
> clients using this system. I have looked at the PictureSharing/
> PictureSharingBrowser examples and Apple doesn't use DO to send the
> picture data between the clients - they use NSFileHandles.
AFAIK NSFileHandle is just fine, but NSFileHandle lets you craft a
simple, and more interoperable protocol. I.e. NSFileHandle can be
used by Java apps, Carbon apps, PHP scripts, Windows, Linux etc...
so, if you're not opposed to eventually creating versions for other
platforms, or having third parties provide clients/servers for your
scheme, NSFileHandle is the better choice.
If you want something that "just works", and you want to stay Mac-
only, DO is the way to go. I'm not even sure GNUstep uses the same
protocol for DO as Cocoa.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden