6 ms·
Say hello to offline first
- digitalsushi 13y agoDoing my college homework, if I had assumed I was offline and then only went online if I determined I was, then I might have spent half the time debugging my homework.
- npsimons 13y agoExplain, please? You appear to be comparing a state of mind (assumption of being offline), to a way to design apps (don't assume constant connectivity), with an unclear result (what do you mean by "spent half the time"? would it have taken you half as long as it originally did if you assumed you were offline? or you would have spent half your time debugging instead of looking up answers?).
- timruffles 13y agoI hope this becomes a popular maxim - fed up of offline not working for productivity tools (not necessary for other types of apps, but Trello is a shining example of this omission making productivity apps near-useless).
- npsimons 13y agoThis could be seen as an extension of "YAGNI" (You Aren't Gonna Need It). Does your app need to hit the server constantly? Can it not cache data and only do network operations on an as needed basis?
- catwell 13y agoThis is not really caching. Caching is about not hitting the network to get data you have already gotten before. Offline is about having an application that works correctly in the absence of network, which means preemptively getting all or a subset of your data. But I agree that you could see the server as YAGNI, especially if all your app is doing is data consumption and your data is small enough to be downloaded to the device in its entirety. I have written about caching and offline here: https://winch.io/blog/article/caching-prefetching-and-the-offline-mode/ https://winch.io/blog/article/caching-prefetching-and-the-of... (warning: promotional content for a service that helps you do that for native mobile apps at the end).
- npsimons 13y agoApology not needed for promotion; I'm biased, but I think far too much emphasis is put on services that encourage needless reliance on constant connectivity and third parties' servers. Offering an alternative is welcome. As for local storage, even on smaller capacity devices, there's a whole lot that can be kept - why, for instance, does a todo list, addressbook, appointment manager, workout tracker, etc, etc, need to connect to a remote server for it's very basest of functions? Sure, backup, synchronization, sharing, etc need connectivity, but those aren't (IMHO, shouldn't be) the main focus of these apps.
- branksy 13y ago> We can’t keep building apps with the desktop mindset of permanent, fast connectivity... That's just silly. A lot of apps are rightly useless without normal connectivity, like checking the weather [edit: for current conditions], or sending e-mails, or Facebook, or shopping on Amazon. There's no reason for these to work offline. I mean, an app is pretty much online-only, or mostly offline (like most games, for example). I don't see a big middle ground between the two where online apps need to be made to work better offline. And the few which do (which involve syncing data), seem to work fine. So... I don't get it. What is "Offline first" trying to accomplish in the real world?
- bonaldi 13y ago> A lot of apps are rightly useless without normal connectivity, like checking the weather, or sending e-mails, Except that thinking leads to really shitty behaviour from apps. Like weather apps that refuse to show you the data cached from the last time they checked, or e-mail apps (I'm looking at you here iOS GMail) that are feeble-to-useless at letting me read offline. Facebook: I should be able to check my events calendar offline, or look again at favourite photos. The set of apps that consume online data is much, much larger than the set of apps that are usable if and only if they have absolutely live information. By not thinking offline-first, too many apps behave like they're in the second set.
- branksy 13y agoResponding to you and everyone else using weather as an example: NO, I don't EVER want cached weather data! In fact, it drives me nuts that when I look up the weather on my iPhone to see what the current temperature is outside, I have no idea if it's accurate or 20 degrees wrong, because it just assumes that cached data from 1am is good enough, until it happens to get a connection again. For people who live in places where the temperature can vary 40 degrees in a day, this is really important. [Edit: why is this being downvoted? Is it not clear that I'm talking about current weather conditions, as opposed to 3-days-out? And that having my phone present stale data as current data can be harmful? Many people use their weather app for current conditions, not forecasts.]
- GrinningFool 13y ago"This is quite literally a new frontier, largely unexplored and full of interesting problems and unimagined edge cases. In most other realms of app design we are spoilt with UX/UI patterns we can readily employ, but offline-first is terra incognita, there is practically nothing to go on in terms of patterns and metaphors." Alright, let's step back a minute here. We have over a quarter-century of offline-ONLY desktop applications to draw on. There are also a fair number of intermittently-online desktop applications that have been in existence for years. I realize it's not fashionable to consider these as applicable, but the only thing new here is the platform (browser). UI patterns abound - though unsurprisingly a quick google search for UI design patterns doesn't show anything except the latest web ui patterns. These desktop applications still power the everyday work of most computer users[1], to a large extent more than most transient web-based apps. Why would we start any discussion on the assumption that they're not relevant? [1] and before you tell me that you do just fine on your chromebook using only connected services: you are NOT most desktop users.
- janl 13y ago@GrinningFool totally miscommunication, sorry if we cam off wrong. We don’t mean to dismiss the offline metaphors we know from desktop apps, in fact we desperately need to transform them over to predominant app design, especially on mobile.
- GrinningFool 13y agoThanks for the clarification.
- npsimons 13y agoWe have over a quarter-century of offline-ONLY desktop applications to draw on. and though unsurprisingly a quick google search for UI design patterns doesn't show anything except the latest web ui patterns. . . . seem to contradict each other. Sure, offline (or at least intermittently connected) apps have been around a long time, but as you so rightly (unsurprisingly) found, that kind of thinking (patterns) has been surpassed by more trendy ideas. Part of it can be blamed on the SDK and API designers; they implicitly tell us "your app will be online all the time". Part of it (as you pointed out), is due to general ignorance of history. I think a large part of this is that large swathes of new programmers (only in it for the money?) have jumped on the apps bandwagon on phones (online by default), offline be damned. That, as the authors argue, should be fixed.
- lstamour 13y agoI'd like to echo this, specifically focusing on AJAX. It's not enough to be offline-friendly if your requests don't themselves retry or work well when internet is spotty. A problem I've often encountered in online-only scenarios is when AJAX calls fail. How do you ultimately retry them? At a certain point, you need the same infrastructure you'd be building for an offline app to cache and queue requests, as well as present sensible non-success responses. So, just as mobile first solved problems for both tablets and focusing a design, offline first can solve problems with error messages, caching to speed up online responses and AJAX retries.
- gr2m 13y agoor you go away of AJAX calls entirely, by storing all data offline and having a separate process that synchronizes all changes, like remotestorage.io does it, or hood.ie
- lstamour 13y agoThat's what I implied by AJAX retry. That you need some method that sensibly queues the request, until it succeeds or is no longer needed. That process could easily be called synchronization, sure. Depends on the app, really. The request might "expire" or be no longer necessary, so it wouldn't show up at "sync" time. Perhaps the request could be automatically retried through other devices that are connected -- imagining for the moment, an app that could use bluetooth or local wifi to communicate an operation across to other running instances even when offline.
- deleted 13y ago[deleted]
- elchief 13y agoBeen working with SymmetricDS (open-source Java database syncer over HTTP). Works on Java desktop, Android, Java web servers. An IOS version in the works. Anyone else using it? Would be nice to see a pure AJAX / IndexedDB plugin. Since a local database would write directly to a central database, you really want row-level security and good triggers, so a user can only screw up their own stuff.
- pepijndevos 13y agoRelated: CouchDB for mobile. With its master-master replication and explicit conflict handling, it handles being offline extremely well.
- JacksonGariety 13y agoDid this post get nerfed? It had 45 points in one hour but it seems to be stuck at the top of page 2.
- npsimons 13y agoIt was at the top of page one at one point in time; along with another interesting article (that was killed) about a new operating system that looked promising, I'd say someone with an agenda has been flagging perfectly relevant articles today. Perhaps it was branksy. Or mobile app developers who don't like the idea of their users disconnecting because then they can't track their every move. Or web app developers who can't conceive of an app that doesn't involve a web server.
- Procrastes 13y agoLiving in the mountains of Northern California with crappy cell coverage, I hope thinking "offline first" really takes off. Through my day I pretty much only use apps that can "hold it" until we get to another wi-fi or cell coverage oasis. Besides my personal coverage challenges, any mobile app should just be smart enough to handle loss of connection gracefully as a matter of course. It's one of the error conditions (along with low battery) that is guaranteed to happen. I will definitely be watching hoodie for my own projects. Most of the US (by area) is in the same boat, I suspect.
- 205guy 13y agoI think this offline-first approach is very interesting, and definitely something that is overlooked in UI and app design. The OP is correct about telco and wifi signals being far from total coverage. There are lots of "holes" and in some places, it's more a metaphor of moving between islands that have connectivity. There is also another case of artificial data "scarcity" and that is the case no-data plans. To save money, I have a low cost ($10 and up) minutes-only phone plan. With apps that work with the offline-first mentality, being offline could be almost invisible on a 1-hour commute between the wifi at home and the office (no, I'm not one of those people who needs to read and write tweets in real-time). Sometimes it is also a hardware issue. The first time I tried to use my phone as a true GPS with MotionX (this was 4 years ago on an iPhone 3G), I discovered it's not possible. The app does download maps and cache them so you can go hiking out of cell range, but the iPhone does not support GPS-only operation. Either I leave the radios on and it depletes its battery looking for a signal, or I put it in airplane mode and GPS is disabled. I don't believe a GPS-only configuration is possible even today. Another point is that offline-first does not only apply to smart-phone apps, although that is probably the biggest problem space. But there are a lot of people who commute with laptops, and who could maybe live without a 4G dongle if their apps supported it. I have also thought a lot about the sailboat cruising community (see the last sailboat picture in the OP). There are many recreational boaters out wandering from port to port, using sparse wifi and sailmail (very limited email services via marine HF SSB radio). A lot of them blog and send text and email to their family, friends, and followers, but have to struggle to time their online windows. Just imagine a laptop app that lets people write emails and blog posts whenever they want (in the middle of an ocean), and maybe it uploads the text to their blog via sailmail immediately (but slowly), and then adds the pics automatically when they get to port and connect to wifi (or have a 4G dongle within range of a cell on the coast). So not only are there online and offline states, but also limited bandwidth states such as sailmail (it allows short text emails in both directions, but not images).
- npsimons 13y agoI don't believe a GPS-only configuration is possible even today. Are you referring to iPhone? I'm fairly certain that's a software limitation, as I know of non-iPhone smartphones that can easily enable GPS alone (no cell, no BT, no WiFi, etc).