Why HTML5 makes justifying native applications more difficult - Web Development - Techguide

Why HTML5 makes justifying native applications more difficult

 

Summary

Justin James, who is now very bullish on Web applications, explains what you need to consider when deciding whether to write a desktop application or a Web application.

Events

Echelon 2012
June 11 and 12, 2012

University Cultural Centre, National University of Singapore

Startup Asia Jakarta 2012
June 7 and 8, 2012

12th Floor, Annex Building, Wisma Nusantara Complex, Jl. M.H. Thamrin No. 59 Jakarta 10350, Indonesia

MMA Forum Singapore
April 23-25, 2012

Grand Hyatt Singapore

One of the biggest shifts in development in the last few years has been the move to Web applications. For a long time, developers resisted this move, and some of the reasons why were good. For example, I said that for a long time the Web model wasn't so great--the UI capabilities weren't there without a ton of work, and the ability to do "real work" was lacking. Some of the reasons were not so good, and mostly boiled down to a refusal to learn something new.

I have recently become very bullish on Web applications, and I now highly recommend that you consider them over desktop applications in all but a very few sets of circumstances. When you are deciding between writing a desktop application or a Web application, these are things that you should take into consideration.

When do you "have to" write a Web application?
Under certain conditions, you must write a Web application, regardless of what you would prefer to do, either for business or technical reasons. Here are some of those situations:

  • Zero footprint installation (Flash and Silverlight work well here too)
  • Software-as-a-Service (SaaS) billing model
  • Cross-platform compatible (Yes, you can use one of the cross-platform widget libraries too with native code, but Web is much easier.)
  • Server-centralized control of logic, resources (data, CPU, et al), etc.
  • Public facing application with highly sensitive data that needs to stay behind a firewall
  • Needs to communicate between the client and a centralized server outside of the client's network

Note that some of these situations have exceptions. That's fine, but keep in mind that the alternatives to Web applications in these scenarios are often no better and often worse in many ways than Web applications.

Mobile
In large part, the growth in mobile devices was the beginning of the end for desktop applications. You could count on being able to target Windows and hit 95% of the potential users. Now, so many people (especially consumers) use mobile significantly enough that it is hard to get complete coverage of the market with a native-only approach. To make matters worse, not only is the mobile market highly fragmented between the different mobile operating systems, but the #1 player in mobile right now (Android) is highly fragmented amongst itself. If you really need full coverage of the market without having to learn enough native development to cover the mobile market well, Web is the way to go.

Windows 8
Windows 8 is the straw that broke the camel's back for me. Pre-Windows 8, I would say that you shouldn't write a Web application unless you had to write a Web application. Despite the boom in mobile, it just is not enough to tip the scales for many apps, but Windows 8 is in my opinion.

With Windows 8 looming, the time is right to reconsider native applications entirely. Instead of asking, "do I need to write a Web application" you should be asking, "do I need to write a native application?" Why? Simply put, with the changes coming to Windows 8, if you want to write applications that need a lot of input and similar hallmarks of "real work," the Metro UI is not great for it, and if you don't want to use Metro, you are locked out of the ARM devices. Or to put it another way, unless you are writing an application that can work well as a touch application, a Windows 8 native application is a bad idea, and a "legacy" Windows application locks you in to the existing Windows market, which will only get smaller over time.

Do I need to write a native application?
That's a good question! Let's look at the common wisdom answer to this question. Typically, I would say "yes" if the following are true:

  • Needs to be able to work offline as well as online
  • Requires substantial access to the local system's resources, particularly CPU/RAM
  • Performance considerations
  • Heavy graphics work
  • Integration with other systems
  • Desktop-quality UI widgets

Up until HTML5, I would call that a really good list. HTML5, though, answers each of these in a way that makes it even harder to justify native applications. Let's look at that list again:

  • Needs to be able to work offline as well as online: There are provisions for enough local storage capabilities to handle syncing.
  • Requires substantial access to the local system's resources, particularly CPU/RAM: Web Workers gives you a development model to not hog the system and block the browser.
  • Performance considerations: Browsers' JavaScript engines have made huge improvements, especially Chrome's and Internet Explorer's.
  • Heavy graphics work: The <canvas> tag allows bitmap graphics manipulation.
  • Integration with other systems: WebSocket allows full-duplex, persistent connections.
  • Desktop-quality UI widgets -- Improvements to the <input> element and the addition of the <menu> element allow for a much richer UI experience; jQuery has continued to fill in the gaps.

As you can see, HTML5 offers compelling reasons to re-evaluate the decision to go Web or stay native. Indeed, other than certain specialized or niche scenarios (like integrating directly with a "legacy" Windows application), it is very difficult for me to recommend building native applications for typical consumer or line-of-business applications going forward.

