REST with dojo and PHP: Demo of a dgrid observing changes to the JsonRest store

This demo shows sitepen's new dgrid hooked up to a caching store and listening to changes to the store. The caching store combines a JsonRest store as the master with a Memory store as the slave. The master store communicates with a PHP controller script on the server. The Memory store is used to cache the data locally. Changes to the data such as create, update and delete are observed and the grid updates correspondingly.

1. Open Firebug's Net XHR panel to follow the different requests (GET, POST, PUT, DELETE).

2. Clicking the button will demonstrate the use of the cache by calling store.get(3) twice. The NET XHR panel will only show one request GET /3

3. Clicking the button will demonstrate how the dgrid updates automatically, when a store object is created (POST), renamed (PUT) and then deleted (DELETE).

Tip: Start sequence 2 again, click cancel in the second or third dialog. Then reload Browser...