In-Browser Data Stores<br />James Thomas<br />twitter.com/thomasj<br />
Dealing with data<br />
Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?</li></li></ul><li>Dealing w...
How do we maintain data consistency in-browser?</li></li></ul><li>Dealing with data<br /><ul><li>How do we store and acces...
How do we maintain data consistency in-browser?
How do we migrate between data sources? </li></li></ul><li>dojo.data<br />"uniform data access layer that removes the conc...
dojo.data<br />"uniform data access layer that removes the concepts of database drivers, service endpoints, and unique dat...
Stores, items and attributes</li></li></ul><li>dojo.data.Read<br /><ul><li>Fetch store items
Retrieve item's attributes
Search for items matching query
and more......</li></li></ul><li>dojo.data.Read<br />var store = new some.Datastore(); <br />var gotItems = function(items...
dojo.data.Write<br /><ul><li>Creating new items
Deleting an item
Updating an item
Saving series of creates, updates, deletes
Revert changes</li></li></ul><li>dojo.data.Write<br />var store = new some.Datastore(); <br />var gotItems = function(item...
dojo.data.Identity & dojo.data.Notifications<br /><ul><li>Items have unique identifier
Fetch items by unique key
Emit notifications when items created, updated and deleted</li></li></ul><li>dojo.data features<br />
dojo.data features<br /><ul><li>Asynchronous by default</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by ...
"Store-centric" data view</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by default
"Store-centric" data view
Interfaces are independent</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by default
"Store-centric" data view
Interfaces are independent
Upcoming SlideShare
Loading in …5
×

In browser data stores

653
-1

Published on

London AJAX Conference, July 2010. An old talk about Dojo Data Stores.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
653
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

In browser data stores

  1. 1. In-Browser Data Stores<br />James Thomas<br />twitter.com/thomasj<br />
  2. 2. Dealing with data<br />
  3. 3. Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?</li></li></ul><li>Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?
  4. 4. How do we maintain data consistency in-browser?</li></li></ul><li>Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?
  5. 5. How do we maintain data consistency in-browser?
  6. 6. How do we migrate between data sources? </li></li></ul><li>dojo.data<br />"uniform data access layer that removes the concepts of database drivers, service endpoints, and unique data formats."<br />
  7. 7. dojo.data<br />"uniform data access layer that removes the concepts of database drivers, service endpoints, and unique data formats."<br />Standardised interfaces for all data access<br /><ul><li>Read, Write, Identity, Notification
  8. 8. Stores, items and attributes</li></li></ul><li>dojo.data.Read<br /><ul><li>Fetch store items
  9. 9. Retrieve item's attributes
  10. 10. Search for items matching query
  11. 11. and more......</li></li></ul><li>dojo.data.Read<br />var store = new some.Datastore(); <br />var gotItems = function(items, request){ console.log("Items located: " + items.length); }; <br />store.fetch({onComplete: gotItems}); <br />
  12. 12. dojo.data.Write<br /><ul><li>Creating new items
  13. 13. Deleting an item
  14. 14. Updating an item
  15. 15. Saving series of creates, updates, deletes
  16. 16. Revert changes</li></li></ul><li>dojo.data.Write<br />var store = new some.Datastore(); <br />var gotItems = function(items, request){ <br /> for (var i = 0; i < items.length; i++){ <br /> var item = items[i]; <br /> store.setValue(item, "foo", "bar"); <br /> } <br /> store.save();<br />}; <br />store.fetch({onComplete: gotItems}); <br />
  17. 17. dojo.data.Identity & dojo.data.Notifications<br /><ul><li>Items have unique identifier
  18. 18. Fetch items by unique key
  19. 19. Emit notifications when items created, updated and deleted</li></li></ul><li>dojo.data features<br />
  20. 20. dojo.data features<br /><ul><li>Asynchronous by default</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by default
  21. 21. "Store-centric" data view</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by default
  22. 22. "Store-centric" data view
  23. 23. Interfaces are independent</li></li></ul><li>dojo.data features<br /><ul><li>Asynchronous by default
  24. 24. "Store-centric" data view
  25. 25. Interfaces are independent
  26. 26. Notifications enable easy consistency</li></li></ul><li>dojo.data stores<br />
  27. 27. dojo.data stores<br />Need a custom store? Make your own!<br />
  28. 28. dojo.data widgets<br /><ul><li>Lots of Dojo's UI widgets (Dijits) automatically work with stores</li></li></ul><li>Dealing with data<br />
  29. 29. Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?</li></ul>Generic client-side data store<br />
  30. 30. Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?</li></ul>Generic client-side data store<br /><ul><li>How do we maintain data consistency in-browser?</li></ul>Store generated event notifications<br />
  31. 31. Dealing with data<br /><ul><li>How do we store and access client-side data in long-lived apps?</li></ul>Generic client-side data store<br /><ul><li>How do we maintain data consistency in-browser?</li></ul>Store generated event notifications<br /><ul><li>How do we migrate between data sources? </li></ul> Uniform interface for data access<br />
  32. 32. Questions?<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×