jqApp Demo

This page makes heavy use of JavaScript. If you see this, then either your browser is not capable of using this page, there was an error loading some component from the web site yet, or your browser has not yet finished loading and initializing the required components.


JSONMessage.Request/JSONResponse tests....

Create a message:
Message to send (JSONMessage.Request format):
Server Response:

Messages/requests sent this way are posted to the remote server, which decodes the JSON, creates a server-side representation of it, and looks for an installed response handler for that event type. If it finds none, it creates a response wrapping an error object. The response object processes the request (or fills out the specifics of the error, in the case of an unknown message type) using whatever PHP APIs it likes. Afterwards, the dispatcher converts the response to JSON and sends it back to the client. That response gets converted to a higher-level JSONResponse object and is given back to the caller who posted the request in the first place.

New event handlers are installed by creating a simple JSONResponse class, filling in the implementation-specific code, and installing it in a location where the dispatcher can find it (i.e. the file's basename is the same as the message type).
Most recent status log entries:

JS code for this page: