Thursday, September 20, 2012

Native is good. HTML5 as well.

Readers of Whitespace may already know that I'm a big fan of web and HTML5 but that doesn't mean I don't like native apps. I believe that they will co exist for different reasons as it is today. I chose to talk about this now because of the recent admission of Mark Zuckerberg that they made a mistake of betting too much On HTML5, and the Facebook iOS app going native and the news that a pure native Android app is in the works. I've read comments on discussions on this topic where people saying native is the way to go and not HTML5. Personally I'm not able to agree to Mark Zuckerberg's comment fully. I think HTML5 is not to be blamed for the problems Facebook's apps had rather its the choice of the technology they made to make a native app which has to be blamed. I'll try to explain...

Whats the difference between Native and Web Apps?

A native app has all the code and assets for the UI and its Behavior and may be a bit of Business Logic built within the app, the client, that you install in your phone which can then work offline. The only reason the app uses the internet is to get the dynamic data that would populate the UI. So the data is light and doesn't use much bandwidth to get it and its faster. The advantage is that the app is super fast and buttery smooth in UI behaviors. And yes, there are some device features only a native app can access but its a matter of time. The disadvantages are that every time a change has to be done in the UI, a new app version has to be built, submitted to the app stores and hope that the user will upgrade to the new version. The developer may also have to support different versions of the app.

Whereas in a web app the entire code resides in the remote server and the browser, the client, uses the internet to get the instructions for both building the UI and populating data. This is heavier and will work best only on high speed internet connections. Also the browsers have limited memory and will have to architect the app keeping this in mind. But the advantage is the full control over code, that can be changed/tweaked/fixed anytime without dependencies and can be made sure that all the users use the latest version.

Native vs Web App is not a new debate. It existed during the initial times of desktop and internet too. Here is an excellent article to read more on the merits and demerits of native and HTML5 by Eric Sink.

Now the dilemma and the mistakes

My common sense has still not understood why would anyone decide to build a native application using HTML5. For whatever reasons if you have decided to build a native application why think of building it using web technology? You want to control the UI from the server? Then for God's sake you have to be on the web and not native. Its a trade off and a bold product decision you have to take based on what you want to do and the merits and demerits. Native applications do have the facility to embed some web code in their screens but that doesn't mean you can abuse it to make a full fledged screen based on it. A web page will work best on a browser and not on an embedded browser inside an app. A browser has a lot of features that will enhance the performance of javascript and other factors on a web page which may not be fully available for an embedded light browser. Also the internet connections on mobile are not as good as desktop. Now you know what was the mistake Facebook did with its apps.

HTML5 and Native will coexist

Not to have a web app and an exact clone as an app. Then what should be the strategy? Here is what I think...

1. If you are a well established service on desktop web, then web/HTML5 is the way for you on mobile too.

Your users will definitely expect you to have a mobile optimized site even if you have an app for whatever reasons. Isn't it better to focus on just one product and do it well? A friend of mine who works for a successful online company with a great product on mobile web, recently launched an app. I have used the app and its a great experience but other than that I really don't see the point why they need an app. Their mobile web app works like a charm anyway. He says that his customers asked for it, for reasons he has no idea of, so they decided to build an app. Well as a product company you should know where to draw the line. Some people argue about their app's visibility. Believe me if your product is popular among your users they will come to you.

I have no idea why successful web services like Amazon and Cleartrip need native apps.

The only exception here is Windows Phone 7. Their browser support for HTML5 sucks and so a native app would be a good idea or wait for Windows 8.

2. Go native, if you are on web but have some features/experiences that will need some native mobile goodness. Eg Facebook Chat app. It needs to run in the background and should make use of the push technology to deliver messages in real time. More: Foursquare, Google Maps, Saavn, Google Music.

3. If you are only on mobile and not on web, then go native. eg Instagram, Google Goggles, Latitude, Path, Flipboard, various games.

What happened/will happen to hybrid apps?

I would like to abolish hybrid as a buzz word and a major strategy to make apps. However as a developer I don't mind using some HTML/web page here and there for reuse of code in the app to present some static/semi static content that's same as the mobile web version. Eg BBC mobile app. Their article page is html. However BBC as a service fails to be a candidate for native app as per my earlier logic.

No comments: