Jens Alfke wrote:

I was wondering if anyone had any ideas about sending notifications
to Cocoa applications using either Ruby, or PHP? I want to send
notifications using a cocoa application to another cocoa application
and / or send notifications from a web based application.

Notifications are a general broadcast mechanism, used to announce that something of interest has happened when you don't know or care who's listening. If you're looking for point-to-point or two-way communication, there are other, more suitable, IPC mechanisms for that.


AppleEvents are the standard way to do this. Cocoa's scriptability
APIs make it pretty easy to implement AppleEvent/AppleScript support.
From Ruby you can use the bridge to invoke AppleScript, and from any
language you can launch an AppleScript as a separate task or use the
'osascript' tool to send raw AppleEvents.


If the OP is writing both client and server applications for their own use and both are using Cocoa, I'd suggest looking at Distributed Objects first. Apple events can be a bear to do well - the main reason for using them is if you need to talk to third-party applications, or allow third-parties to talk to yours.

Also, I'd strongly recommend Ruby or Python over PHP since the first two have excellent and very mature Apple event and Cocoa bindings while PHP doesn't have either.

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to