Generating Reference Documentation for APIs and SDKs.

Slides:



Advertisements
Similar presentations
Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Advertisements

Windows solution for linux
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Presentation 10 SOAP on the Microsoft Platform (.NET)
Makefiles. makefiles Problem: You are working on one part of a large programming project (e. g., MS Word).  It consists of hundreds of individual.c files.
SE 370: Programming Web Services Week 4: SOAP & NetBeans Copyright © Steven W. Johnson February 1, 2013.
Documentation Generators: Internals of Doxygen John Tully.
CS282.  Doxygen is a documentation generator for ◦ C++, C, C#, Java, Objective-C, Python, PHP, …  Doxygen will document your code according to the “tags”
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
CIS101 Introduction to Computing
Active X Microsoft’s Answer to Dynamic Content Reference: Using Active X by Brian Farrar QUE
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
15-Jul-15 Getting Ready for Java. What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made to.
Platforms, installation, configuration; accessing example collections Course material prepared by Greenstone Digital Library Project University of Waikato,
Doxygen and Javadoc By Derzsy Noemi.
CIS101 Introduction to Computing Week 06. Agenda Your questions Excel Exam during second hour Our status after the snow day Introduction to the Internet.
Topics in Testing Software Documentation [Reading assignment: Chapter 12, pp ]
Doxygen: Source Code Documentation Generator John Tully.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style ADVANCED PROGRAMING PRACTICES API documentation.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CS110/CS119 Introduction to Computing (Java)
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Advanced Tutorial For Version 10.0 and later.
Project Source Code Structure and Build Process ● Remember consistency matters as source code structure, build process, and release processes are all intertwined.
Introducing Dreamweaver MX 2004
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
M.Ellis 17th August MICE Software School Aims Course content –Management –Specifications –Design –Production –Testing –Use Information –Operation.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
CENT 305 Information Systems Security Linux Introduction.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
JavaDoc1 JavaDoc DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY July 24, 2006 by Emil Vassev & Joey Paquet revision 1.2 –
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
Program documentation Using the Doxygen tool Program documentation1.
Program documentation using the Javadoc tool 1 Program documentation Using the Javadoc tool.
IBM Software Group ® Context-Sensitive Help with the DITA Open Toolkit Jeff Antley IBM October 4, 2007.
Javadoc A very short tutorial. What is it A program that automatically generates documentation of your Java classes in a standard format For each X.java.
Dec 3 rd, 2004STC 6 th Annual Conference API Documentation Trends and Opportunities Rajeev Jain
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
29-Nov-15 Getting Ready for Java. 2 What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made.
July Doxygen A Code Documentation System Doxygen generates documentation directly from the structure and comments in the code –Browsable HTML documentation.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Doxygen Documentation
BIF713 Operating System Concepts MS Windows. Agenda 1. What is an Operating System (definition)? 2. Types of Operating Systems 3. Basic Operations: –
Yannick Patois - Datagrid Software Repository Presentation - March, n° 1 Datagrid Software Repository Presentation CVS, packages and automatic.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
1 Doxygen. 2 Doxygen: What is it ? ● A documentation generator – for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL,
Problem Solving With C++ Doxygen Oct/Nov Introduction Doxygen is a documentation generator, a tool for writing software reference documentation.
SharePoint Broken Link Manager
Advanced Programing practices
Doxygen.
Documentation Generators
Doxygen Documentation
Introduction to javadoc
Translation Workspace File Filters
Chapter 27 WWW and HTTP.
SharePoint Broken Link Manager
Advanced Programing practices
Introduction to javadoc
Review of Previous Lesson
SPL – PS1 Introduction to C++.
Presentation transcript:

Generating Reference Documentation for APIs and SDKs

The Ultimate in Single Sourcing Manuel Gordon

Generating Reference Documentation for APIs and SDKs Manuel Gordon Worked in computers for 25+ years Programmer: statistics, MIS, graphics Professor of Computer Science at Vanier College High-tech and business journalism High-tech corporate communications Teaching and training: McGill, Concordia, U of T, corporate clients Past president of STC Montreal chapter Technical writing consultant since 1990

