SlideShare ist ein Scribd-Unternehmen logo
1 von 60
Downloaden Sie, um offline zu lesen
API Doc Smackdown

YUI Doc versus JS Doc Toolkit
Monday, September 14, 2009 - 2:25-3:25p
API Doc Smackdown

The Yahoo UI (YUI) Library is well known for its excellent documentation. One
of its secrets is YUI Doc, a Python application used at build time to generate
API documentation for JavaScript code.

But is YUI Doc really better than JS Doc Toolkit? -- an elder application, written
in JavaScript, that also generates API documentation. When should you
choose one over the other? Which is the better choice for your project?

In this session you will learn:

* How API generators work, and how documentation helps;
* When to use YUI Doc and when to use JS Doc Toolkit;
* More about alternatives to comment-based documentation.
http://www.slideshare.net/ted.husted
Old School

push RA ; push register A to retain the subtotal
pop RB ; pop register B to recall the total
Source Code Stakeholders

 Solution Architects
 Product Managers
 QA Engineers
 Maintenance Engineers
 Customers
Why not doc?

 Embedded comments clutter up the code
 External document is difficult to synchronize
http://java.sun.com/j2se/javadoc/writingdoccomments/
http://java.sun.com/j2se/javadoc/writingdoccomments/
http://www.j2ee.me/javase/7/docs/api/index.html?overview-summary.html
Some IDEs with API Doc Support

 Eclipse              Visual Studio
 Aptana (ScriptDoc)   Resharper for VS
                      IDEA IntelliJ




Any others?
http://ndoc.sourceforge.net/
http://sandcastle.codeplex.com/
http://www.codeplex.com/DocProject
http://en.wikipedia.org/wiki/Comparison_of_documentation_generators
http://www.phpdoc.org/
http://rdoc.rubyforge.org/
http://www.birt-exchange.org/documentation/JavaComponents10/JSAPI-JSdoc/
http://developer.yahoo.com/yui/docs/
http://developer.yahoo.com/yui/yuidoc/
http://developer.yahoo.com/yui/yuidoc/
http://developer.yahoo.com/yui/yuidoc/
http://developer.yahoo.com/yui/yuidoc/
http://developer.yahoo.com/yui/yuidoc/
http://developer.yahoo.com/yui/yuidoc/
YUI Doc Pros and Cons

Pros                       Cons
   Concise set of tags       YUI specific idioms
   Used by YUI library       Overshadowed by YUI
   supported by YUI Team     Small community
http://developer.yahoo.com/yui/yuidoc/
http://code.google.com/p/jsdoc-toolkit/
http://code.google.com/p/jsdoc-toolkit/w/list
http://code.google.com/p/jsdoc-toolkit/w/list
http://code.google.com/p/jsdoc-toolkit/
http://code.google.com/p/jsdoc-toolkit/
http://docs.jproton.com.br/
http://lib.metatype.jp/madtemplate/
http://projects.vinces.ca/jsdocs/
http://code.google.com/p/jsdoc-toolkit/wiki/Templates
http://code.google.com/p/jsdoc-toolkit/wiki/Templates
http://code.google.com/p/jsdoc-toolkit/wiki/Templates
http://developer.yahoo.com/yui/yuidoc/#custom
D:optYahooyuidoc_1.0.0b1yuidoctemplatemain.tmpl
JsDoc Toolkit Pros and Cons

Pros                       Cons

  Deep and broad tab set     Sketchy documentation
  Used by many projects      Lacks "anchor" project
  Well supported             Sole developer
Time for a Test Drive ...
Installing YUI Doc
 Python 2.5
    C:Python25

 SetupTools
     $python_homeScriptseasy_install* (executables)
 .> easy_install pygments
 .> easy_install simplejson
 .> easy_install cheetah

 YUI Doc Distribution
   bin/example.bat
   bin/example.sh
http://python.org/download/releases/2.5.4/
python-2.5.4.msi
http://pypi.python.org/pypi/setuptools
setuptools-0.6c9.win32-py2.5.exe
1.   easy_install pygments
  2.   easy_install Cheetah
  3.   easy_install simplejson




C:Python25Scriptseasy_install
c:optyahooyuidoc_1.0.0b1yuidocbinexample.bat
c:optyahooyuidoc_1.0.0b1yuidocbinexample.bat
Installing JsDoc Toolkit

   Java 1.5 or 1.6
   JsDoc Distribution
      app
      conf
      java
      templates
   > java -jar jsrun.jar apprun.js
       -a -t=templatesjsdoc
       -r app/frame.js appframe app/handler
   out/jsdoc
        index.html
        files.html
        symbols

http://code.google.com/p/jsdoc-toolkit/
file:///D:/opt/GoogleCode/jsdoc_toolkit-2.3.2/jsdoc-toolkit/out/jsdoc/index.
YUI Doc vs JsDoc Toolkit

YUI Doc Pros                YUI Doc Cons
  Concise set of tabs         YUI specific idioms
  Used by YUI library         Overshadowed by YUI
  Supported by YUI Team       Small community

Js Doc Pros                 Js Doc Cons

   Deep and broad tag set     Sketchy documentation
   Used by many projects      Lacks "anchor" project
   Well supported             Sole developer
