Beruflich Dokumente
Kultur Dokumente
What’s an API?
API Documentation: Needs of an expert audience
How to Explain so Experts will Understand Essential API concepts
Organization of API documentation
David Wernick
AlmondWeb Ltd.
tel 02-5712246
david@almondweb.com
http://www.almondweb.com
Configuration
Interface
3 4
1
Typical Documentation Set Topics
5 6
7 8
2
How to Peel a Potato (Expert Version) Reader's Perspective
One of the most nutritious parts of a potato is the
peel. The peel is rich in vitamin B and other nutrients, Novice version Expert version
and it is also the most flavorful part of the potato.
Many people like to eat the peel, and if you're one of Procedural Conceptual
them, you can cook with unpeeled potatoes.
Imperative Advisory
It's true, though, that the peel looks ugly to our
Western eyes, and some people don't like the taste. Less prior knowledge More prior knowledge
Often, too, the peel is dirty and hard to clean. If you
prefer to peel your potatoes, follow this procedure:
1. Grasp the peeler and potato in your hands.
2. Scrape the peel from the potato and expose the
white.
9 10
11 12
3
How to Become an API Expert Topics
13 14
15 16
4
Object Model for Fixing Your Car Car Object
Property Data type Example of property value
Car
Model String “Studebaker”
Owner
Garage Year Integer 1957
Boss
Mechanic Km Long Integer 752,821
17 18
Call methods
19 20
5
Example: a Word Macro Fixing Your Car in XML
Method
Public Sub FindSelectedText()
<FixCar> Car object
Declare variables <Car>
Dim objRange As Range
Dim strText As String <Model>Studebaker</Model>
Create Range obj <Problems>
Set objRange = Selection.Range <Problem>Hood opens when close trunk</Problem>
strText = objRange.Text ...
Call objRange.Collapse(wdCollapseEnd) </Problems>
objRange.Find.Text = strText </Car> Garage object
... <Garage>
objRange.Find.Execute <Name>Jake’s Studebaker</Name>
If objRange.Find.Found Then objRange.Select </Garage>
</FixCar>
End Sub Call methods
21 22
23 24
6
Language of Examples API Reference
25 26
Object Property
Topic Topic
Copyright © Copyright ©
ClickSoftware, Inc. ClickSoftware, Inc.
Used with permission. Used with permission.
27 28
7
Method
Topic
API Documentation:
How to Explain so Experts will Understand
David Wernick
Copyright ©
ClickSoftware, Inc. AlmondWeb Ltd.
Used with permission.
tel 02-5712246
david@almondweb.com
http://www.almondweb.com