Documentation is a critical step in creating maintainable code. It's often burdensome on developers and becomes a neglected. JavaScriptMVC's integrated documentation makes it easy to document JavaScript.
Before creating the docs, put your app back in development mode:
<script type='text/javascript'
src='../steal/steal.js?cookbook,development'>
</script>Create the docs by running:
> documentjs/doc cookbook/cookbook.htmlIn fact, you've already created documentation!
Open cookbook_doc.html (in your root directory) and click RecipeController and then Recipe:

Open recipe_controller.js:
/**
* @tag controllers, home
* Displays a table of recipes. Lets the user
* ["RecipeController.prototype.form submit" create],
* ["RecipeController.prototype..edit click" edit],
* or ["RecipeController.prototype..destroy click" destroy] recipes.
*/
jQuery.Controller.extend('RecipeController',
/* @Static */
{
onDocument: true
},
/* @Prototype */
{
/**
* When the page loads, gets all recipes to be displayed.
*/
load: function(){
if(!$("#recipe").length)
$(document.body).append($(document.createElement('div')).attr('id','recipe'))
Recipe.findAll({}, this.callback('list'));
},You'll notice that the syntax for documentation is very similar to JavaDoc. However, there are some important differences. Consult the [include.Doc Documentation documentation] for more information.
In the context of this trivial application, you've been exposed to major tenets of JavaScriptMVC: code separation, testing, compression, and documentation. This is pretty cool! Look at how simply you went from nothing to a compressed, tested, and documented application.