|
|||||||||||||||||||
|
![]() | |||||||
![]() | |||||||
Keynote, Apple's cutting-edge presentation application, is very popular with people who value its ease of use, its streamlined interface, and its superior templates and transitions. What you may not know is that Apple engineers were also thinking of you, the developer, when they designed Keynote. They decided to store Keynote presentations in an open XML format called APXL, a choice that gives you opportunities to create products that interact with Keynote. If you write applications for business professionals, educators, or others who rely on presentation software, you should know how to use APXL to leverage Keynote's display capabilities. This article tells you how. Creating APXL Files
At the heart of the Keynote presentation file is the Granted, when you look at a Keynote file, you don't see anything named As with any XML file, an APXL file consists of a series of elements, each of which may or may not include text inside it. For example, in the XML snippet below, the line marked "<!-- 2 -->" is an image element. This element has two attributes,
The structure of an APXL file is too complicated to examine here, but Apple Technical Note TN2067 lists the XML Schema file that defines the syntax of an APXL file. In addition, Apple Technical Note TN2073 describes how to create the slide-list element (as shown in the listing above), which is the main task in creating an APXL file. Once you understand how the elements in an APXL file combine to create a Keynote presentation with the desired appearance and behavior, the process of creating a The XML snippet shown above is a very small section of the The Java snippet below, taken from PictureShow.java but simplified somewhat for clarity and brevity, shows one way that a computer program can generate an APXL file. Note the tags, labeled 1 through 5, in both the XML and Java snippets, that help you keep track of which lines of Java code produces which lines of XML content.
This code creates a blank slide (1), inserts an image element representing the file Keynote Advantages
Keynote is a powerful application with many features that its customers enjoy. In the context of this article, however, the following capabilities are of particular interest:
Why are these capabilities of interest to you as a developer? The answer is this: Because Keynote uses an open, easily accessible file format, you can tap into the world of Keynote from within your own programs. By making Keynote part of software solutions that you create, you can offer your customers new, powerful solutions that would otherwise be impossible. This is especially true if you provide custom software solutions for vertical markets. If you develop commercial software, you may be able to find ways to use Keynote to enhance existing products or create new ones. For example, the Omni Group has enhanced its OmniOutliner outlining application by enabling it to import and export Keynote presentations, a move that makes its product more attractive to Macintosh users who also own Keynote. Making Keynote Work for You
Before you decide what developer opportunities exist for you, it is instructive to consider the most effective uses of a Keynote presentation. Once you know that, you can better gauge the usefulness of any proposed Keynote-related software you might create. Consider what a presentation is and why it exists. It presents a series of slides, each containing such items as text (usually as a list of bulleted items), tables of information, and graphics. Because each slide can contain only a limited amount of information, you must choose the contents of each slide carefully. Some slides contain the entirety of a body of information that would be difficult to convey verbally, while others summarize the main points of a more detailed verbal presentation. A presentation exists to convey key information, usually simultaneously, to multiple people—that is, you usually don't create a presentation unless you have information that you need to show to others. Finally, more often than not, the purpose of a presentation is to persuade more than it is to inform. Given these observations (plus any others you may care to add), you should ask yourself, "What kinds of data do my products handle, and can any of them benefit from being delivered as a presentation?" In most cases, your products will not exclusively deliver its data as presentations, but for some data and for some situations, your product's end user will greatly value your its ability to automatically deliver data as a presentation. Here are some questions that may help you see how you can use Keynote to make your product more effective:
Developer Opportunities
Now that you have Keynote's strengths in mind, you can begin to look for opportunities that makes sense for you and your company. Depending on your situation, one or more of the sections immediately below may apply. Vertical Solutions
If your company creates custom software solutions to solve a particular customer's problem, you may find several ways to use Keynote. You may use scripting language—the main contenders, Perl and Python, are conveniently shipped as part of Mac OS X—to gather data from several sources, or you may do all of your work within a "traditional" compiled programming language. In either case, your solution can package the appropriate data as a Keynote presentation. Because of Keynote's extensive exporting options, you can deliver the required data to interested parties in one of several platform-independent formats. Database Integration
If your product stores key data in a database, you may find that you can use Keynote to display high-level, overview, or otherwise key data to its intended audience. When done properly, the data in a Keynote presentation is persuasive, professional, and easily accessible. The main factor in using Keynote to its best advantage is to use it only where it will display the right data to the right customer in the right format under the right circumstances. 4D, Inc. shows the potential of Keynote in its 4D Keynote Builder sample program. This program is a custom solution, built entirely in the 4D database language, that helps a hypothetical real estate agent to sell houses. The agent fills out a form that asks for certain characteristics of the desired house (maximum price, number of bedrooms, etc.). This program then simulates querying a "live" database of available houses and builds a Keynote presentation based on the desired criteria. The presentation, personalized with the client's name, displays a series of slides, each one showing a photograph of and information about a house that meets the client's criteria. When you realize that the real estate agent can create such custom presentations within a minute or two of typing in a few key numbers, you begin to see how Keynote, when properly used, can deliver impressive results. If your application uses a database, it almost certainly produces reports of some kind. You may find that Keynote presentations provide a rich medium for presenting certain reports in a useful and innovative way. Enhancing Existing Applications
The 4D Keynote Builder program gives a good example of how Keynote can enhance a vertical-solution product. Keep in mind, though, that some off-the-shelf applications can also benefit from displaying key data using Keynote. For example, a project management program could export current status data to a Keynote presentation; to make the customer's life a bit easier, it could even generate the report automatically, in time for the project's daily status meeting. If you look over the questions in the "Making Keynote Work for You" section, you may well find some way to use Keynote that will significantly enhance your application's value to its customers. Other Opportunities
Macintosh developers are a creative group of people who always find ways to create useful, innovative products that leverage Apple's own products. This situation will certainly repeat itself with Keynote. Keynote themes (presentation templates) are already a hot market for a few third-party developers, and others among you will find profitable niches within the Keynote ecosystem. Here are some ideas to get you started:
Getting Started
If you're interested in creating a Keynote-related product or adding Keynote support to an existing one, the path for doing so is straightforward: First (if you haven't already), learn the basics of XML. XML is finding its way into more and more projects, so achieving some level of XML literacy is probably a good idea anyway. Books and websites about XML abound, so you should have no trouble finding the materials you need. The first part of the "For Further Information" table at the end of this article also gives you some suggestions on where to start. You may also want to investigate XSLT, an XML "language" for manipulating XML data. Second, learn the APXL format. The key documents here are Apple Technical Notes 2067 and 2073; see the table below for details. One Apple engineer reports that a good way to start learning APXL begins with you creating a simple, one-slide Keynote document. Examine its APXL code, then start adding to the code to learn how various APXL features work. Third, decide what XML tool set you will use. Several such tools exist, but you should start by looking at the XML parsers and XSLT processors provided by the Apache and Gnome projects. See the second part of the table at the end of this article for details. Fourth, get creative and start programming! For Further Information
The following table lists various resources of interest, including those mentioned earlier in this article.
|