Ask HN: Why aren't modern mobile apps design to fail stable?
Back years ago I would design apps to sync to a local database (which was relatively easy to do on IOS). Apps would maintain consistent state on the device and leverage local storage. I haven't looked under the hood but many apps appear to be using HTMLish front ends that are stateless, except for some cached login information. As a user - what I see is that the app repeatedly tries to login and fetch all information every time you load it. Which if you have perfect LTE/5G/WIFI is sort of ok, but in other situations sucks. if the app can't talk to the network it really doesn't work at all.
Example apps that generally fail stable: gmail, text messaging Sort of fail stable: slack, although if you get a push message slack requires talking to the network to get the message even though it came through the push message. In practice this means significant latency between seeing the message on the phone and then going to the conversation view (which can take forever to load under poor networking). Back when I built apps we stuck the contents of the push message in the local DB so it was visible for users Apps that don't fail stable: Hyundai blue link, Electrify America
23 comments
[ 3.0 ms ] story [ 67.5 ms ] threadIn my experience historically working with various financial orgs as a consultant, "security" is often cited as an excuse for poor UX and poor software engineering practices.
My own bank will happily show me the last-retrieved transactions and balance when I'm offline in their app. I have more confidence in their security given their policy of publicly talking about security architecture and use of open source tech than the dozen banks that are still using mainframes at the core of their stack and think that preventing the user switching away from/back to their app helps security.
Laziness and/or poor software engineering practice; usually because the business just doesn't prioritise app stability under less-than-ideal network conditions. I strongly suspect a lot of developers are used to having good-quality mobile data and WiFi connectivity at all times, too.
It's also why folks are using the "HTMLish front ends" you refer to, instead of properly investing engineering effort in making a real native app. All too often the business is more focused on speed of feature delivery, sacrificing the user experience, appearance/'feel' of the app and ability to provide richer functionality/OS integration along the way.
Then all the write operations need to be disabled or hidden.
There's no financial incentive to add extra error handling code in this case.
So when you have developers learning about app dev assuming they will have an internet connection, and most of the time really fast since it’s their dev machine the apps are being built on. Caching sort of becomes and after thought and doesn’t get much attention.
Also, I do recall the api for doing this sort of stuff was very SQL like, at least in the iphone. This probably adds another layer to most devs knowing frontend only and being exposed to CRUD apis.
I suspect most of the first mobile developers used to be web developers and then they taught the future generations of mobile developers to also be like web developers. Query endpoints from the backend for individual features without building a local view in the javascript of the whole world. And slap some spinners and error messages on to give the illusion of responsiveness.
As for the backend, they just use whatever database they prefer.
"the api for doing this sort of stuff was very SQL like"
Android these days do it via Jetpack/Room. It's still SQLish, but much less room (heh) for typos and similar bugs, and it even does syntax highlighting for common mistakes.
Personally, I have come to despise this architecture as, in my experience, it provides marginal gains in process for a developer while increasing technical complexity, backend scale/dependence, and a sub-optimal user experience.
This kind of architecture is costly, especially combined with TDD and such needing to cover every possibility on every layer. Adding the repository layer with two data sources is basically 3x tests to write. If time is short (and it always is) adding the repo layer doubles the tests to write/maintain for absolutely no gain. Adding it as needed later isn't so bad, but it's just put off forever.
Also, ads don't run if the network is disconnected. Users soon realise that disconnecting is like running ad blockers.
Same with some anti-cheat, e.g. changing the time to move forward in idle games.