http://dojodocs.uxebu.com/
http://scriptdoc.org/
Style Guide
   Use <code> style for keywords and name
   Use in-line links economically
   Omit parentheses for the general form of methods and
   constructors
   Okay to use phrases instead of complete sentences, in the
   interests of brevity.
   Use 3rd person (descriptive) not 2nd person (prescriptive)
   Method descriptions begin with a verb phrase.
   Class/interface/field descriptions can omit the subject and
   simply state the object.
   Use "this" instead of "the" when referring to an object
   created from the current class.
    Use "this" instead of "the" when referring to an object
   created from the current class.
   Avoid Latin.
http://code.google.com/p/jsdoc-toolkit/
Please complete
 an evaluation.
Questions?




http://www.slideshare.net/ted.husted

Weitere ähnliche Inhalte

Ähnlich wie API Doc Smackdown

Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzatiTesting in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Alfredo Morresi
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTP
nsandonato
 
JavaScript Tools Overview
JavaScript Tools OverviewJavaScript Tools Overview
JavaScript Tools Overview
Scott Povlot
 
Novice Programmers Workshop
Novice Programmers WorkshopNovice Programmers Workshop
Novice Programmers Workshop
Alec Clews
 

Ähnlich wie API Doc Smackdown (20)

Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzatiTesting in Android: automatici, di integrazione, TDD e scenari avanzati
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
 
Understanding Technologies - Presentation for College Students
Understanding Technologies - Presentation for College StudentsUnderstanding Technologies - Presentation for College Students
Understanding Technologies - Presentation for College Students
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Scripting in OpenOffice.org
Scripting in OpenOffice.orgScripting in OpenOffice.org
Scripting in OpenOffice.org
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015
 
Creating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTPCreating Custom Dojo Widgets Using WTP
Creating Custom Dojo Widgets Using WTP
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and Libraries
 
Boquet manager
Boquet managerBoquet manager
Boquet manager
 
opps.pptx
opps.pptxopps.pptx
opps.pptx
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended Resources
 
Le Tour de xUnit
Le Tour de xUnitLe Tour de xUnit
Le Tour de xUnit
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
JavaScript Tools Overview
JavaScript Tools OverviewJavaScript Tools Overview
JavaScript Tools Overview
 
Novice Programmers Workshop
Novice Programmers WorkshopNovice Programmers Workshop
Novice Programmers Workshop
 
The JavaScript Revue: Patterns & Frameworks
The JavaScript Revue: Patterns & FrameworksThe JavaScript Revue: Patterns & Frameworks
The JavaScript Revue: Patterns & Frameworks
 
Spring roo for entrepreneurs
Spring roo for entrepreneursSpring roo for entrepreneurs
Spring roo for entrepreneurs
 

Mehr von Ted Husted

Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011
Ted Husted
 
Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010
Ted Husted
 
Drupal kickstart-workshop
Drupal kickstart-workshopDrupal kickstart-workshop
Drupal kickstart-workshop
Ted Husted
 

Mehr von Ted Husted (19)

Ship It!
Ship It!Ship It!
Ship It!
 
.NET @ apache.org
 .NET @ apache.org .NET @ apache.org
.NET @ apache.org
 
The secret life_of_open_source
The secret life_of_open_sourceThe secret life_of_open_source
The secret life_of_open_source
 
Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011Open Source Secret Sauce - Lugor Sep 2011
Open Source Secret Sauce - Lugor Sep 2011
 
NU FaceBook 101 JCC 2010
NU  FaceBook 101 JCC 2010NU  FaceBook 101 JCC 2010
NU FaceBook 101 JCC 2010
 
Developing java Web Applications Using Google Apps RJUG 2011
Developing java Web Applications Using Google Apps RJUG 2011Developing java Web Applications Using Google Apps RJUG 2011
Developing java Web Applications Using Google Apps RJUG 2011
 
Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010Open source secret_sauce_apache_con_2010
Open source secret_sauce_apache_con_2010
 
Drupal kickstart-workshop
Drupal kickstart-workshopDrupal kickstart-workshop
Drupal kickstart-workshop
 
Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010Open source-secret-sauce-rit-2010
Open source-secret-sauce-rit-2010
 
Agile Analysis with Use Cases: Balancing Utility with Simplicity
Agile Analysis with Use Cases: Balancing Utility with SimplicityAgile Analysis with Use Cases: Balancing Utility with Simplicity
Agile Analysis with Use Cases: Balancing Utility with Simplicity
 
Testing Web Application Security
Testing Web Application SecurityTesting Web Application Security
Testing Web Application Security
 
Testing The Testers
Testing The TestersTesting The Testers
Testing The Testers
 
Testing Ajax Applications
Testing Ajax ApplicationsTesting Ajax Applications
Testing Ajax Applications
 
Testing Ajax Web Applications
Testing Ajax Web ApplicationsTesting Ajax Web Applications
Testing Ajax Web Applications
 
Testing Tools
Testing ToolsTesting Tools
Testing Tools
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Open Source Secret Sauce
Open Source Secret SauceOpen Source Secret Sauce
Open Source Secret Sauce
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

API Doc Smackdown