Generating Reference Documentation for APIs and SDKs Co-Author Is Absent Today Greg Rakauskas, Veritas Software

Generating Reference Documentation for APIs and SDKs What’s Ahead What are APIs and SDKs, anyway? Documentation Generation Programs (DGPs) —JavaDoc —DOC++ —doxygen A DGP success story A Taste of doxygen One Commercial Package —Document! X Questions, answers?, and comments!

Generating Reference Documentation for APIs and SDKs What is an API? Application Programming Interface Greg’s definition: —A set of functions (or methods) that a program exposes to enable other programs to communicate with it. Manny’s definition —An interface used by programmers to build applications on top of your system —Consists of function declarations —Not a GUI!

Generating Reference Documentation for APIs and SDKs Where APIs Fit in THEIR APPLICATION OUR SOFTWARE THEIR APPLICATION OUR SOFTWARE OUR API

Generating Reference Documentation for APIs and SDKs What is an SDK? Software Development Kit —One or more documented APIs, packaged as a product SDK includes: —Libraries + —APIs (may be embodied by header files) + —Sample programs + —Documentation “No documentation, no SDK!”

Generating Reference Documentation for APIs and SDKs SDK Documentation Developer’s Guide —Overview & description —Installation procedure SDK requirements (OS, patches) Environment set up (compilers, libraries) —How to write applications using the API Usually based on code samples Reference Manual —For each function: Description Parameters Return codes or values Notes etc.

Generating Reference Documentation for APIs and SDKs Examples of SDKs HTML Help 3.1 APIs — default.asp?url=/library/en-us/htmlhelp/ html/vsconHH1Start.asp Java Development Kit (JDK) — Windows SDK and.NET Enterprise Server SDKs — sdkintro/contents_49d7.asp?frame=true

Generating Reference Documentation for APIs and SDKs SDK Documentation: Greg’s Example

Generating Reference Documentation for APIs and SDKs SDK Documentation: Audience Software developers Know a lot about their application Know little about your API —And often care less! Want sample programs

Generating Reference Documentation for APIs and SDKs What Are DGPs? Documentation Generation Programs (Greg’s neologism) Programs that parse source code for embedded tags and comments Output comments into various formats such as HTML, LaTeX, RTF You can add one to the build script for your product, to automatically generate Reference Manual. Usually not very good for Developer’s Guide.

Generating Reference Documentation for APIs and SDKs DGP Output Examples— JavaDoc

Generating Reference Documentation for APIs and SDKs Doc++

Generating Reference Documentation for APIs and SDKs The Good News about DGPs Ideal for documenting public APIs for groups that must use each other’s code Ideal for high-volume, low-polish documentation Documentation source physically located next to code, as comments Easy to change documentation when code changes Many global changes to source code automatically update the doc Both developers and writers can modify the reference documentation

Generating Reference Documentation for APIs and SDKs The Bad News Ownership can be unclear Tweaking output format often required Your developers may not write well in English Perception of extra work for developers Incorrect information: quality control can be a problem

Generating Reference Documentation for APIs and SDKs In Balance, a “Win/Win” Situation Greater incentive for developers to comment code Accurate reference information: —Smaller communication gap —Automatic update Writers can put more focus on code samples, Developer’s Guide

Generating Reference Documentation for APIs and SDKs Sample Doc++ Output

Generating Reference Documentation for APIs and SDKs Sample Doc++ Input (in Source Code) /**Call this method to set all trap PDU information except * variable bindings. bstrEnterprise [in] Type of object generating the trap.... * * SIG_S_OK * The operation succeeded. * SIG_E_OUTOFMEMORY * Ran out of memory. * */ sig_result CTrapPdu::SetV1TrapInfo( const char* pEnterprise, TrapType genericTrap, sig_uint32 specificTrap, sig_uint32 timeStamp, const char* pAgentAddr )

Generating Reference Documentation for APIs and SDKs The DGP Routine

