Saturday, January 1, 2011

Browser Storage Objects

The website is back up and running.


Today I finished the implementation of PersistentStorage and TransientStorage which use browser-based localStorage and sessionStorage objects.  On top of this, I found the TrimQuery API which supports a nice SQL-like syntax for querying and modifying the data.  PersistentStorage is used to maintain data between browser sessions, whereas TransientStorage exists to provide a place where current session data can be stored. TransientStorage provides a mechanism which would allow a developer to store data and retrieve it with SQL, rather than simply storing it in many JavaScript objects.

TrimQuery supports a wide range of SQL-like syntax so a developer can put data into multiple tables and perform simple joins to get aggregated data.  I can see a developer using this to store data for their MMO, or to store configuration information about keyboard setups and other things.  I've updated the Asteroids Evolution demo to store and retrieve the high score using PersistentStorage.

You can try it here.

No comments:

Post a Comment