Justin James is an employee of Levit & James, Inc. in a multidisciplinary role that combines programming, network management, and system administration. He has been blogging at TechRepublic since 2005.

Talkback

Great post - especially like you calling out the HTML5 features that are closing the gap with native apps. I assume your list wasn't meant to be complete, as there are certain native features that HTML5 has limited or no access to (e.g.: camera).
It was great to see WebSockets on your list. WebSocket implementations in mobile browsers are becoming really good. And even if the browser has only partial or no native WebSocket support, WebSocket emulation can help. Some of your readers may be interested in further readings on WebSockets, they may want to check out http://blog.kaazing.com.
Thanks for the nice article!

pmoskovi February 24, 2012

The signature didn't make it above - so here we go:

Peter Moskovits
Developer Evangelist - Kaazing

pmoskovi February 24, 2012

I like the article - but you have a valid point there Peter: "...as there are certain native features that HTML5 has limited or no access to (e.g.: camera).". This fact is not being touched on in the article itself.

And this is exactly the limitation that makes it difficult to for the developers that need to make a decision today, to chose HTML5. Many applications need to access native drivers s.a. special printers, scanners, camers, card-readers, etc, etc...

If this problem had a solution then HTML5 would be the way to go - hands-down.

Currently I am in the process of making such a decision. This is for an application that will need multi-platform support. iOS, Android, Windows, etc.
There are not many options for us which is why am leaning towards Flex - although Flex also is experiencing some radical focus changes.

Bjorn Heidarr

bheidarr March 27, 2012
Add your opinion

In order to post a comment, you need to be registered. (Sign In or register below)

Post your comment

ZDNet Asia Live

China solar cell makers seek Taiwan partnershipshttp://bit.ly/JErUGz via @zdnetasia #solar #energy #china

Malaysia organizations don't realize severity of cyberattacks http://t.co/PUCv68Rd

News: Radio Costa Rica by EnjoyIT 1.0: Radio Costa Rica allows you to listen to a great var... http://t.co/BLzVT5As http://t.co/1Dhcy6ki

The key for mobile operators is identifying the applications that are popular with subscribers on their network. They can then work partn...

2 hours ago by camcullen on Experience trumps content in apps monetization

Experience trumps content in apps monetization | ZDNet http://t.co/gBXcjbGd

Experience trumps content in apps monetization - ZDNet Asia News: "What we are doing currently is not to monetiz... http://t.co/S2EZtd8m

Malaysia organizations don't realize severity of cyberattacks: "Minister Maximus Johnity Ongkili said at the Sec... http://t.co/bgVlOBvx

#security Malaysia organizations don't realize severity of cyberattacks: "Minister Maximus Johnity Ongkili said ... http://t.co/hkFb4zrI

Malaysia organizations don't realize severity of cyberattacks http://t.co/EEEmRM3j via @zdnetasia

Malaysia organizations don't realize severity of cyberattacks - ZDNet Asia News http://t.co/YpNMYgb5

Malaysia organizations don't realize severity of cyberattacks http://t.co/FFems54Q

China solar cell makers seek Taiwan partnerships http://t.co/p5Hh7kJD

Big data acquisitions pave way to fast, effective innovation http://t.co/hdiEfBsz via @zdnetasia

Integration, focused investments to propel Windows Phone: By Kevin Kwang , ZDNet Asia on May 23, 2012 (2 hours a... http://t.co/E7tsZbHJ

Integration, focused investments to propel Windows Phone http://t.co/u9TqjQ8C

ZDNet Asia IT Salary Benchmark 2012 http://t.co/rVwYlV7H

So much as we know , MTK6575 extremely integrated frequency1GHz ARM Cortex-A9 processor, the superiority of 3G / HSPA Modem, and help the...

1 day ago by y15822137359 on 5 SaaS adoption speed bumps to avoid

I reckon your view: "CRM is strategy, not software", if a company replicating the approach uses in ERP implementation into CRM, what they...

2 days ago by wykoong on Gartner: Mobile CRM gives better ROI than social

This video will teach you about the Excel fill handle but also provide you with a workook to download... http://www.youtube.com/watch?v=...

3 days ago by TradeBrother on A quick fill handle trick for Microsoft Excel

waiting...

5 days ago by eapete on What should count in a company's market value?

Boy, you've opened a can of worms now.

Wait for the rants & raves.

5 days ago by eapete on What should count in a company's market value?

I was puzzling before this whether to replicate the success formula we executed for a financial institute, and come out with a standard s...

6 days ago by wykoong on Drop the egos, copy ideas, then innovate