Jump to content

Keeping Data in Buffer feature for PHP Web Apps


JeevanisM
 Share

Recommended Posts

Hello All,

Recently, I got an inquiry for a new project. This is about taking survey of demography. A person will go to each house and get details from and enter in fields and click save. Just straight forward, but the catch is what if the person go to a house which is actually a bit rural where no internet coverage available. In this case, whatever data input via the forms, Is it possible to store in local storage / buffer storage and whenever internet is available, it can be stored to the actual database ?

I know this is easy for Mobile Android App, that data can be stored in Local Mobile Storage device. But is the same feature available for PHP web app ? If the person uses a mobile and access the mobile view of the webapp and input all these information when no internet available, is it possible to keep it in buffer and save to database when internet is available ?

Please let me know if is there any such workarounds or methods

 

thanks

 

 

 

Link to comment
Share on other sites

This is not a question about PHP, but a matter of your frontend.

You should look into the Cache API, indexedDB and service workers. What you probably want, it to build a progressive web app.

https://github.com/pazguille/offline-first

https://ponyfoo.com/articles/backgroundsync

https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html

https://github.com/pulseshift/lunch-pwa

https://github.hubspot.com/offline/docs/welcome/

  • Like 1
Link to comment
Share on other sites

Personally I‘d first look into using an existing solution for gathering the data (I‘ve had good experience with https://feed2go.com/de/) and just create a way to bring back data into existing systems later. Webapps have the problem that their storage while available at times is not ensured to stick around. If e.g. the device disk space runs low it might be cleared out. Also you‘re already in the realms of a fully client side app, so you could just embrace it.

  • Like 2
Link to comment
Share on other sites

On 2/22/2020 at 5:05 PM, dragan said:

This is not a question about PHP, but a matter of your frontend.

You should look into the Cache API, indexedDB and service workers. What you probably want, it to build a progressive web app.

https://github.com/pazguille/offline-first

https://ponyfoo.com/articles/backgroundsync

https://www.twilio.com/blog/2017/02/send-messages-when-youre-back-online-with-service-workers-and-background-sync.html

https://github.com/pulseshift/lunch-pwa

https://github.hubspot.com/offline/docs/welcome/

thanks for the references, I will check it out

On 2/22/2020 at 5:41 PM, LostKobrakai said:

Personally I‘d first look into using an existing solution for gathering the data (I‘ve had good experience with https://feed2go.com/de/) and just create a way to bring back data into existing systems later. Webapps have the problem that their storage while available at times is not ensured to stick around. If e.g. the device disk space runs low it might be cleared out. Also you‘re already in the realms of a fully client side app, so you could just embrace it.

thanks for the response

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...