Monthly Archives: March 2013

A bright future for mobile HTML5: Firefox OS

A few blog posts back I talked about my experience as a teenage developer writing a HTML5 game from scratch and how I thought it was ready for some pretty sweet games. My opinion hasn’t changed: HTML5 is still ready for great applications. It may not be the best for all your applications, but it is should be an option to consider. HTML5 allows for rapid development, cross-platform, and it’s open. However, there are always the critical performance projects that must be native.

The Consumer says: HTML5 is too slow, I’ve heard about it!

Even if you aren’t a developer, you probably still have heard the buzzword “HTML5″ and how Mark Zuckerberg has said it is one of “Facebook’s biggest mistakes” to be relying on it. Let me tell you something, some of the media (un-shockingly) took this quote out of context. And I’m sure some of them know this, but they keep on using it.

Here’s a quote attributed to Zuckerberg from the W3C Mailing List:

“When I’m introspective about the last few years I think the biggest mistake that we made, as a company, is betting too much on HTML5 asopposed to native… because it just wasn’t there. And it’s not that HTML5 is bad. I’m actually, on long-term, really excited about it. One of the things that’s interesting is we actually have more people on a daily basis
using mobile Web Facebook than we have using our iOS or Android apps
combined. So mobile Web is a big thing for us.”

Per the quote above, he is not saying “HTML5 sucks”, “HTML5 is bad”, or “HTML5 is slow”. Not that at all. Comparing HTML5 to Native, what Facebook’s mobile app really needed was native. That’s all. No big deal.

I’d like to point out something because I found this the most interesting part of this quote:

“One of the things that’s interesting is we actually have more people on a daily basis
using mobile Web Facebook than we have using our iOS or Android apps
combined. So mobile Web is a big thing for us.”

Again, per the quote above, they have a large amount of users on their mobile website instead of their mobile applications. This is quite funny, as a lot of the media talks about how slow HTML5 is. Yet the majority of Facebook’s users are using their mobile website which is ran completely on HTML5.

So the question is: “what was wrong with Facebook’s native application if HTML5 works fine on a mobile browser?” I’d say the WebView was the issue. Using a WebView was my first attempt at making my HTML5 game a native application. The WebView is insanely slow. It is so slow. Your brain will begin to process thoughts in an incredibly slower rate if you think about how slow that WebView is. Seriously, it’s slow!!!

Developers may be able to optimize the WebView by configuring certain settings (high rendering priority, enabling hardware acceleration, caching behavior). But there have been some great developments that offer fast alternatives to the WebView.

A blazing fox decides to make his own open-source mobile operating system

firefox-os

For the past couple of years, Mozilla has been working on a huge project: FIrefox OS. Firefox OS is an open source Linux-based mobile operating system written in HTML5 & C++.

I’ve recently been playing with the operating system using the simulator and I can say it is going to change the perspective of HTML5 applications for the good. Firefox OS will allow HTML5/JavaScript to communicate to the mobile device’s hardware directly.

HTML5 Applications on Firefox OS will work as if it was written in native code. I believe Firefox OS will burn Chrome OS into ashes (cause you know, the fox is on fire). Most Firefox OS applications do not require internet connection which is great.

When I talk about HTML5 Applications on Firefox OS, it is not the same as if they were running on a browser and dealing with all that extra stuff to get it working. HTML5 Apps on Firefox OS will run on an native runtime. We’re talking about some deep stuff here guys.

Firefox OS is currently pumping out:

  • Web Telephony API – Phone call state & control
  • Web SMS API – Text Control & Interact
  • Screen orientation – Control & Detect
  • Network Info, Power Management, Battery Status

This is all the sweet stuff you’d expect in an native Android application. I think Mozilla is going to hit the mark with this one and I’m honestly very excited.

Firefox OS is already hitting it big with device makers, LG Electronics, ZTE, and TCL Corporation reported plans to create devices shipped with Firefox OS on them. LG is already thinking about making a smartwatch with Firefox OS. Wouldn’t that be pretty cool, for users to use your HTML5 App on their smartwatch?

hacking-firefox-os-slidesFirefox OS is a fully open source ecosystem which is really great. You’re not closed in, my friend. I can download the Firefox OS source code and start hacking away & start adding new features, fixing bugs, and more.

We’ll see how it turns out, but I am quite sure that Firefox OS’s future is going to be swell.

Conclusion:

Now is a better time than ever to consider HTML5 for your mobile application. With the specification maturing, better browsers like Firefox & Chrome, Firefox OS packaging your HTML5 App into working like a native, and native wrappers dropping the Webview and becoming hardware accelerated, HTML5 is a viable option to choose for your mobile application, and it’s just getting better.