1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Chennai
    Posts
    21
    Vote Rating
    0
    Eswar Reddy is on a distinguished road

      0  

    Default Unanswered: OFFLINE STORAGE IN SENCHA TOUCH 2

    Unanswered: OFFLINE STORAGE IN SENCHA TOUCH 2


    Hi,
    1. I have to use offline storage for my application storage ,but I have to get use of last one year data in my application,But I heard that offline will work for only 5 mb of limited data.
    Is it possible to get data to Offline Storage from main server database....
    Thanks & Regards,

    K.Eswar Reddy,
    Mobile application Developer(MAD),
    Mobile NO:+91 9962096643.

  2. #2
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    Local storage is limited to 5MB. You could use the sql proxy introduced in 2.2 or use a native sql plugin (sencha or phonegap).

    I would recommend the sql proxy even its a bit buggy at the time. But its really easy to use! Use JSONP requests to get the data from your server and store them, sync and youre done. If you need i can provied you a full example.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Chennai
    Posts
    21
    Vote Rating
    0
    Eswar Reddy is on a distinguished road

      0  

    Default sql proxy is offline storage?

    sql proxy is offline storage?


    Quote Originally Posted by u25771 View Post
    Local storage is limited to 5MB. You could use the sql proxy introduced in 2.2 or use a native sql plugin (sencha or phonegap).

    I would recommend the sql proxy even its a bit buggy at the time. But its really easy to use! Use JSONP requests to get the data from your server and store them, sync and youre done. If you need i can provied you a full example.



    Is Sql Poxy is work with Offline Storage.?

    Please Provide a full example ..
    Thanks & Regards,

    K.Eswar Reddy,
    Mobile application Developer(MAD),
    Mobile NO:+91 9962096643.

  4. #4
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      0  

    Default


    WebSQL Storage is similar to Offline Storage. You will have a cached SQLite Database in your Browser. The data is persistent if you package the application until you manually delete it.







    Get Data from Server
    Code:
    var store = Ext.getStore('dummyStoreId');
    
    
    Ext.data.JsonP.request({
    
    
        url: 'http://dummyurl.com/getdata.php',
        method: 'GET',
        params: {},
        timeout: 6000, // miliseconds
        disableCaching: false,
        async: false,
    
    
        success: function (response) {
    
    
            var rootData = response;
    
    
            store.add(rootData);
            store.sync();
    
    
        },
        failure: function (response) {
            Ext.Msg.alert("Error occurred while loading data");
        }
    });
    
    
    };

    Store Config:

    Code:
    Ext.define('MyApp.store.MyJsonPStore', {
        extend: 'Ext.data.Store',
    
    
        requires: [
            'MyApp.model.dummyModel'
        ],
    
    
        config: {
            model: 'MyApp.model.dummyModel',
            storeId: 'dummyStoreId',
            proxy: {
                type: 'sql'
            }
        }
    });

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Location
    Chennai
    Posts
    21
    Vote Rating
    0
    Eswar Reddy is on a distinguished road

      0  

    Default


    thanks for this now i got some idea..


    what is offline storage data, this is web application. what is the purpose of the offline storage ,will it work without internet connection.
    Thanks & Regards,

    K.Eswar Reddy,
    Mobile application Developer(MAD),
    Mobile NO:+91 9962096643.

  6. #6
    Sencha Premium Member
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    224
    Answers
    24
    Vote Rating
    7
    u25771 is on a distinguished road

      1  

    Default


    Quote Originally Posted by Eswar Reddy View Post
    thanks for this now i got some idea..


    what is offline storage data, this is web application. what is the purpose of the offline storage ,will it work without internet connection.

    hi Eswar,

    I think you misunderstood something... Offline Storage is a type of storing data somewhere. There are several techniques to archieve this.

    1. SessionStorage
    2. LocalStorage
    3. WebSQL

    You might find this blog post interesting: http://blog.sencha.com/blog/offline-...-sencha-touch/

    Please set thread as answered if it is...

  7. #7
    Sencha User jaami's Avatar
    Join Date
    Apr 2012
    Location
    Texas
    Posts
    96
    Vote Rating
    0
    jaami is an unknown quantity at this point

      0  

    Default Thanks for posting example and the blog link.

    Thanks for posting example and the blog link.



  8. #8
    Sencha User
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
    bhakta is on a distinguished road

      0  

    Default Create offline web applications on mobile and stationary devices with CouchDB

    Create offline web applications on mobile and stationary devices with CouchDB


    http://www.ibm.com/developerworks/library/wa-couchdb/

    I
    f you dont want to use CouchDB to handle advanced sync offline/online, a simple solution would be to store JSON output in a local filesystem and access via a local url.