Live data from Hacker News

Show HN: Make your app handle going offline

github.hubspot.com

21–30 of 30 posts

Re: Show HN: Make your app handle going offline

#21
post #7

> It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. Is this something I want as a user? If an app seems to be offline, I tend to do various things just to check or re-establish connectivity. Say, hit the Send button a few times, order columns, filter, search, whatever. Stuff, I wouldn't do if I had connection. Once the app reconn…

You'd need to take care of this anyway, since almost any asynchronous action otherwise carries the danger of being dispatched twice if the UI is left active.

Most frequently, this is done by disabling submit buttons or debouncing asynchronous function calls that happen as a result of a UI action.

Re: Show HN: Make your app handle going offline

#22
post #12

This comes at the perfect moment for me: I'm building an inventory web app used in warehouses on tablets and I'm faced with connectivity issues (incomplete or fluctuating WiFi coverage for instance). Making the app less prone to these issues is certainly going to help build something more robust, so thanks a lot!

We built Couchbase Lite as a serious embedded database for use cases like this. Our PhoneGap connector might be right up your alley. http://mobile.couchbase.com

Re: Show HN: Make your app handle going offline

#23
post #7

> It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. Is this something I want as a user? If an app seems to be offline, I tend to do various things just to check or re-establish connectivity. Say, hit the Send button a few times, order columns, filter, search, whatever. Stuff, I wouldn't do if I had connection. Once the app reconn…

After the first request fails it will confirm it's the connection at fault, and immediately show the message. Depending on the nature of the connection problem this can be immediate, but there is a small possibility that it can be delayed if the nature of the problem causes connections to timeout. If we get reports of that happening in the wild, there are things we might be able to do.

Re: Show HN: Make your app handle going offline

#24
post #10

I think this is a neat proof of concept. However, you have to be extremely careful to not get out of sync hell. I see an enormous load of extra complexities for what seems to be very little advantage. On the other hand, if you list all the queued non-GET AJAX call for the user to resend manually, it could be good. I'm ambivalent :(

I wrote the js in Offline. I agree completely, this is definitely not an attempt to resurrect Google Gears. I would love to see how more people use it, and what sorts of problems they run into before deciding what the solution might be.

Two thoughts right now (make a gh issue if either is something you need):

- Make an option to only enable request remaking for GET requests

- Make an option to throw out POST/PUT/DELETE data if it's more than X minutes old

Listing the requests is interesting, but would obviously require the programmer to associate the request with the user-facing feature it enables. Something like messenger might be better for that: http://github.hubspot.com/messenger/

Re: Show HN: Make your app handle going offline

#25
post #14

This is actually a very cool idea, but I'm gonna raise a minor nitpick which has been growing inside me over the last few months: > It has a number of beautiful themes and requires no configuration "Beautiful" is a word that's really getting overused nowadays, and I cringe whenever I see it. Edit: I anticipated the downvoting

I wrote the copy, which word would you prefer?

Re: Show HN: Make your app handle going offline

#27

The more I look into HubSpot libraries, the more I am amazed by their approach. To the point, small and flexible. And if the only annoyance people can bring up is a snake game, then you should be proud :) Regarding this particular module: is there any chance of combining this with a websocket connection (particularly socket.io)? I don't really care much for off-site requests, but notifiying the user of a disconnected…

Thanks! Do you mind opening an issue for the websocket support in GitHub Issues? I'm not sure if there's anything we can do there, but I'm happy to talk about it.

Re: Show HN: Make your app handle going offline

#28
post #10

I think this is a neat proof of concept. However, you have to be extremely careful to not get out of sync hell. I see an enormous load of extra complexities for what seems to be very little advantage. On the other hand, if you list all the queued non-GET AJAX call for the user to resend manually, it could be good. I'm ambivalent :(

I wrote the js in Offline. I agree completely, this is definitely not an attempt to resurrect Google Gears. I would love to see how more people use it, and what sorts of problems they run into before deciding what the solution might be. Two thoughts right now (make a gh issue if either is something you need): - Make an option to only enable request remaking for GET requests - Make an option to throw out POST/PUT/DELE…

Thanks for the library and I'm glad you understand what I tried to say. The warning I was giving was not meant as criticizing your library. It was meant as a general warning when dealing with queueing ajax request when offline.

Re: Show HN: Make your app handle going offline

#29
post #14

This is actually a very cool idea, but I'm gonna raise a minor nitpick which has been growing inside me over the last few months: > It has a number of beautiful themes and requires no configuration "Beautiful" is a word that's really getting overused nowadays, and I cringe whenever I see it. Edit: I anticipated the downvoting

I wrote the copy, which word would you prefer?

Could just go with "a number of themes".
Post reply on HN