Webviews : Quickly Building An App In HTML And More

Ever wondered how Amazon and Flipkart are able to churn on new App homescreen layouts so fast? The traditional app building approach would have meant having to push a update to users. But that means ensuring all users from your install base are updated to the new version. And also the headache of ensuring that the build is compatible with most of the devices in the mobile device ecosystem.  Its a nightmare!
Lets look at a few problem statements. You might have pondered on it at one point.

Case 1
You want to build an app in which you want the ability to add or remove screens, modify screen layout and/or change UI flow on need basis for the server side and reflecting on the existing app itself.

Case 2
You have a responsive website and want to engage even more with your users on mobile devices by developing an app. But you don’t have the budget (at least for now) or expertise to develop and full blow mobile app.

The solution
For the Android ecosystem, there exists, whats called, Android Webview. Its a system component powered by Chrome that allows Android apps to display web content. It comes pre-installed with the operating system. Webview allows 3rd party apps to show content in an in-app browser or in an app screen that pulls from the web. [sic].

For iOS ecosystem, there is UIWebview & WKWebview. Similarly, for other platforms there are different system components that allow for this hybrid form of integration.

Architecture of a webview
The below diagram compares and explains (quite well, actually) the difference between Native, Hybrid and Web Apps.

courtesy of myShadesOfGray

Capability of webview
Modern webviews are quite powerful, both on Android and iOS platforms. What it means is that it can emulate an App like behavior without being glitchy. This includes behavior like –
Gesture support

Access to device camera, photographs etc

  • 60fps scroll support
  • Loading
  • History
  • Pagination
  • And More …

What all this means is that you can replicate an native app like behavior to UI created with HTML inside of your app. Your end user wouldn’t even know that the screen they are interacting with is actually a HTML page.

Webviews have come a long way from developing clunky UI to creating very smooth, performance driven and powerful applications.