View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Toolbar
{zone-data}

{zone-data:proposer-list}
Lead: [Ben Scholzen|mailto:mail@dasprids.de]
Contributor: [Christoph Dorn|mailto:christoph@christophdorn.com]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 11 June 2009: Initial Draft.
{zone-data}

{zone-data:overview}
Zend_Toolbar is a component which provides the developer with enhanced debugging functionallity. Inspired by the Scienta ZF Debug plugin, it provides you with useful information about the current request.

Instead of printing out the information as plain HTML, Zend_Toolbar exposes the debug information via headers, and displays them via a Firefox extension at the bottom of the browser. This gives you two major advantages; First, you can debug non-HTML responses (like JSON, generated images and so on). Second, you are able to debug requests in production environment without disturbing other users.

For allowing production debugging, the Zend_Toolbar Firefox extension allows to define hostnames and paths to debug, and let you provide a password, so unauthorized users will not get any debug information via the headers.

Prototype of the Toolbar in Firefox 3.0:
!zend_toolbar.png!
{zone-data}

{zone-data:references}
* [Scienta ZF Debug|http://jokke.dk/blog/2009/01/introducing_the_scienta_zf_debug_bar]
{zone-data}

{zone-data:requirements}
* This component *will* only support Firefox 3 and up (does anyone want to write an IE equivalent extension?).
* This component *will only* display the toolbar when the user is authorized and debug information are available
* This component *must* be backward compatible (e.g. a toolbar extension v2.0.0 should be able to display information from a 1.9.0)
* This component *will* allow authorization via hostname/path prefixes (password only)
* This component *will* allow to inspect variables and executed queries
* This component *will* allow to inspect information about the router and evaluated routes
* This component *will* display additional information like runtime, memory usage, filesize, etc.
* This component *will* use Zend_Wildfire for communication between server and extension
{zone-data}

{zone-data:dependencies}
* Zend_Exception
* Zend_Controller
* Zend_Db
* Zend_Wildfire
{zone-data}

{zone-data:operation}
The component is instantiated in the bootstrap by calling Zend_Toolbar::init(); with regarding options, like e.g. a required password. When a request comes in, it collects all required information and appends them to the response object as headers at the end.
{zone-data}

{zone-data:milestones}
* Milestone 1: [DONE] Prototype checked into SVN: http://framework.zend.com/svn/framework/standard/branches/user/dasprid/Zend_Toolbar/
* Milestone 2: Working prototype checked into the incubator
* Milestone 3: Unit tests exist, work, and are checked into SVN.
* Milestone 4: Initial documentation exists.
{zone-data}

{zone-data:class-list}
* Zend_Toolbar
* Zend_Toolbar_Plugin
{zone-data}

{zone-data:use-cases}
||UC-01||

Initialising Zend_Toolbar
{code}
Zend_Toolbar::init();
{code}

||UC-02||

Initialising Zend_Toolbar with password protection
{code}
Zend_Toolbar::init(array('password' => 'foobar');
{code}
{zone-data}

{zone-data:skeletons}
{code}
class Zend_Toolbar {
/**
* Initiate the toolbar
*
* @param array $options
* @return void
*/
public static function init(array $options = null)
{}
}

class Zend_Toolbar_Plugin {
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
{}

public function dispatchLoopShutdown()
{}
}
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>