Generating Reference Documentation for APIs and SDKs JavaDoc Part of Java Development Kit —Now Java 2 Platform, Standard Edition (J2SE TM ) Output looks like Sun’s own SDK documentation Available at:

Generating Reference Documentation for APIs and SDKs A DGP Success Story An SDK now called Vortex and Karma —Rigid-body dynamics —Collision detection Developed at a company now called Critical Mass Labs... — And at MathEngine plc —

Generating Reference Documentation for APIs and SDKs Vortex Helps Simulate Realistic Physical Behavior You can download great demos...

Generating Reference Documentation for APIs and SDKs Beta Documentation Folders of HTML Reference documentation generated from doxygen pdf files of How-To documentation generated from FrameMaker files Many sample programs Presented in HTML frameset

Generating Reference Documentation for APIs and SDKs Alpha Documentation Developed from zero in five weeks Looks surprisingly like the Beta —Beta shipped nine months later —Many, many, many changes, major and minor, in the SDK —Several Alpha versions of SDK, usually including revised documentation

Generating Reference Documentation for APIs and SDKs Summary of a Success Story We produced hundreds of pages of documentation—really fast. Tech writers did not write or copy-edit one line of reference doc —We had to muddle through with programmers with graduate degrees from Oxford University...

Generating Reference Documentation for APIs and SDKs Thunderous Applause In a review, our Alpha documentation was rated higher than our competitors Gold: “MathEngine's documentation is the best of the three packages. The manual is very thorough with both a user's guide and complete reference to all the classes in the architecture.” –Gamasutra.com and Game Developer Magazine

Generating Reference Documentation for APIs and SDKs Necessity Was the Mother There was no alternative to generating documentation Both MathEngine and Critical Mass Labs are still going strong with the product!

Generating Reference Documentation for APIs and SDKs Why We Chose doxygen We did a quick comparison between doxygen and DOC++ —DOC++ looked tidier —doxygen gave more useful info doxygen actually a company standard! —Not that we knew that when we started...

Generating Reference Documentation for APIs and SDKs Let’s Look at doxygen Free documentation system Open-source —GNU General Public License

Generating Reference Documentation for APIs and SDKs doxygen Features Documents C, C++, Java, IDL (Corba, COM/ActiveX, other) Generates or supports —HTML —latex —RTF (MS-Word) —Postscript —hyperlinked PDF —compressed HTML —man pages (Unix).

Generating Reference Documentation for APIs and SDKs doxygen Can Document Undocumented Source Files! Can extract the code structure from undocumented source files. Shows relations between the various elements (functions, typedefs, structs, etc.) as hyperlinks Can generate inheritance diagrams and other diagrams

Generating Reference Documentation for APIs and SDKs Dimitri van Heesch’s Log 1985: Got my first computer: a Commodore 64! 1989: Got my second computer: an Amiga /1992: Started studying Computer Science at the Technical University in Eindhoven. 10/1997: Released version 0.1 of doxygen 11/1997: Accepted a job at Philips Research in the field of software architecture for embedded systems.

Generating Reference Documentation for APIs and SDKs A Unix-Flavored Tool Supports many flavors of Unix Long descriptions of how to compile on various Unix flavors For Windows (until recently) : —“There is no fancy installation procedure at the moment (If anyone wants to add it please let me know). —“To install doxygen, just copy the binaries from the bin directory to a location somewhere in the path[, or] include the bin directory of the distribution to the path. ”

Generating Reference Documentation for APIs and SDKs Coding doxygen Comments /** * The body's position vector is returned in p. * The position is of the bodies * center of mass, and is given in the * world reference frame. */ void MEAPI MdtBodyGetPosition (const MdtBodyID b, MeVector3 p) { MdtCHECKBODY(b,"MdtBodyGetPosition"); MeVector3Copy( p, b->bodyTM[3]); }

Generating Reference Documentation for APIs and SDKs Viewing Generated Doc void MEAPI MdtBodyGetPosition ( MdtBodyID b, MeVector3 p ) The body's position vector is returned in p. The position is of the bodies center of mass, and is given in the world reference frame.

