Items related to Applescript for the Internet

Applescript for the Internet - Softcover

Wilde, Ethan

 
9780201353594: Applescript for the Internet

Synopsis

AppleScript for the Internet: Visual QuickStart Guide is the only title to cover AppleScript in conjunction with the Internet, and it's the only book to cover the PowerPC native version. Written by one of the country's leading Apple Script programmers, this book offers extensive discussion of the latest addons and enhancements plus plenty of insider tips and tricks. It includes complete illustrated scripts along with clear stepbystep instructions and dozens of screenshots. The companion Web site includes even more: downloadable versions of scripts discussed in the book and links to online resources, for example. The book is divided into five parts: Basics-discusses getting started, Apple Scripting the desktop Using the Internet with Apple Script-covers automating a number of email programs and browsers with AppleScript CGI Scripting for the Internet-looks at building CGIsContent Production for the Internet-discusses using certain database, word processing, graphics, and design programs with AppleScript Advanced Techniques-covers debugging, building a Web server monitor, using Marionet, Timbuktu Pro, FaceScan, and more. Author Ethan Wilde lectures frequently about advanced AppleScript technology and the Internet. He is a principle in Meditrope, a SanFranciscobased consulting firm, where his degrees in architecture and architectural history serve him well dealing with clients such as the San Francisco Museum of Modern Art.

"synopsis" may belong to another edition of this title.

About the Author

Ethan Wilde bought his first computer, an Apple II, in 1979 after taking a programming class at San Francisco's Exploratorium science museum. The experience changed his life, and Apple computers have been close to Ethan ever since. Now a principal in Mediatrope, an award-winning multimedia company, Ethan has a whole family of Macs to script and care for, when he is not writing books and giving workshops on AppleScripting.

From the Back Cover

Mac power users have long turned to AppleScript to automate repetitive tasks in apps such as QuarkXPress and FileMaker. But in the past few years, AppleScript has evolved beyond its desktop origins into the second most popular language for CGI development (after Perl). This new focus on the Internet opens a world of possibilities--if you know how to make the most of the latest version of AppleScript. Whatever your prior scripting experience, AppleScript for the Internet: Visual QuickStart Guide will have you adding dynamic features to your Web site and other Internet apps in no time. The book's clear, step-by-step instructions are augmented with sample scripts that you can adapt to your own needs. Want to learn how to use AppleScript to create files and images for your Web site? To manage your mailing list for you? To build a simple custom Web browser? You'll find all this and more in AppleScript for the Internet: Visual QuickStart Guide.

Reviews

AppleScript is actually the second most used CGI scripting language for Internet application after Perl. The Macintosh has always been one of the most reliable and secure machines for web servers, and it has been making an amazing recovery as a popular computer for fast access to the Internet with its iMac series. AppleScript is much more useful on the Mac than Perl; it not only allows the user to manage the CGI but creates seamless access to all data and software on a Mac such as FileMaker Pro as a database server. There are not many books on the market about AppleScript. This book is well written and will circulate.
Copyright 1999 Reed Business Information, Inc.

Excerpt. © Reprinted by permission. All rights reserved.

CGI... ICG... GCI... GIC... do we care where this strange acronym came from? We do. The mysteries of its parent words hold the key to understanding how these Web-enabled scripts work. "Common gateway interface" is the phrase that was coined to describe the manner in which local scripts on a server receive data from an Internet client and return results at the end of their execution. A group of standards describes the way CGIs communicate on each platform. On UNIX, script and server sometimes share data via environment variables. On the Mac, the natural avenue for CGIs is Apple Events, which makes AppleScript a natural choice for handling the passing of data. CGIs on the Mac are often AppleScript script applications or FaceSpan applications. Most Mac Web servers, including WebSTAR and Apple's built-in Personal Web Sharing, are set up out of the box to support the .acgi and .cgi file suffixes to run AppleScript applications that support the standard CGI event handler we're about to meet. Mac OS 8.5 and CGIs A standard event to allow AppleScripts to communicate with Web servers has existed for some time. This event was previously known as on event WWWsdoc. It lacked an English equivalent until OS 8.5 arrived. AppleScript 1.3.x gives us a simple and complete on handle CGI request handler. AppleScript automatically returns server variables to any on handle CGI request handler. With this new handler plus the improvements to speed and language you'll see how easy CGI scripting is in PPC-native AppleScript 1.3.x.4

FaceSpan is often used in creating AppleScript CGIs to take advantage of its built-in FIFO (first in first out) capabilities. When multiple CGI calls are sentto a normal script application, the last person to call the application gets their results first (this is called LIFO, or last in first out). This order of execution isn't desirable in a CGI environment, so it's often worthwhile to save your CGI script applications as FaceSpan stand-alone applications to get FIFO performance.

Save your script as a stay-open application, never showing the startup dialog. When choosing between file suffixes, .acgi is most often is right choice over .cgi. Why? The a in .acgi stands for "asychronous," meaning that the web server will continue to work on other tasks while waiting for the CGI to return results. If you use the .cgi suffix for your CGI, the web server will wait for your CGI to get back to it before doing anything else! Not usually a good thing. Understanding GET data All data that goes to your AppleScript CGI application for processing comes from a Web client, and is submitted to the server using either the GET or POST methods. Forms submitted using the GET method will generate their name-value pairs and add them to the end of the submitted URL. For example, when you submit an HTML form with user-entered data of "John Doe" in the field named "name", the URL sent to the server will have the values of the form filed encoded into it like this: http://www.domain.com/'script.acgi?name=John%20Doe.Figure 11. shows the results returned for this Code 11.1 as a CGI.To parse the URL reply string:

"About this title" may belong to another edition of this title.