Urigo / Ionic2CLI-Meteor-WhatsApp

WhatsApp Clone tutorial with Ionic 2.0 CLI and Meteor Server
https://www.angular-meteor.com/tutorials/whatsapp2/ionic/setup
163 stars 184 forks source link

Offline support #112

Open airstep opened 7 years ago

airstep commented 7 years ago

When app is restarted and there is no connection - you can't see previous messages etc, even enter to app...

Is it possible to make offline app support? Which of packages you can suggest to use?

Already read about this, but it is too old maybe for true

darkbasic commented 7 years ago

What you want is basically a progressive web app. I'm still unsure, but it's possible that the next version of the tutorial will include a chapter about it.

airstep commented 7 years ago

Ok, will wait new topic in tutorial. Maybe you can show direction where to start learn about progressive web apps?

airstep commented 6 years ago

In the answer for my previous question (I think I found next step to learn):

https://stenciljs.com/docs/intro

And there we have:

While Ionic primarily targeted Cordova apps, the emergence of Progressive Web Apps as a rapidly growing target for web developers demanded a different approach to web app development performance. With Ionic's classic use of traditional frameworks and bundling techniques, the team was struggling to meet latency and code size demands for Progressive Web Apps that ran equally well on fast and slow networks, across a diversity of platforms and devices.

airstep commented 6 years ago

Another one: https://blog.ionicframework.com/how-to-make-pwas-with-ionic/

And: https://github.com/GoogleChromeLabs/sw-toolbox

Fresh projects:

  1. https://developers.google.com/web/tools/workbox/
  2. https://github.com/ionic-team/ionic-pwa-toolkit

Anyway does meteor under ionic can use such tools? I'm about how to cache responses in correct way? In practical I see, when turn off connection - there is no cached results...

poparotsy commented 6 years ago

If I may reword @airstep question to a user story, it would put something like, If backend db is unreachable, accept and cache user input locally then sync later [lazy sync]. [we can display a message about that 'not-delivered yet!/ 'server-offline', etc.. ']

And this has to do with minimongo and ddp configuration.

The default Meteor/minimongo configuration doesn't seem to take cache as described above into account, as if the backend db is unreachable, app just doesn't accept input. [unless this is related to enter/accept message logic/code in the app itself].

So, In any case, I think it would be handy if we to expose minimongo & ddp configuration a little, so we can play with ddp timeout and initial local minimongo db type, etc..

Minimongo, DDP

airstep commented 6 years ago

Meteor side: https://github.com/meteor/meteor-feature-requests/issues/18

airstep commented 6 years ago

Some outdated project:

https://github.com/rafaelquintanilha/meteor-offline http://rafaelquintanilha.com/offline-app-with-meteor-and-cordova/

airstep commented 6 years ago

Also maybe it can help for somebody:

https://github.com/Nodonisko/ionic-cache