TweetFollow Us on Twitter

Feb 98 Viewpoint

Volume Number: 14 (1998)
Issue Number: 2
Column Tag: Viewpoint

Viewpoint

by Eric Gundrum

Scripting is Part of the Interface

Why do we need scripting languages? Why do we need more than one? I started working in the Mac industry years before we had AppleScript. Back then, a few of the more powerful Mac applications had their own built-in scripting languages, including the communications application I was working on. Then a scripting language was used to automate the internal functions of the application, freeing the user from having to watch over time-consuming tasks, or just assisting with mundane, repetitive work. We did not have anything like the shell script of Unix or the batch files of DOS to tie applications together.

With the release of System 7, AppleScript entered the scene. Apple had given us a very powerful core language, with all the essential decision and flow control features. Unfortunately, Apple's original release of AppleScript was seriously flawed. The underlying technology was great, but Apple didn't show us how best to use it. They were in such a hurry to get AppleScript out the door, that they hadn't had time to build it into the Finder. Developers often look to the Finder for ideas on how to best make use of Apple technologies, for better or worse. If we want an example of how the menus should look in an application, we look to the Finder. We do the same for ideas on the About box, Balloon Help and many other technologies. Apple did not provide developers with a rich example of how to implement a scripting interface to an application. Developers were slow to adopt AppleScript, and consequently, so were users.

Designing a clean scripting interface to an application is as important as designing a clean graphical interface to the application. Yet few developers are willing to invest even a tenth the time in the scripting interface that they invest in the graphical interface. Most scripting interfaces are implemented at the last minute, usually as the application is going to beta testers. By then there is not sufficient time in the development cycle to change the application to better support scripting. Furthermore, most scripting implementations are designed by programmers, usually with intimate knowledge of the inner workings of the application. They think in terms of the application's internal messages and data structures and figure they can use AppleScript to extend these to the user. Then the documentation folks have to figure out how to explain what the programmers mean by commands like "OpenConnectionToFTPServer( serverAddress, portNumber, showWindow )".

Talk to your Mac

I prefer AppleScript because writing in the AppleScript language is like talking to my computer. Being the asocial geek that I am, I like the idea of my computer understanding me when I talk to it. When I can say things like "Computer, please tell the application "Finder" to open the window named "projects." Or, while in a QuickTime VR world: "Computer, pan left 90 degrees." This sure beats having to say "OpenFinderWindow( "projects" )". AppleScript provides a framework for communicating with applications this way.

The biggest mistake Apple made with AppleScript was in not giving developers the "Human Scriptability Guidelines," the AppleScript equivalent of the "Human Interface Guidelines." After all, AppleScript is an alternative interface to applications. For that interface to be easy to use, it must be well designed and consistent with other applications. We all know how much users benefit from consistency across applications. Many of us fought hard to convince unenlightened developers who, in the early days of the Mac, neglected to include an Edit menu, used the wrong command key for "Close Window," put the Preferences item in the wrong menu, or otherwise made mistakes in the interface. Making applications scriptable requires this same attention to detail, but the problems are more subtle, and the solutions less obvious. Without Apple's guidance, we are left to figure out for ourselves how best to design a scripting interface, and everyone designs a different look and feel.

In my experience designing the scripting interface before designing the code helps a lot. This way, you can factor your application, building in well defined objects that easily map to your scripting terminology. To help you design your terminology, start by talking to your computer; verbally direct your application to perform common tasks. Ask users familiar with what your application does to write the directions to common tasks as if they were directing a colleague to perform the task. These activities will help you identify the object that users think of when they perform these tasks. Those objects should be the main elements of your terminology. This will also help you think about all the features you must have in your application, and how to organize the underlying code. Then all you have to do is write it. ;-)

In This Issue

Two of the articles in this issue can help you design better scripting interfaces your applications. John Schettino's look at prototyping applications with FaceSpan provides suggestions on designing an application with scripting in mind. Cal Simone and Bill Cheeseman have designed a framework for judging just how scriptable is an application. Their article identifies the essential features of any scriptable application. You also will find articles about scripting environments other than AppleScript. In today's multi-platform world, Perl and tcl/tk are important technologies. In the past, the Macintosh versions of these tools have not kept up with their Unix counterparts. This is no longer a problem. As you will see from the articles, these Macintosh tools are very powerful.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

