Offline First: Learning from native experiences
Don’t be scared of getting local data
At the recent Chrome Dev Summit you could feel the energy for getting the Web platform ready for 60fps performance. It will get there.
I am biased as I worked with Gears back in the day, but I am also very excited to see the Offline First movement pick up steam. I often find that Web applications think with a very thin client mentality, and a reason that I want to use a native version isn’t to do with any client rendering performance issue, but to do with how well the experience works offline.
I will pick on the Asana app to make this point. I think that there is some irony in the fact that the engineering team there is top notch and *really* cares about performance. They started with a Web only product though, and they were focused on performance in the same way that Gmail was (not a surprise when you look at the client caliber that they have). They build Luna and LunaScript as a system to eek out as much as possible from the Web platform at the time. NOTE: This was a precursor to Meteor, and the creator of that framework worked at Asana back in the day.
With that context in hand, we take a look at the mobile applications for Asana and they make me sad. Why?
Whenever I launch the app it seems to be downloading a new version of itself
Keep in mind that most of the time I just want to add in a new thought, or look something up. Instead I have to wait a long time to get to that point. There are third party native apps that use the Asana API, but that is besides the point.
I am painfully aware of the network status
We are all mobile, and we are often on spotty connections. Not just on cell networks but on WiFi too.
ASIDE: I am so excited to see that new technology is making it possible for multiple connections to be used in a smart way so finally my phone can work out that “he is on WiFi but his LTE is actually faster!” or even use both concurrently.
Using the Asana app I am often seeing the “alert! not connected! sorry!” message. The thing is, I shouldn’t actually care. Again, most of the time I am looking to add a new thought (doesn’t need to be sync’d right now) or trying to load something (could be local)
Why isn’t all of my data local?
I don’t have THAT much data in Asana. Why doesn’t the app have it all? Or a smart subset? I have a process where I put all my thoughts into a “Raw Thoughts” project, yet whenever I load the app most of the time I see the loading circles. The cache seems to purge so aggressively.
Enhance with the network
Search is a tough problem, and there are advantages to searching in the cloud. Google works in a way that wouldn’t be possible if it was just a local app (giggling thinking about everyone having a copy of the Internet and the power to quickly search that content).
But with Asana you could easily do some simple search locally, and if the network is around and comes back with answers great! Enhance the experience but don’t rely on it.
I often find that the UI is partially loaded. It feels like some CSS has loaded but the images aren’t yet, so where the “+” at the top is, I see emptiness. This is why we had atomic “if this isn’t all downloaded don’t use it” semantics to some of the offline work. ServiceWorker is the new hotness in this area, and man I hope that it gets broadly adopted (READ: not just Chrome, or Firefox, but iOS).
The other side of partial loading is virtual lists. I have a list of all of the books that I own setup in a certain way. Every time I go in there it shows me a couple and I scroll down and it lazily loads the next page. I just want them all local and fast. I know that it takes time to download content, but there has to be a better way to get that data down, and a smarter way to know when things have changed.
There is one list that is small, and I see 99% of it come in, and then see a loading indicator page in the final smidge.
I say this because I care
The Asana application is obviously Web-y. It shouldn’t be that obvious. I am only writing this because I care. At a high level I want us to be writing smarter offline first applications, and at a low level I actually love the Asana service. I will share my work flow in another post, but it has been great. This is why I stick with the applications even when I curse them daily.
I also know that the team over there is top frigging notch, and that things take time, so I have a huge amount of faith that we will see new experiences that clear up issues like these.