Results 1 to 4 of 4
  1.    #1  
    To Depot or not to Depot?

    I am writing an app to keep track of beers you have drank at a chain of bars and have a couple of questions with regard to storage on the Pre. First off, I do not know the total size of the information I wish to cache as I don’t know just how many beers they keep in their database. Currently the database I will be accessing is not online for testing so all I can do is estimate at this point. I did make a generic txt file with what I think may make up one beer (name, brewer, description, notes, style, container, average rating, your rating, etc.) and the file size was ~1.5K so with the 1mb storage limit (Depot) you could only have about 660 different beers or so. This may be enough storage, but with all the concerns about the amount of storage you are limited to for installing apps, should I be looking to use HTML 5 and “openDatabase( "ext:mydbname", ... );” to store the data in the larger more spacious partition? This would free up a little space for other apps. Until Palm makes a fix, is 1mb of space that precious?
  2. #2  
    I personally don't like the depot. It works, but it is limited both in size and functionality. If you know SQL, then stick with the HTML5 DB.
  3. jblebrun's Avatar
    Posts
    43 Posts
    Global Posts
    45 Global Posts
    #3  
    The Depot is actually not limited in size anymore then HTML5 databases are. It is simply a convenience wrapper around HTML 5 databases to make key-value storage easy. The size limitations on the Depot also exist for HTML5 databases. You can also create Depot databases on the flash partition using the ext: prefix.

    If you need a simple way to store information by a single index, use the Depot, since it will be more straightforward.

    If you want to query your information in various ways, use HTML5 databases directly. Then you can run more complex queries like "WHERE brewer=Pyramid" or similar.

    You can write your own Depot-like model that encapsulates the functionality you'd like to have, to reduce to number of places that SQL shows up in your app.
  4.    #4  
    Quote Originally Posted by jblebrun View Post
    The Depot is actually not limited in size anymore then HTML5 databases are. It is simply a convenience wrapper around HTML 5 databases to make key-value storage easy. The size limitations on the Depot also exist for HTML5 databases. You can also create Depot databases on the flash partition using the ext: prefix.

    If you need a simple way to store information by a single index, use the Depot, since it will be more straightforward.

    If you want to query your information in various ways, use HTML5 databases directly. Then you can run more complex queries like "WHERE brewer=Pyramid" or similar.

    You can write your own Depot-like model that encapsulates the functionality you'd like to have, to reduce to number of places that SQL shows up in your app.
    OK, thanks for the heads up, I guess I missed that part about being able to use the Depot on the USB mass storage area. I think that is the direction I'd like to go as I have not messed with SQL in almost 10 years and the book has reference code on the Depot, but not HTML 5.

Posting Permissions