# *Docco Viewer*
## Easy Documentation
Jerome Etienne
Who Am I
- coder, speaker, trainer
- Javascript, Node.js, WebGL and other HTML5 games stuff
Learning Three.js
- Author of learningthreejs blog
- Lists of three.js tutorials or "WebGL for dummies"
Contacts
### What is Docco.js
* Documentation for source
* Format dead simple
* often called *Annoted Source*
### Where does it comes from ?
#### Invented by [Jeremy Ashkenas](https://twitter.com/#!/jashkenas)
* Well known for his work
* [backbone.js](http://documentcloud.github.com/backbone/),
[coffeescript](http://coffeescript.org/),
[underscore.js](http://documentcloud.github.com/underscore/)
* He will be at [dotjs](http://dotjs.eu) btw :)
#### Used to doc backbone.js
* see [backbone's doc](http://documentcloud.github.com/backbone/docs/backbone.html)
## *Show, dont tell*
### Example
```
// This is a super comment in markdown. So you can
// put [link](http://example.com)
//
// * or list
// * with bullets
//
// and many other thing
function super(){
console.log("javascript is cool")
}
```
* Comments in [markdown](http://daringfireball.net/projects/markdown/)
* Comments and source presented [side by side](http://documentcloud.github.com/backbone/docs/backbone.html)
### Possible Usage
#### Pro
* Very nice to document short examples
* (like tQuery plugins examples :)
#### Con
* Not too suitable for library code
* Docco isnt aware of the code
* no idea of type/function/class etc...
* For lib, jsdoc provides needed structure
## *So it is perfect already ?*
### Issue with docco.js
* It generate files.
#### Issues
* So you need to *generate them*
* So to *store them*
* Find a location
* use space in repository
* *Keep them in sync* with the code
* or docs and code are desynced
### Issue with docco.js
* It run on servers.
#### Issues
* It *requires installation*
* Several dependancies needs to be met
* Node.js
* Pygments
* CoffeeScript
* and NPM
## *hmm and how to fix those issues ?*
# *Docco Viewer*
## Saving Space and Time
### What is it
* Online Viewer
* Fully compatible with docco
* code on [github](https://github.com/jsinside/docco.js) under MIT license
### Demo
* in practice it is [that](http://jeromeetienne.github.com/tquery/plugins/car/examples/index.html)
* Here is [source](view-source://jeromeetienne.github.com/tquery/plugins/car/examples/index.html)
* Here is the [output](http://jeromeetienne.github.com/tquery/www/vendor/doccoviewer/index.html#../../../plugins/car/examples/index.html)
### Principles
1. Docco viewer is a webapp
1. give it an url
1. it loads the file
1. it parse it with docco.js format
1. display the result immediatly
### Work done
#### Made in javascript
* original in coffee
#### Runable in browser and Server
* original in server only
#### Linkability is maintained
* still able to link directly to the docs
* the viewer webapp get parameters from the url
### What does it changes
#### docs are live
* so always insync
* no need to generate, store, keep insync
#### No installation required
* more standalone / less dependancy
### All that for What ?
#### Easy way to get documentations
#### docs simple and insync
#### Less hasle due to no install
*Now im happy :)*
# *Questions ?*
Jerome Etienne