Making sense of the mobile development ecosystem — Part 2: Hybrid apps and hybrid/native apps
This article covers hybrid apps and hybrid/native apps as part of a series on options for mobile development. Part 1 laid out the development spectrum — from mobile web to native — that you can see in the diagram below and took a deeper dive into the mobile web option.
The following are more options on the spectrum when it comes to mobile app development:
Technically speaking, the term “hybrid” can refer to any native application that contains some portion of content displayed by a WebView. In practice, hybrid typically refers to mobile applications where the majority of the application is built within the WebView and contained within a native app wrapper.
Each of these layers incurs a minor performance cost, and there can be difficulties in making the user interface (UI) look and behave like a native application. However, depending on your use case, these issues may be offset by the ease of development and skill reuse that hybrid development offers as well as the ability to target multiple mobile platforms with a single code base.
Hybrid development with Cordova and PhoneGap
Apache Cordova, an open source framework for building hybrid mobile applications, was first created by Nitobi and is now part of Adobe. The commercial equivalent from Adobe is called PhoneGap. The two names are often used interchangeably, but Cordova is the predominant framework for hybrid mobile app development.
Cordova provides the native application wrapper and the bridges to communicate with native device APIs from within the WebView. In addition, Cordova offers a plug-in architecture that simplifies the process of plugging new functionality into a hybrid app with native code. Because Cordova is an established solution with a large community, there are currently more than 1,000 existing plug-ins developers can leverage within their app — Telerik maintains a list of verified Cordova plug-ins that have been tested and documented.
Hybrid/native mobile apps
While the hybrid/native model is new, there are already a couple of frameworks designed to help simplify its use, including Microsoft’s Project ACE and Mobify’s Astro. Because these frameworks rely on Cordova, they still allow developers to leverage the Cordova plug-in ecosystem.
Hybrid mobile app development offers numerous benefits, from skill and code reuse to rapid prototyping. However, running your application entirely in the WebView also comes with some tradeoffs. Hybrid/native strategies attempt to mitigate those tradeoffs by leveraging native UI components where appropriate, but it is still a relatively new and experimental model with a steep learning curve.