HTML5 vs Native Apps – Which one is Better?
The other day I was reading an article comparing HTML5 to Native applications. This is a common question so I thought I would hit the pros and cons highlighted in the article. Because I have issues with several points.
Before I start my response to the article let me say the list of pros and cons presented represent many misunderstood attributes of HTML5 in particular. If you get anything out of this article I want to emphasize HTML5 is far more capable than it is given credit. Where HTML5 tends to fall short can be more attributed to poor coding, architecture practices and lack of knowledge about browser capabilities.
Let me define a native application. This is an compiled application written in a language like C# and works against native APIs. Typically these applications are distributed through a platform controlled store with a high financial transaction cost, 20-30%.
The article lists the following advantages to native applications. I am going to respond after each item.
1. Native apps will allow you to take the advantage of device specific features like GPS, camera, notifications, contact list, touch screen gestures and much more.
Yet I think the average developer is unaware browsers have supported these features for years. Accessing the contact list I would be a bit leery of implementing because this could be a privacy/security concern. It is much safer to access a secured cloud based API for this sort of data in my opinion.
Notifications are coming very soon. Right now this is dependent on browsers supporting service workers. To be fair this is the#1 client feature request I cannot properly meet today with HTML5. But I think by this time next year we should have a common solution to the problem.
- You can access native apps in offline mode too, when you don’t have an internet access or there’s poor network connectivity.
Again application cache and offline mode has been supported for years. This story will improve in the near future with service worker features. I use the current offline capabilities to help make my applications load instantly after the initial download experience.
2. The UI of a native app is consistent with the platform it has been built for. This makes it easier for the users to access and use the app.
If think there has been enough user experience research to disprove this approach. Making the application appear like the native operating system was a common recommendation 4-5 years ago, but not today. Make sure your application follows user experience best practices and be comfortable defining your applications personality.
The main operating systems (iOS, Android and Windows) have all settled on similar UI models, a flat UI experience. Adopt something along these lines and make sure you read the current user experience research. Apply user experience features based on the research, but continue to test to ensure things work for your application.
3. Native apps give a more personalized experience. They enhance users’ experience as their functionalities are similar to your Smartphone’s like the ping sound, messages for alerts, push notifications and much more.
This one seemed like a stretch. Again I will give them notifications, for now. But I can make a ping sound in the browser, we have been able to for a couple of decades. I can create an application that lets the user customize the UI, I rarely see this being done in HTML5 or native applications, so not sure this is a real advantage.
4. Native apps can be seamlessly integrated with the backend systems like ERP, SAP, CRM and others for real-time data access in business.
This point made me wonder how much the author knows about software architecture. Integrating with a backend system involves consuming an API. HTML5 and AJAX are how web clients interact with back-end systems. The concept of a SPA revolves around this API based system.
1. Native apps have to pass the mobile app stores’ approval processes depending on the platform. Even the updates require approvals. This may sometimes lead to delayed time-to-market.
2. To develop and distribute native apps, a specific amount of fees is to be paid to the respective mobile app stores including payment of a specific percentage of the sales revenue.
Agree, big disadvantage
3. Higher development costs are to be incurred and the development process is time consuming in native apps.
4. It becomes difficult for developers to provide support as different mobile devices use different versions of the native app.
5. For developing native apps, businesses have to make a choice between various platforms as the native apps work only on one platform. And taking this decision is a difficult task as it would mean forgoing the benefits of the other platform.
1. An HTML5 app is accessible from all the devices. It gives users, the same experience across all the platforms and OS.
2. Web apps remove the problems associated with the instability of a mobile platform as web is there to stay and won’t disappear in future.
3. HTML5 apps require lower development costs and can be built with the requisite web experience unlike native apps that require specific skills for each platform.
Agree. Some would disagree thinking you need to code to specific browsers. Instead you should code to recommended standards and your applications will run across platform almost 100% of the time.
4. HTML5 apps don’t go through the approval process of the mobile app stores and can be launched immediately. There’s no restriction on the content or subject matter.
Another benefit is you can publish as many times a day as you want. Your deployed application will always be up to date.
5. No cost is to be incurred in publishing HTML5 apps like native apps. No third-party fee is to be paid.
Well if you have credit card processing of any kind you will have a transaction fee. I have built numerous e-commerce sites over the years. These fees are usually 2-3%, not 30%.
6. HTML5 apps require no installation as they are hosted on web. The same URL works for both web and mobile. They are even easier to maintain as changes made in the app is instantly reflected across all platforms.
'web and mobile', responsive design is a big advantage because you can build a single multi-platform and device application.
7. Web apps offer greater speed and flexibility in updating, enhancing and fixing bugs.
Again, continuous deployment rules.
8. HTML5 apps get the benefit of being indexed and found in search engines. This increase their visibility and businesses can get faster and wider audience reach.
1. HTML5 web applications have limited in-browser caching for offline access.
Untrue. My entire SPA architecture relies heavily on in-browser caching. You can cache quite a large application in localStorage. If you do not have enough localStorage space you can use IndexDB (WebSQL on iOS) and get even more storage.
2. HTML5 applications do not have a UI similar to the device. It has a standard UI which works across all the devices, thus keeping users’ void of the native experience.
I already stated this is an old school best practice. User research shows this is not important.
3. HTML5 apps run on a web browser, making the speed of the app a bit sluggish with animation not always running smooth, problem in swiping back & forth for more functionality, scrolling being choppy and hand gestures to control the users’ experience not being at par with the native apps.
Unfortunately most web sites and applications are not coded properly. I have written a book on building high performance single page applications. These web applications are arguably faster than native applications. Native CSS animations are just as good as native animations, but rarely utilized by web developers. Statements like these tell me developers are unaware of CSS animations and transitions and too focused on fast food frameworks.
4. Web apps only have limited access to the device sensors. Some of the features like GPS, accelerometer, local storage etc. are accessible, while some are not.
Very few devices sensors that matter are not accessible at this point. Sure I would love to have 100% access. However some device specific features are unique to a particular platform or even a specific device. This means it is not a feature that can have a common, open specification, defined. For example I can create a live tile on Windows for a web page just like I can a Windows Store application. I can add an application icon and run in full screen mode on iOS and Android, but using a different specification.
Web applications are on pretty equal footing with native applications. Each approach has some advantages, but there are very few differences. These lack of differences make the web a clear choice for client applications. Web applications clear advantages lie in low purchase transactions fees and continuous deployment support. Native applications do have a leg up in limited cases where notifications and hardware specific functionality is required. However notifications should be commonly supported in the coming year, eliminating another native advantage.
The vast majority of client applications can and should be HTML5, not native. However more web developers are needed that understand how to properly architect these applications. Unfortunately they are in short supply these days. This year I have felt an upsurge in demand for pure web developers over generalist. This is due in part because hiring managers and stake holders understanding the economic impact of mobile and cross-platform support. I encourage you to challenge yourself and learn good modern web architecture and development practices. See if you can recreate a popular native application in HTML5. I think you will be surprised at what you can accomplish.