DEV Community

Toma
Toma

Posted on

Are you Implementing Offline Functionality

offline-525700_1280.png

Sounds absurd, right? In today's connected world, something to work offline?! Today - Potentially everything has a Wi-Fi module and could be controlled from some external, remote server or device programmatically - Power Adapters, Lights, Cameras, Phones, Computers, Refrigerators, Vacuum Cleaners and so on.

But what if the Internet stops? You forgot to pay the internet provider, someone cuts the cable? I know, your mobile phone has a 3G/4G and could be used as a router. But will the basic widespread user figure that out? Does your IoT work locally - with only internal local network available?

Is at least some of the functionality of your software available offline? It's OK to be not available all. In the IoT I have been involved ELI-HOME - it primarily works within the local network In my application What you eat I've implemented offline access to all but the products within this app. The products are theoretically endless. But everything else is limited for now and it does not take a lot of space. I'm planning to implement similar functionality to the web site behind it.

Over the past four years I've implemented several Android applications for clients and contractors (besides the several personal) and all of them, at some point wanted the thing to work offline as much as it can. It is not nuclear physics. It just need to be planned in the beginning of the software development - to primarily work offline and after that - online. This will save you time and energy.

For mobile platforms - Android, Windows Phone, iOS, etc - this is mostly implemented with key-value storage, SQLite databases or any third party library that does the data management. They all could be checked for Internet availability. On the Web - the modern browsers have partial or full support for all of the above and online variable in the browser, and presently - Web Workers that do some logic offline - like pre-caching, serving content even if you are offline, handling push notifications and so on.

So except your client is not some other business (and you expect that he has good Internet), except the information is very very big and frequently updated, the thing is specific and showing old data is not an option - you should implement at least some functionality offline. The increase of mobile browsing will surely increase the cases when your thing is opened with no Internet.

Top comments (0)