Generating Reference Documentation for APIs and SDKs Generating a doxyfile doxygen has a command-line interface To generate a doxyfile (.ini file): doxygen -g yourdoxyfile

Generating Reference Documentation for APIs and SDKs Raw doxyfile with comments # The PROJECT_NAME tag is a single word (or a # sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = # The OUTPUT_DIRECTORY tag is used to specify # the (relative or absolute) base path where # the generated documentation will be put. # If a relative path is entered, it will be # relative to the location where doxygen was # started. If left blank the current directory # will be used. OUTPUT_DIRECTORY =

Generating Reference Documentation for APIs and SDKs Some Keywords We Used PROJECT_NAME = "MathEngine Dynamics Toolkit” OUTPUT_DIRECTORY =../release INPUT =../../Mst/include \../../Mst/src FILE_PATTERNS = *.h *.c *.hpp *.cpp HTML_OUTPUT = simulation_ref HTML_HEADER = MeReferenceHeader.htm HTML_FOOTER = MeReferenceFooter.htm HTML_STYLESHEET = MeDoxygen.css

Generating Reference Documentation for APIs and SDKs Generating Reference Doc To generate doxygen output: doxygen yourdoxyfile Output consists of HTML files in the output directory specified in doxyfiles

Generating Reference Documentation for APIs and SDKs Generating a Documentation Set Use batch files, command files, or (best of all) makefiles: all: doxygen Doxyfile1 doxygen Doxyfile2 cp -a here there cp -a also_here there rm -rf there/crap rm -rf there/also_crap clean: rm -rf there

Generating Reference Documentation for APIs and SDKs Related Technologies doxygen is written in, and available in, Perl: — GNU tools, such as make: — —For a Windows version, see

Generating Reference Documentation for APIs and SDKs UNIX Culture and Open Source Culture Bring Benefits “If you are using Microsoft's Developer Studio... DoxBar [can] run doxygen from within Developer Studio.” “Pascal Binggeli is working on an integrated development environment for Doxygen called DoxygenStudio. It will be for Windows only.” “If VIM is your favourite editor (it is mine!), then Ralf Schandl has a some macros and syntax highlighting files for you.” “If you are using the Emacs editor, take a look at Tom Emerson's page for a lisp script to simplify writing doxygen comments.” “VXL project produced some code to manage documentation production for multiple doxygen runs over 10s of libraries...” —

Generating Reference Documentation for APIs and SDKs Even Technical Writers Get Into The Act “Glenn Maxey has released has released The TechPubs Tools (TPT) which wraps around any number of mini-HTML systems and creates a comprehensive HTML system complete with table of contents and an auto-generated index/concordance.” — “[D]ownload (1.8 MB). Unzip and launch tp_tools/_start_here.html... “The docs are at ***ALPHA*** level. Since cranking them out in a hurry over Christmas, I've discovered many embarrassing mistakes for a tech writer.” —Glenn Maxey, , May

Generating Reference Documentation for APIs and SDKs What about Commercial Packages? “We chose [Document! X from Innovasys] because it provides.NET and MSHelp2 support AND because it lets us work in very flexible ways with the documentation generation.” “Using Document! X, we can use [developers’] information when appropriate, and override their information with our own writing where we think it's best.” —Lydia Wong, posted May 3, 2002

Generating Reference Documentation for APIs and SDKs I May Do Windows, But I Don’t Do perl! “[Many technical writers will] look at a tool with lots of programmer-y interfaces and say, ‘no way—I'm a writer, not a programmer.’ I think Document X fits us well in part because of this.” —Lydia Wong May 5, 2002

Generating Reference Documentation for APIs and SDKs Where Do I Get More Information? Here is an incomplete list of DGPs: — For a discussion group on APIs and SDKs: — —Low volume, high quality —Lydia and Glenn are frequent contributors

Generating Reference Documentation for APIs and SDKs Questions? Discussion! Manuel Gordon