Is it a good idea to work with HTML5, and how do you do it? That’s part of what Ethan Evans, Director of App Developer Services at Amazon, discussed in his keynote today at AnDevCon.
HTML5 has performance challenges today, he said, so why use it? He said it’s because Amazon believes that the benefits of rapid updates without requiring app upgrade installation outweigh the problems.
Evans said there are two driving reasons to consider HMTL5: Write once, run anywhere, and the public promise of cross-platform compatibility. Wasn’t this the promise of Java as well, he said? Amazon discovered the value of doing dynamic updates to its app without doing app upgrades. Many developers appear to be using HTML5 more for this reason.
How or where does Amazon use HTML5 today? Evans said in the Kindle Cloud Reader, Amazon AppStore for Android, Amazon MP3 Store, Amazon Mobile (for shopping), Kindle for Windows 8, and Dictionary Lookup on eInk Kindles.
Where can you best use HTML5 today? He said it lends itself to more static or low-interactivity tasks, so you’re going to face more challenges when using it in things like games. High-interactivity apps are challenging places in which to use HTML5, Evans said. He discussed challenging use cases such as scrolling, matching native code physics) in JavaScript, and concurrent sounds.
As for native code, by definition, it’s platform-specific, Evans said. If you do plan to support multiple platforms, you’ll have to port. All updates will require upgrades as well. Building a good UI is hard, and testing your android app involves a lot of effort.
Later on in his keynote, Evans went deeper into what Amazon has done in regards to HTML5 vs. native vs blended. He explained the Amazon AppStore Hybrid Architecture. Features were grouped from a practical standpoint. Presentation Logic and Business Logic were in HTML5; search bar, auto-complete and APP DRM were in native code; and dialogs were in blended.
Evans concluded with Amazon’s future. Its next experiment has to do with server-side rendering. Servers have bigger CPUs and faster access to data and services. Use them to partially or fully pre-assemble your pages, and take the burden off the device CPU. Amazon’s early experiments show the potential.