If you ever wanted to use local storage for whatsoever reason (e.g. offline fallback, code examples without need for server-side middleware and database, etc), chances are you're familiar with the diversity of options. WebSQL database being ditched from HTML5 draft in favor to IndexedDB highly suggest the IDB is the option for offline storage.
Usage cases for local (client side) databases and this proxy are:
- caching infrequently changed data (ComboBox entries, settings, localization, etc.)
- fast and easy code samples that don't require server round trips and the whole server side architecture
- offline fallback (although sencha.io is actually a preferred way of doing this)
To make things even easier I created a proxy for IDB so that you can use all that goodness in your Ext JS 4 models and stores without extra effort.
Go ahead and try this live example or get the code from GitHub.
This is a project in development, and as always, your feedback is most welcome.
- Jul 2, 2011 - added support for importing data from other stores (e.g. Server proxy, Ext.Direct proxy, etc)
- Jul 4, 2011 - added support for WebSQL DB. Now you can use a universal Ext.data.proxy.BrowserDB that will automatically switch to WebSQL Database if IndexedDB is not available. That means it will now work on Safari, mobile Safari (iOS), and Android browser