ffWorks 3.3.5 - A Comprehensive Video Co...
ffWorks, focused on simplicity, brings a fresh approach to the use of FFmpeg, allowing you to create ultra-high-quality movies without the need to write a single line of code on the command-line.... Read more
Arq 7.19.11 - Online backup to Google Dr...
Arq is super-easy online backup for Mac and Windows computers. Back up to your own cloud account (Amazon Cloud Drive, Google Drive, Dropbox, OneDrive, Google Cloud Storage, any S3-compatible server... Read more
Opera 97.0.4719.28 - High-performance We...
Opera is a fast and secure browser trusted by millions of users. With the intuitive interface, Speed Dial and visual bookmarks for organizing favorite sites, news feature with fresh, relevant content... Read more
Google Chrome 111.0.5563.110 - Modern an...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
Vivaldi 5.7.2921.65 - An advanced browse...
Vivaldi is a browser for our friends. We live in our browsers. Choose one that has the features you need, a style that fits and values you can stand by. From the look and feel, to how you interact... Read more
Ableton Live 11.2.11 - Record music usin...
Ableton Live lets you create and record music on your Mac. Use digital instruments, pre-recorded sounds, and sampled loops to arrange, produce, and perform your music like never before. Ableton Live... Read more
Adobe Acrobat DC 23.001.20093 - Powerful...
Acrobat DC is available only as a part of Adobe Creative Cloud, and can only be installed and/or updated through Adobe's Creative Cloud app. Adobe Acrobat DC DC with Adobe Document Cloud services is... Read more
Adobe Acrobat Reader 23.001.20093 - View...
Adobe Acrobat Reader allows users to view PDF documents. You may not know what a PDF file is, but you've probably come across one at some point. PDF files are used by companies and even the IRS to... Read more
Paragon NTFS 15.10.590 - Provides full r...
Paragon NTFS breaks down the barriers between Windows and macOS. Paragon NTFS effectively solves the communication problems between the Mac system and NTFS. Write, edit, copy, move, delete files on... Read more
Slack 4.31.152 - Collaborative communica...
Slack brings team communication and collaboration into one place so you can get more work done, whether you belong to a large enterprise or a small business. Check off your to-do list and move your... Read more

Latest Forum Discussions

See All

Recapping All the Best Drama – The Touch...
In this week’s episode of The TouchArcade Show we recap all the big drama of the week, because drama=clicks baby! I also talk about the new WaterField Magnetic Gaming Case for the Steam Deck, which just arrived in my hot little hands a couple of... | Read more »
TouchArcade Game of the Week: ‘Well Word...
We were already big fans of developer BJ Malicoat, who does business under the name Bird Cartel, due to the release of Pine Tar Poker late last year. Poker is one of those games that kind of is what it is, so it’s always very hard to come up with... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for March 24th, 2023. It turned out to be a fairly busy one today. We’ve got a little news to look at, plus a review from our pal Mikhail. After that, we get into the many new releases... | Read more »
‘Honkai Star Rail’ Release Date Announce...
Last month, Genshin Impact and Honkai Impact 3rd developer HoYoverse began pre-orders and pre-registrations for the upcoming space fantasy turn-based RPG Honkai Star Rail. | Read more »
Tactical Card Battling RPG ‘Black Book’...
Developer Merteshka and publisher HypeTrain Digital just revealed an iOS version of the card battling tactical RPG Black Book . Black Book is available on PC, Nintendo Switch, Xbox One, and PS4 right now. It will be coming to iOS on April 21st with... | Read more »
Clue/Cluedo: Hasbro’s Mystery Game+ Is T...
Clue: Hasbro’s Mystery Game+ from Marmalade Game Studios is this week’s new Apple Arcade release and it is out now alongside some notable updates. Clue: Hasbro’s Mystery Game+ or Cluedo: Hasbro’s Mystery Game+ depending on your region joins the... | Read more »
‘Stakes Winner ACA NEOGEO’ Review – A Ho...
When it comes to the NEOGEO, a few genres come to mind. Fighting games. Side-scrolling action games. Maybe shooters and beat-em-ups. The usual array of sports. You probably don’t think of horse racing games, but this was an arcade platform that was... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for March 23rd, 2023. In today’s article, we kick things off with a couple of reviews. I take a look at Playism and kouri’s Ib, while our pal Mikhail has a look at the latest DLC... | Read more »
Snowbreak: Containment Zone is the lates...
Mobile gaming enthusiasts will soon be able to get their fill of sci-fi shooting, with Amazing Season announcing their upcoming game, Snowbreak: Containment Zone. Pre-registrations are now open for fans, and we also have their first trailer to get... | Read more »
Square Enix’s Card RPGs Voice of Cards:...
Back in late 2021, Square Enix released a new card-based RPG Voice of Cards: The Isle Dragon Roars on PS4, Nintendo Switch, and PC featuring some of the staff behind the NieR and Drakengard games. This included Yoko Taro, Yosuke Saito, Keiichi Okabe... | Read more »

Price Scanner via MacPrices.net

Shop our Apple MacBook Price Trackers for the...
We’ve updated our Apple award-winning MacBook Price Trackers with the latest information on prices, bundles, and availability for 16″, 14″, and 13″ MacBook Pros along with 13″ MacBook Airs from Apple... Read more
Back in stock: M1-powered Mac minis for only...
Apple has restocked clearance M1-powered Mac minis in their Certified Refurbished section starting at only $469. Each mini comes with Apple’s one-year warranty, and shipping is free. The following... Read more
Apple to release updated AirPods Pro 2 with U...
Analyst Ming-Chi Kuo, in his latest post, suggests that Apple will soon release an updated version of AirPods Pro 2 with a new USB-C case, replacing the current case using an Apple Lightning... Read more
16″ M2 Pro MacBook Pros on sale for $150 off...
Apple retailer Expercom has 16″ M2 Pro MacBook Pros in stock today and on sale for $150 off MSRP, valid through March 28, 2023. In addition to their MacBook Pro sale prices, take $50 off AppleCare+... Read more
13-inch M2 MacBook Pros on sale for $100 off...
Expercom has 13″ MacBook Pros with Apple M2 processors in stock and on sale today for $100 off MSRP through March 28, 2023. Shipping is free: – 2022 13″ MacBook Pro M2 CPU/256GB SSD: $1199, save $100... Read more
Amazon is selling Apple’s 24″ M1 iMacs for $2...
Amazon has Apple’s 24″ M1 iMacs on sale for $200 off MSRP. Their prices are currently the lowest available for new iMacs among the Apple retailers we track: – 24″ M1 iMacs (8-Core CPU/7-Core GPU/... Read more
Apple’s 10th-generation 10.2″ iPads are on sa...
Amazon has Apple’s 10th-generation iPads on sale for $50 off MSRP starting at only $399. Their discount applies to all models and all colors. With the discount, Amazon’s prices are the lowest... Read more
Apple 13-inch MacBook Pros are on sale for $1...
Amazon has 13″ MacBook Pros with Apple M2 processors in stock and on sale today for $150 off MSRP. Their prices are the lowest currently available these MacBook Pros. Be sure to purchase from Amazon... Read more
Apple Pro Display XDR with Nano-Texture Glass...
Apple Authorized Retailer Adorama has the Pro Display XDR with Nano-Texture Glass on sale for $500 off MSRP today. Shipping is free: – Apple 27″ Pro Display XDR Nano-Texture Glass: $5499 $500 off... Read more
10-Core M1 Max Apple Mac Studio on sale for $...
Adorama has the base 10-Core M1 Max Mac Studio in stock and on sale today for $1799 including free shipping. Their price is $200 off Apple’s MSRP, and it’s the lowest price available for a new Mac... Read more

Jobs Board

Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Hair Stylist - *Apple* Blossom Mall - JCPen...
Hair Stylist - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Read more
Beauty Consultant - *Apple* Blossom Mall -...
Beauty Consultant - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Sales Floor Associate - *Apple* Blossom Mal...
Sales Floor Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.