Offline mode options

My App linked to 13 different tables in DB with around 30 services. I need to add offline mode feature to the App. I read through your tutorials and some support issues. I am a bit confused about what is the differences between the following in term of (easiness, comprehensiveness and compatability with ios and android devices).
1. Echo (http://devcenter.appery.io/documentat...)
2. Local SQLite (http://devcenter.appery.io/tutorials/...)
3. offline (http://devcenter.appery.io/tutorials/...)

Is it possible to use (Echo) for (query, list, update) services in offline mode, referring to (https://getsatisfaction.com/apperyio/...).

In addition, is possible to perform offline login process (https://getsatisfaction.com/apperyio/...)?

Would deeply appreciate your help!
1 person has
this question
+1
This topic is no longer open for comments or replies.
  • Hello Hawk,

    Is it possible to use echo for query

    Yes, you can add echo, when there is no Internet connection, and remove when there is.
    In addition, is possible to perform offline login process

    If for the login you will use Appery.io DB, you will not be able to do this because you need to access the local database, and do the login manually.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hi Evgene,

    So I can use echo for (query, list and update) and not only (query)?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hawk,

    You can make the query, list and update requests using echo.
    To make the list service you need to write to echo all the data from local storage
    To make the query service, you need to make a generic service which will sort the data from local storage variable and return only the data you need
    To make the update/create service, you need to update the data in local storage variable and in parallel to keep somewhere a history of updates to synchronization data when the Internet will appear (for example as described in this tutorial http://devcenter.appery.io/tutorials/...)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hi Appery.io support team!

    More questions on offline mode strategies. I have seen in Model and Storage webinar (https://www.youtube.com/watch?v=N1Ufy...) the implementation of an app that on Page Load event invokes a DataBase service to fill in a mobilelistitem with the results of a query to an Appery.io MongoDB collection.
    On Service Invokation Success event the app triggers the mapping of results into a LocalStorage structure.
    On Service Invokation Complete event the app triggers the mapping of the content of the LocalStorage structure into the page.

    The scope of my project is Android & iOS apps, the data stored in Appery.io MongoDB changes once or twice a month, and my questions are:

    -Is this webinar example a recommended approach for implementing an Offline Mode strategy (i.e. show cache results if the connection to Appery.io MongoDB fails)? Or should I better experiment with echo functionality?

    - selecting Page Load instead of Page Show for service invokation is a good strategy to avoid too many queries to Appery.io, taking into account data in Appery.io MongoDB changes seldom (i.e. once or twice a month)?

    -If answer to previous two questions is yes, can you confirm if this is the expected behaviour of such implementation in the following scenarios?

    a) I run the app for the first time in a device. I guess PageLoad event is triggered (so service is invoked for the first time), also Page Show. Let's assume comunication with Appery MongoDB succeeds, data will be stored in LocalStorage and then displayed. Right?

    b1) I switch from this app screen to another, and then get back. Connectivity is working fine. I guess PageLoad event is not triggered (so no query to Appery MongoDB is sent). Data displayed on step a) will be shown again. Right?

    b2) I switch from this app screen to another, and then get back. Connectivity is broken. I guess PageLoad event is not triggered (so no query to Appery MongoDB is sent). Data displayed on step a) will be shown again. Right?

    c1) I put the app in background (i.e. pause event is triggered) and then I get it back to the foreground (i.e. resume event is triggered). Connectivity is working fine.
    I guess no PageLoad is triggered, data displayed on step a) will be shown again. Right?

    c2) I put the app in background (i.e. pause event is triggered) and then I get it back to the foreground (i.e. resume event is triggered). Connectivity is broken.
    I guess no PageLoad is triggered, data displayed on step a) will be shown again. Right?

    d1) I powercycle the device and run the app again -i.e I run the app for a non first time-; connectivity is working fine. I guess this situation is similar to step a), the only difference is that I already got data in LocalStorage; and this data is updated with results from MongoDB, This new obtained data is also displayed. Right?

    d2) I powercycle the device and run the app again -i.e I run the app for a non first time-; connectivity is broken. I guess this situation is similar to step a), the only difference is that I already got data in LocalStorage; since app cannot reach Appery.io MongoDB, "old" data in LocalStorage is displayed. Right?

    Sorry if question is too long or it gets outside Appery support, and thank you for your help!

    Carlota F
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated

  • Hello Carlota,

    Sorry for delay. As far as I understand, the main point of your question is about the support of оffline mode. You have a database cache locally on a device (the data can be stored in a SQLite DB, or by using Model and Storage). When you have Internet connection you are working with Appery.io DB, and when it is not - with a local cache. Then when you receive the connection please perform data synchronization. To be honest this is not a trivial task, and it requires a lot of things to be implemented at your side.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated