In association with heise online

Performance or simplicity?

RIM relegates Web apps to widgets on the BlackBerry platform, as do most other smartphones; Apple quickly moved away from Web apps to native apps with the App Store. How is Palm making Web apps fast enough for developers? Open source is helping here too, by speeding up JavaScript; the runtime on the device is the V8 JavaScript Engine (developed and then open sourced by Google). Galbraith claims look at it in that light and “the question becomes ‘Does v8 compile JavaScript as efficiently as other compilers might compile C++ code?’ Google has invested a lot of time [in V8] and all of us who invest on the Web have a strong interest in seeing JavaScript be more performant.”

The issue he sees with mobile Web performance is more about rendering; “For most application categories the bottlenecks have very little to do with JavaScript and much more to do with graphics - and graphics is catching up.” That’s because of hardware acceleration, for which Palm will be using the WebGL bindings for OpenGL hardware-accelerated graphics . “[On the desktop] we allow the GPU to accelerate the Web in most browsers; that will come over time with Palm. The SDK doesn't give access to the GPU today; I can’t comment on a specific timeline, but that limitation will be removed. We’ll be doing it through CSS transforms and in standard ways, with WebGL. We’ve publicly talked about how that's coming - but we can’t comment on when that will come.”

Almaer suggests it’s also about being realistic: Web apps have their place. “There are certain categories of apps where you want native code whether that’s C or C++, for so called ‘hard real time’. I think those categories are fairly minimal, like the call stack. We don’t mean to assert those types of apps will be written with JavaScript any time soon. Our goal is to take end user apps - games and business apps and those other outliers. Those really stringent apps will always require some form of low level code, maybe even assembler to facilitate their performance.”

The good news for Palm is that relatively few developers want to write that type of application for mobile; Almaer explains there’s also the option of tying apps more closely to the Palm platform in exchange for extra features. “The PDK also provides an on-ramp to native development. With the PDK, developers who are new to [mobile] platforms can bring titles to a marketplace that is more a greenfield and that combination is really exciting.”

As examples, he names game developers Electronic Arts and Glue: “Glue is an example of someone who was able with minimal effort to bring their games over from the iPhone in six days. That excites us because as much as we love the Web, we don’t want to tell you have to recode that from scratch. And then we have this Flash plug-in coming to our platform soon. That community is huge.”

“And from a high level,” Galbraith chips in, “what's exciting [about Flash] is that it’s resolution independent because it’s vector, it’s scaled graphics.” He’s realistic about whether HTML 5 will be replacing Flash any time soon: “HTML 5 has just become a catchall word for new Web development.”

It’s also important to remember that the smartphone is a mobile platform, with limited battery life. Galbraith claims “Our first focus is battery life. We have some technologies we hope to release soon to address that issue. We’re helping developers to batch up all the data into a single burst when you turn on the radio rather than sending it bit by bit. That's our primary focus, so you don’t hate us. Secondly, our focus is making those things as easily as possible for developers.”

Open Web, not one Web

Galbraith suggests that Palm developers will rarely be only Palm developers. “I think the majority of developers in the modern world will be targeting multiple devices. I think we’re at the dawn of the device explosion and what’s going to happen in the next few years is that more and more companies are going to get involved in this feud, this war. More developers are going to be whatever the programming equivalent of polyglot is on multiple devices.”

He believes Mobile Web implementations aren’t going to unify into one single platform any more than desktop Web implementations have – even when you factor in the open source, licence-free advantage of Android. “Although I think it’s definitely coming together, there's always going to be differences. You see the challenges of this with Android. You've got one company controlling the stack end-to-end and yet they can’t stop fragmentation; there will always be that tension.”

To Galbraith that goes back to the advantages of the open Web and open development standards over specific implementations (open source or not); “We don’t think it's possible or even desirable to have a world where every device has exactly the same runtime; that's not the destination we’re even advocating. This is what it means to deliver experiences for mobile; it's not ‘write once run anywhere’. Most devices are using WebKit, we’re seeing Mobile Firefox here and there… the fact that all these emerging platforms have great mobile Web runtimes - that excites us. What unites us is far more powerful that what separates us. As a developer, I can write all this JavaScript code that just works across different runtimes and frameworks that insulate me from the cross-platform differences. It’s nice to have the same APIs but most developers just need the function present in some way. It seems like every time I turn around there's a new platform that’s emerged to smooth over the differences.”

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit