HTML5 vs. Native: What's a Mobile Developer to Do?
When Facebook CEO Mark Zuckerberg said his company's biggest mistake was using HTML5 for mobile development it sent a wave across the development landscape, re-igniting the conversation over whether to go native or HTML5, Web-standards based when building mobile apps.
At the TechCrunch Disrupt 2012 conference, Zuckerberg said Facebook's biggest strategic mistake was in adopting HTML5 for building its mobile app for devices and said that a recent rewrite of the app delivered better performance.
"We burned through two years on that," Zuckerberg said. "It probably was the biggest strategic mistake we made."
Nat Freidman, CEO and co-founder of Xamarin, told eWEEK he believes the mobile industry is moving too fast for HTML5 and Web standards-based development to keep up. "I think that given what Zuckerberg said, the conversation is catching up with what we at Xamarin have been saying for a long time â native is the way to go for mobile development. Facebook listened to its users and did a rewrite and it has had a big impact on their mobile app usage. It's a big deal and I think we're going to see a lot more developers starting to build natively."
"We are now in a bit of a disillusionment phase for HTML5 as early adopters push the boundaries of the capabilities and sometimes fail," said Al Hilwa, and analyst with IDC. "Anyone who thought that HTML5 was a panacea for mobile development is probably reconsidering. Having said that, the mobile Web will have an important place at the table and some of these projects that pushed the envelope will help push the technology forward."
Xamarin's MonoTouch enables developers to create fully native apps with device-specific experiences that today's mobile users demand. Xamarin delivers high performance compiled code with full access to all the native APIs that make each device platform unique.
When it comes to mobile development there are three primary routes to go: native, Web-based or a hybrid approach. With Xamarin, developers can write their mobile apps entirely in C#. Xamarin provides complete access to each platform's native SDK and UI controls, projecting the entire native API of each device into C#. So the apps you create are native, not write-once/run-anywhere applications that look alien on every platform, Friedman said. Xamarin's cross-platform, mobile app development software enables developers to use their existing skills and tooling to build fully native apps for iOS, Android and Windows Phone, while sharing up to 90 percent of source code across device platforms, he said.
"Our mission is to help developers build better mobile apps faster," Friedman said. Xamarin enables developers to separate apps into two parts, a UI layer and a business logic layer.
"The mobile world is moving so fast and innovating so quickly that it's not likely a standards-based solution will be the right way to develop apps," Friedman said. He said he finds it interesting that Microsoft is not pushing a standards-based strategy for its mobile platform, given the company's position in the market.
Still, native app development may not be right for every company, but hybrid could be the answer. Developers continue to fret over platforms, standards and the next new shiny thing. The hybrid approach seeks to blend the flexibility found in HTML5-based apps with more complex, native mobile apps into one platform. Embarcadero Technologies has experience with HTML5, native and hybrid solutions. Announced last week, its HTML5 Builder solution - a complete, visual Integrated Development Environment (IDE) to build Web and mobile apps -standalone mobile or end-to-end Web applications works to suit the needs of building HTML5, hybrid or native apps.
"HTML5 is not the future of apps," said Strategy Analytics analyst Josh Martin. "While developers dream of 'write once run everywhere' the fragmented support for and limited APIs within HTML5 make this impossible. In fact, we predict the hybrid app is the future. Existing business models are protected, differentiation among and within ecosystems remains intact, and consumption continues unabated. The end result is the continued dominance of iOS, Android and increasingly Windows Phone."
IDC's Hilwa said there is always a fundamental tradeoff with technologies that are designed to be portable. This tradeoff presents a serious challenge with mobile devices which is not likely to go away soon. Top-tier applications that have large user bases and have to optimize for performance and usability are best done in native technologies. Developers know that. "HTML5 has an important and growing place in mobility and I don't see that going away," he said. "Native technologies simply provide more control over the exact placement of computation and are more amenable to performance optimization."
So developers will continue to wrangle with the question of whether to go native, HTML5 or hybrid.
"I see the market rationalizing around two tiers of apps," Hilwa said. "Native apps will remain the best choice for the most optimal user experience or for use of specific hardware capabilities or for appealing to the user base of a particular platform. Mobile Web apps will be better suited for employee apps needing access to back-end system or for not simpler content oriented apps. HTML5 will further mature for more complex apps over the next couple of years. There will be many HTML5 based tools that add value to HTML5 and leverage the Web ecosystem to support cross-platform requirements in the middle. Companies like Adobe have capitalized on this maturation opportunity for HTML5."