Mobile
In our last post we looked very briefly at the APIs currently available to help detect connectivity state in mobile/web apps. Our conclusion? Browser APIs have a long way to go in this area! Nevertheless, when used together – and in tandem with a heartbeat check that attempts to talk to a remote endpoint – these tools can be quite useful. But what's the best way to use them 'together'? At the end of part 1, I said that I think a state machine abstraction would work well to manage all of this…but you might be wondering, "What's a state machine?". Before I show you the what and how of finite state machines, I think it's important for us to understand the why of state machines. So, grab some popcorn and prepare to laugh (and hopefully commiserate) as I walk you through what it could look like to solve the connectivity problem without a proper state machine.