1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    392
    Vote Rating
    6
    gkatz is on a distinguished road

      0  

    Default local storage question

    local storage question


    Hi;
    I am starting to use local storage (using LocalStorageProxy). I actually need to save only 2 values to local storage. logically they represent 2 different aspects of my application config.
    my question is an architectural and performance one. I am wondering if to use 2 different store/model/proxyId combinations, each for each type of data I need to save (only a single record), or just make it a generic local storage for all my configuration and put the first data in the first index of the store and the second piece of data in the second index and so forth.
    any comments are welcomed.
    thanks in advance.

  2. #2
    Touch Premium Member
    Join Date
    Nov 2011
    Location
    Massachusetts
    Posts
    43
    Vote Rating
    0
    martincf is on a distinguished road

      0  

    Default


    From an architecture standpoint I liked the following example for my app.

    I used this code as a starting point for my config settings:
    https://github.com/mrsunshine/Mobile...s---socket.io-

    The example has code that will force the user to the config screen if there is no configuration that exists in the store. If the config exists, it allows the user to go on to using the application. If I remember correctly, it only uses the first index of the store for saving information and overwrites it or deletes and adds a new record if a change is made. The code you are looking for is at the bottom I believe at App.config namespace.

    I remember looking at another config example that used SQLite at the time and the company had a single large record for all the application configuration. I've followed that idea of building configuration since looking at that example.

    Martin

Thread Participants: 1