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

Hazel 5.3 - Create rules for organizing...
Hazel is your personal housekeeper, organizing and cleaning folders based on rules you define. Hazel can also manage your trash and uninstall your applications. Organize your files using a familiar... Read more
Duet 3.15.0.0 - Use your iPad as an exte...
Duet is the first app that allows you to use your iDevice as an extra display for your Mac using the Lightning or 30-pin cable. Note: This app requires a iOS companion app. Release notes were... Read more
DiskCatalogMaker 9.0.3 - Catalog your di...
DiskCatalogMaker is a simple disk management tool which catalogs disks. Simple, light-weight, and fast Finder-like intuitive look and feel Super-fast search algorithm Can compress catalog data for... Read more
Maintenance 3.1.2 - System maintenance u...
Maintenance is a system maintenance and cleaning utility. It allows you to run miscellaneous tasks of system maintenance: Check the the structure of the disk Repair permissions Run periodic scripts... Read more
Final Cut Pro 10.7 - Professional video...
Redesigned from the ground up, Final Cut Pro combines revolutionary video editing with a powerful media organization and incredible performance to let you create at the speed of thought.... Read more
Pro Video Formats 2.3 - Updates for prof...
The Pro Video Formats package provides support for the following codecs that are used in professional video workflows: Apple ProRes RAW and ProRes RAW HQ Apple Intermediate Codec Avid DNxHD® / Avid... Read more
Apple Safari 17.1.2 - Apple's Web b...
Apple Safari is Apple's web browser that comes bundled with the most recent macOS. Safari is faster and more energy efficient than other browsers, so sites are more responsive and your notebook... Read more
LaunchBar 6.18.5 - Powerful file/URL/ema...
LaunchBar is an award-winning productivity utility that offers an amazingly intuitive and efficient way to search and access any kind of information stored on your computer or on the Web. It provides... Read more
Affinity Designer 2.3.0 - Vector graphic...
Affinity Designer is an incredibly accurate vector illustrator that feels fast and at home in the hands of creative professionals. It intuitively combines rock solid and crisp vector art with... Read more
Affinity Photo 2.3.0 - Digital editing f...
Affinity Photo - redefines the boundaries for professional photo editing software for the Mac. With a meticulous focus on workflow it offers sophisticated tools for enhancing, editing and retouching... Read more

Latest Forum Discussions

See All

New ‘Sonic Dream Team’ Performance Analy...
Sonic Dream Team (), the brand new Apple Arcade exclusive 3D Sonic action-platformer releases tomorrow. Read my in-depth interview with SEGA HARDLight here covering the game, future plans, potential 120fps, playable characters, the narrative, and... | Read more »
New ‘Zenless Zone Zero’ Trailer Showcase...
I missed this late last week, but HoYoverse released another playable character trailer for the upcoming urban fantasy action RPG Zenless Zone Zero. We’ve had a few trailers so far for playable characters, but the newest one focuses on Nicole... | Read more »
Get your heart pounding quicker as Autom...
When it comes to mobile battle royales, it wouldn’t be disrespectful to say the first ones to pop to mind would be PUBG Mobile, but there is one that perhaps doesn’t get the worldwide recognition it should and that's Garena’s Free Fire. Now,... | Read more »
‘Disney Dreamlight Valley Arcade Edition...
Disney Dreamlight Valley Arcade Edition () launches beginning Tuesday worldwide on Apple Arcade bringing a new version of the game without any passes or microtransactions. While that itself is a huge bonus for Apple Arcade, the fact that Disney... | Read more »
Adventure Game ‘Urban Legend Hunters 2:...
Over the weekend, publisher Playism announced a localization of the Toii Games-developed adventure game Urban Legend Hunters 2: Double for iOS, Android, and Steam. Urban Legend Hunters 2: Double is available on mobile already without English and... | Read more »
‘Stardew Valley’ Creator Has Made a Ton...
Stardew Valley ($4.99) game creator Eric Barone (ConcernedApe) has been posting about the upcoming major Stardew Valley 1.6 update on Twitter with reveals for new features, content, and more. Over the weekend, Eric Tweeted that a ton of progress... | Read more »
Pour One Out for Black Friday – The Touc...
After taking Thanksgiving week off we’re back with another action-packed episode of The TouchArcade Show! Well, maybe not quite action-packed, but certainly discussion-packed! The topics might sound familiar to you: The new Steam Deck OLED, the... | Read more »
TouchArcade Game of the Week: ‘Hitman: B...
Nowadays, with where I’m at in my life with a family and plenty of responsibilities outside of gaming, I kind of appreciate the smaller-scale mobile games a bit more since more of my “serious" gaming is now done on a Steam Deck or Nintendo Switch.... | Read more »
SwitchArcade Round-Up: ‘Batman: Arkham T...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for December 1st, 2023. We’ve got a lot of big games hitting today, new DLC For Samba de Amigo, and this is probably going to be the last day this year with so many heavy hitters. I... | Read more »
Steam Deck Weekly: Tales of Arise Beyond...
Last week, there was a ton of Steam Deck coverage over here focused on the Steam Deck OLED. | Read more »

