• 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: AppleScript and shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and shell scripting


  • Subject: Re: AppleScript and shell scripting
  • From: has <email@hidden>
  • Date: Sun, 29 Jul 2007 22:43:05 +0100

Rob Lewis wrote:

And it almost seems like there's an inherent contradiction in trying
to endow and idiot-simple language with fairly tricky OOP features.

By 'fairly tricky OOP features' I assume you mean AppleScript's application scripting support. In fact, this is an extremely common misconception.


While the Apple Event Object Model presented by most applications does borrow a few ideas from OOP ('objects' and tree-shaped hierarchies), the mechanism by which AppleScript communicates with these applications is actually based on remote procedure calls and first-class queries. In addition, the AEOM itself is tied together by one-to-one and one-to-many relationships, which are concepts taken from the database world, rather than simple objects-within-objects containment as found in conventional OO models.

Once you realise how application scripting actually works, what previously seemed like 'fairly tricky OOP' becomes 'a logical and elegant procedural+OO+relational hybrid model' - although you still have to deal with all the implementation bugs and quirks of applications designed and written by developers who all too often are labouring under these misconceptions too.


(FWIW, it wasn't until I actually sat down wrote my own application scripting support for Python that I fully realised this stuff myself, and all the pieces of the AppleScript jigsaw finally slotted correctly into place. Although it's a pity I didn't have this particular epiphany a year or so sooner, back when I was struggling dreadfully trying to explain AppleScript in what eventually turned out to be a thoroughly disastrous book writing venture. Ah well, live and learn...)


has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: AppleScript and shell scripting
  • Next by Date: Re: Address book
  • Previous by thread: Re: AppleScript and shell scripting
  • Next by thread: Re: AppleScript and shell scripting
  • Index(es):
    • Date
    • Thread