Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: OSA modernization and scope
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OSA modernization and scope



On 2008-12-26, at 21:20:56, Ken Tozier wrote:

Before you go too far down this road, you might want to check this out.


Thanks for posting this link Ken. I've looked over the spec and think that it's not really a good fit to replace some critical ComponentManager capabilities that any modernized OSA would still have to support. Anyone into EXI should file a bug because in Appendix F.2 Internet Media Type (near the end) it states: 

Macintosh file type code(s): APPL

This is clearly wrong.


It's highly likely that the various scripting languages developers will adopt this protocol on their own, so all Apple would have to do is create a tool sort of like the "Carbon Dater" utility to help software vendors convert their existing AppleScript support to the new standards-based API. It would be a lot less work for them and they wouldn't need to waste their time trying to gain support for a new standard or herd cats in the various scripting language worlds to support their efforts. If they wait a year or so, the cats will herd themselves and Apple can just worry about the OS X implementation and conversion stuff.

It might be efficient for Apple to implement to/from coercion handlers because the spec mentions SOAP as an example of a format which doesn't use all XML Infoset information items (like PIs and comments) and SOAP is already handled by AppleEvents.


If you are itching to get in on the action, you could probably work up a demo that uses EXI to communicate between a script (Perl, Python, Ruby etc) and an Adobe app using one of their free SDKs (available here: http://www.adobe.com/devnet/sdks.html)

I looked over the site briefly but didn't see any mention of EXI at the top level and a google search for "Adobe EXI" <http://www.google.com/search?client=safari&rls=en-us&q=Adobe+EXI&ie=UTF-8&oe=UTF-8> only reveals that an Adobe executive was one of the initial team members. So maybe you can be more specific.

As an aside, I'd like to remark that reading through the spec made me think that it was derived from an existing code implementation and then rationalized later. Considering its use of flate/deflate, it seems likely Adobe thought it could kill two birds with one stone by getting something close to PDF into the binary side of XML standards while filling the need for W3C to have a binary format to compete with ASN.1.  :-)

Philip


Really the main advantages AppleScript had going for it was the standardized packaging of data and a wire / dispatch mechanism. EXI solves the protocol, sockets and P2P solve the mechanism.

If you want to nudge Apple towards a new, OSA architecture, EXI (or something like it) seems like the way to go.

On Dec 26, 2008, at 10:00 PM, Philip Aker wrote:

On 2008-12-26, at 16:10:37, Joshua Juran wrote:

Fortunately, Apple has already been shipping an open scripting architecture for several years, which is multiplatform and has enormous developer buy-in.  It's called Unix.

We're also talking about "native" applets, droplets, folder actions, mail rules, Perl Studio, Lua Studio, etc. without the hassle that it takes to map the whole freakin' Cocoa.framework into language X.


If you want to attract people who aren't Mac developers, consider designing a wire protocol that anyone can implement.  Let applications and scripts communicate over pipes or sockets, which all major scripting languages support.

On Mac OS X, methinks it's mach ports. On anything else, it will probably be variants on the preprocessor conditional below.

typedef struct {
  CFIndex version;
  void * info;
  const void *(*retain)(const void *info);
  void (*release)(const void *info);
  CFStringRef (*copyDescription)(const void *info);
  Boolean (*equal)(const void *info1, const void *info2);
  CFHashCode (*hash)(const void *info);
#if defined(__MACH__)
  mach_port_t (*getPort)(void *info);
  void * (*perform)(void *msg, CFIndex size, CFAllocatorRef allocator, void *info);
#else
  HANDLE (*getPort)(void *info);
  void (*perform)(void *info);
#endif
} CFRunLoopSourceContext1;



Here are my key questions:  Is it available as free software on Linux?

That's why we're suggesting CoreFoundation level.


How would it work with Parrot?

"The goal of the Parrot virtual machine is to host client languages, and allow interoperation between them."

Different goals I think. Definitely not a virtual machine. Interoperability to the extent to which each OSA language can support AppleEvents or deal with another language's text result to an 'exec' call. Due to the groundbreaking work done on sdefs, I'd be inclined to think that transferrable objects would be the least overall hassle if expressed in XML but an alternate llvm format could be worth looking into. Each language would have to provide it's own translators for these cases though (perhaps with the aid of built-in facilities for the basic types).


Is it *really* free, or just another lock-in API?

That would be Apple's call. What I think would be best is if the OSA Team could aim for an international standard by a contribution to the existing open source CoreFoundation.


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: OSA modernization and scope (From: has <email@hidden>)
 >Re: OSA modernization and scope (From: Joshua Juran <email@hidden>)
 >Re: OSA modernization and scope (From: Philip Aker <email@hidden>)
 >Re: OSA modernization and scope (From: Ken Tozier <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.