Price Scanner via MacPrices.net

Apple has Certified Refurbished iPhone 12 Pro...
Apple has unlocked Certified Refurbished iPhone 12 Pro models in stock starting at $589 and ranging up to $350 off original MSRP. Apple includes a standard one-year warranty and new outer shell with... Read more
Holiday Sale: Take $50 off every 10th-generat...
Amazon has Apple’s 10th-generation iPads on sale for $50 off MSRP, starting at $399, as part of their Holiday Sale. Their discount applies to all models and all colors. With the discount, Amazon’s... Read more
The latest Mac mini Holiday sales, get one to...
Apple retailers are offering Apple’s M2 Mac minis for $100 off MSRP as part of their Holiday sales. Prices start at only $499. Here are the lowest prices available: (1): Amazon has Apple’s M2-powered... Read more
Save $300 on a 24-inch iMac with these Certif...
With the recent introduction of new M3-powered 24″ iMacs, Apple dropped prices on clearance M1 iMacs in their Certified Refurbished store. Models are available starting at $1049 and range up to $300... Read more
Apple M1-powered iPad Airs are back on Holida...
Amazon has 10.9″ M1 WiFi iPad Airs back on Holiday sale for $100 off Apple’s MSRP, with prices starting at $499. Each includes free shipping. Their prices are the lowest available among the Apple... Read more
Sunday Sale: Apple 14-inch M3 MacBook Pro on...
B&H Photo has new 14″ M3 MacBook Pros, in Space Gray, on Holiday sale for $150 off MSRP, only $1449. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8-Core M3 MacBook Pro (8GB... Read more
Blue 10th-generation Apple iPad on Holiday sa...
Amazon has Apple’s 10th-generation WiFi iPad (in Blue) on Holiday sale for $349 including free shipping. Their discount applies to WiFi models only and includes a $50 instant discount + $50 clippable... Read more
All Apple Pencils are on Holiday sale for $79...
Amazon has all Apple Pencils on Holiday sale this weekend for $79, ranging up to 39% off MSRP for some models. Shipping is free: – Apple Pencil 1: $79 $20 off MSRP (20%) – Apple Pencil 2: $79 $50 off... Read more
Deal Alert! Apple Smart Folio Keyboard for iP...
Apple iPad Smart Keyboard Folio prices are on Holiday sale for only $79 at Amazon, or 50% off MSRP: – iPad Smart Folio Keyboard for iPad (7th-9th gen)/iPad Air (3rd gen): $79 $79 (50%) off MSRP This... Read more
Apple Watch Series 9 models are now on Holida...
Walmart has Apple Watch Series 9 models now on Holiday sale for $70 off MSRP on their online store. Sale prices available for online orders only, in-store prices may vary. Order online, and choose... 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
Senior Product Manager - *Apple* - DISH Net...
…Responsibilities** We are seeking an ambitious, data-driven thinker to assist the Apple Product Development team as our Wireless Product division continues to grow Read more
Senior Product Manager - *Apple* - DISH Net...
…Responsibilities** We are seeking an ambitious, data-driven thinker to assist the Apple Product Development team as our Wireless Product division continues to grow Read more
Senior Software Engineer - *Apple* Fundamen...
…center of Microsoft's efforts to empower our users to do more. The Apple Fundamentals team focused on defining and improving the end-to-end developer experience in Read more
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
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.