CommonSpot's Use of the Command API

CommonSpot itself uses the Command API extensively. You can easily view the commands that the CommonSpot user interface calls, and see the data that is being returned.

The Firebug add-on for Firefox is an excellent way to see the commands that CommonSpot sends in response to user actions. This can be helpful when you are debugging a problem. It also provides live examples of real-world API usage.

To see the command request and responses, start Firebug and enable the Net Panel.

Next, just reload the page. After you click on the XHR submenu, Firebug displays the AJAX requests that CommonSpot makes.

Clicking the '+' icon on the left expands the request so that it shows Params, Header, Post, Response, and XML tabs. Click the Post tab to see the XML command collection that CommonSpot posts. The Response and XML tabs show the information CommonSpot sends back to your browser.

In recent versions of Firebug, you can also show ajax activity on the Console tab. To do this, click the menu on the Console tab itself, and check the 'Show XMLHttpRequests' menu item.

Note: Be aware that leaving Firebug open while working in CommonSpot can affect javascript performance. CommonSpot makes many ajax calls, and does a lot of DOM manipulation, both of which incur significant overhead with Firebug running. You can use it (we use it at PaperThin during development), but it will slow you down.