Developing a Whitebeam Application

Site Map
 
Home
 
Application Guide
  Quick Start
    Introduction
    Application
    Administration
    Source
    Structure
    Forms Data
    Sessions
    Access Ctrl
    Templates
    Files
    Debug
    File Loc
    Hints+Tips
  PHP and ASP
  Writing Apps
  Applications
  Tutorials
  Samples
Reference
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Developing a Whitebeam Application

Debug Support

As with every software design the key to easy debugging of a Whitebeam application is to get the application design complete before committing to write any code. Server-side JavaScript is generally much simpler than Client JavaScript: there are no version issues, no browser compatibility issues, DOM or event handling issues to worry about. However - some bugs will still appear in the server-side application. The Whitebeam system provides several facilities to make it easier to find these faults.

First and foremost is the 'test instance' - a complete shadow of the main site that is however independent. You can use this both to debug new versions of applications and to debug issues found in the field. The test instance is distinguished from the operational application in the following ways:

  • Accessed through a separate URL.
  • Uses a separate set of 'test' data in the templates - the live data can be copied to test area in order to seed the data.
  • The Presentation Engine is more thorough in testing the application and will detect mark-up errors in the page that are ignored in the operational site.
  • If an error is detected - the output from the page is discarded and a debug report produced instead.

In the test instance of the site all errors are reported to the requesting browser - these could be JavaScript errors, run time errors or template interfacing errors (e.g. a value out of range).

To help narrow down bugs - the presentation engine provides a debug output facility: rb.debug.write. Basically this allows the implementor to record debug messages -for example intermediate values. This messages are discarded if the page generates no errors. If errors are detected then the contents of the debug buffer are added to the output stream sent to the browser. Alternatively the debug output can be manually inserted into the output stream using the <rb:insertdebug...>.

In production mode all error reporting is suppressed (apart from web server standard 404 page not found etc. errors). If a run-time error is encountered by the Presentation Engine it ignores it and carries on parsing the Pattern page sending the potentially incomplete page back to the requesting browser.

Whitebeam release 1.3.36
(loadtime : 13ms)