3 ms·
I keep hearing offline-first trumpeted, but I have seen no examples of what that means. Terrible connections exist. But I fail to see how adding more scripting
by timw4mail 8y ago
I keep hearing offline-first trumpeted, but I have seen no examples of what that means.
Terrible connections exist. But I fail to see how adding more scripting will always help with that. Service workers are definitely promising, but documentation for common use cases is still lacking.
Even with a terrible connection, I would still trust a server-side app to load correctly on a refresh more than a SPA.
If anything, the minimal use of Javascript is as inclusive as a web app can be.
- tedunangst 8y agoI think they're talking about mobile twitter, where every time I visit I see the message "something went wrong". Then I tap retry and get the same message. It's very offline first. Then I reload the whole page and get the online version.
- snazz 8y agoIt seems to have to do with blocking their trackers: https://news.ycombinator.com/item?id=19130667 https://news.ycombinator.com/item?id=19130667
- naasking 8y ago> But I fail to see how adding more scripting will always help with that Your app has no control over browser connection management. JavaScript you write is aware of idempotency and retry semantics of your app, so it can manage requests more intelligently than the browser, without disrupting the user experience. So sure, it won't always help if you do it badly, I can see how it always helps if you do it well.
- jonstaab 8y agoHenrik Joreteg (https://twitter.com/HenrikJoreteg https://twitter.com/HenrikJoreteg) makes some pretty good arguments for PWAs. I've not had the chance to work on one, but when you start looking at mobile devices in particular, they do seem to be a good middle ground between the slimness of a document (web page) and the capability of a native mobile app. They're also not mutually exclusive with "no javascript" (if you do it right, which is a consideration). And they have the potential to save developers work, since you can get away with a PWA instead of native apps on 2+ platforms.
- mercer 8y agoI'm very much on board with the promise of PWAs, but so far I've never found an approach that didn't feel too complicated/tedious. That said, I've not made serious attempts in at least a few months, maybe a year. Would you say the situation has solidified/standardized in the interim, and if so, could you point me to some resources?
- jonstaab 8y agoUnfortunately, I'm in the same boat, having only fiddled briefly with some of the newer web APIs, rather than architecting an app around service workers. My impression comes from folks like Joreteg who do the work, and from the increasing frequency with which new native-like APIs are released into browsers (though almost invariably implemented badly). That said, even though the way service workers are registered is sort of odd, they're pretty trivial to work with once you're there. As far as resources go, MDN is always pretty solid, and this post (https://developers.google.com/web/fundamentals/primers/service-workers/ https://developers.google.com/web/fundamentals/primers/servi...) on Google's web dev guides is what I used to familiarize myself with them.
- detaro 8y agoThe neat thing is, an app using Service Workers doesn't have to be an SPA. You can use a Service Worker to just cache HTML as delivered from your server. E.g. I've seen blogs having a small service worker that just cached the last 5-10 accessed articles and added a custom error page saying "sorry, you are not online right now, but you can read the following articles from cache:"