Mobile Zone is brought to you in partnership with:

Mitch Pronschinske is the Lead Research Analyst at DZone. Researching and compiling content for DZone's research guides is his primary job. He likes to make his own ringtones, watches cartoons/anime, enjoys card and board games, and plays the accordion. Mitch is a DZone Zone Leader and has posted 2576 posts at DZone. You can read more from them at their website. View Full User Profile

The State of Native vs. Web vs. Hybrid

06.16.2014
| 9293 views |
  • submit to reddit

This article was originally published in DZone's 2014 Guide to Mobile Development

A continuing question in mobile development is whether it’s more beneficial to build applications that are written directly for a native platform or to build applications on web languages and technologies. When tools like PhoneGap emerged, a third “hybrid” option became available that could use native code in conjunction with web languages to gain a set of attributes that no native or web apps have. Today, there are also Mobile Application Development Platforms (MADPs) that can generate largely native apps from a single original codebase, which does not have to be written in web languages.

MADPs are compared on a tool-by-tool basis on DZone’s mobile research portal. For native, hybrid, and web applications, this article will serve as a comparison between the three mobile app types. In addition to the comparison information, you’ll also get a snapshot of the industry use cases and current trends around native, web, and hybrid apps.

Cost  

Native apps often cost more to develop and distribute because of the distinct language and tooling ecosystems, which require more investment in developer skills if you need to develop for more than one platform. However, cost is dependent on many other factors as well, so native apps won’t be the most expensive option in every case. Building an excellent mobile web app also requires a high degree of developer expertise, so no matter which type of app you build, quality will always be expensive.

Testability

Mature and predictable native platforms with proven tools tend to make testing easier than the frameworks that create hybrid apps using JavaScript-to-native communication. Web app testing can also be a struggle if the developer isn’t skilled and knowledgeable about the JavaScript ecosystem. Native app testing becomes increasingly difficult if you maintain multiple codebases and support a large number of devices.

Code Reusability/Portability

Perhaps the biggest weakness of native apps is their lack of portability to other platforms. The appeal of web apps is that you can have one codebase and run it on any major mobile platform. The appeal of hybrid apps is similar, because you are able to reuse a large amount of code for each platform. However, web apps aren’t 100% portable. Newer web standards aren’t always supported by the browsers on every device, so even web developers have to worry about compatibility issues. It should also be noted that native app webviews are not the same as device browsers, and therefore have their own fragmentation issues.

Device Access

Although web apps can access some basic mobile device APIs, like the GPS for geolocation apps, they still have very limited hardware access. They don’t have support for Digital Rights Management (DRM), which is needed for many multimedia services, they can’t harness background processing, and they can’t use secure storage outside of applications. There are some new standards currently being drafted by the W3C that will give web apps a few more capabilities for accessing device APIs, but for the next few years, hybrid apps and native apps will provide significantly more access to device APIs. Hybrid app frameworks have made a lot of progress getting access to most of the low level features, like the gyroscope and accelerometer.

UI Consistency

Mobile web UI frameworks help web and hybrid apps build native-looking UI components, but differences still remain. The frameworks also have to stay up to date with major platform design updates like iOS 7. In iOS, a web or hybrid UI is especially apparent, because when UIWebView is used, the bitmap compositing does not happen in the hardware like it would for a native app. Subtle features like the bouncing effect at the bottom of a page on iOS can’t be completely recreated in JavaScript. That’s why the developers who built forecast.io (a web app that rivals native UX) recommend that you build an original UI for web apps, rather than trying to recreate the native UI and having your app look “wrong” to users.  

SEO

This may not be the fairest criterion for native applications, but if you want the textual and semantic content of your app to be found and ranked by search engines, your app has to have a web component. A web component is required because apps are closed environments, and search engines cannot access that information.

Distribution

With app stores, native and hybrid apps are able to harness marketing tools such as rankings and featured placement all in a well-maintained system. Web apps, by contrast, don’t have to fulfill any app store requirements, and they are accessible through any compatible browser.  The disadvantages for native and hybrid apps are the app store requirements and content restrictions. For web apps, the downsides are that you don’t get the marketing benefits of an app store. Web apps also have to be manually bookmarked if the user wants a shortcut on their homescreen.

Performance

Native code will always be the most straightforward path to the snappiest performance.  Hybrid app performance can be strong, but will sometimes suffer depending on how the tools build code to interface with the native OS. Web apps can have strong performance as well, if you have skilled web developers and use modern standards like appcache. Web and hybrid performance will also improve as mobile browsers get faster JavaScript engines. Other things that can help mobile web performance include using WebKit’s overflow scrolling to create scrolling divs, using tools like FastClick to speed up hyperlinks, and only animating GPU-accelerated properties.

Deployment/Updates

If app updates aren’t automatic, they can be a real annoyance to the user. A huge advantage for web apps is that you can deploy them like any other desktop website. Hybrid apps can make some updates through the web without app store approval, but hybrid apps and native apps still have to jump through the hoops of app store approval, and they need to download any updates from the app store.

Monetization

For web apps, you can make money through advertisements, subscriptions, or an app store for web apps, though the vast majority of app downloads still happen in the native platform stores. Native and hybrid apps have more options for monetization, including in-app purchases, platform-native ads, and the app purchase itself. However, to be in the high-profile native app stores, you need to hand over a percentage of your app download revenue to the company that owns the store (usually around 30%). There is also an initial fee to develop for the platform and deploy on the app store.