Like any other winner-take-all industry, the digital music world is not immune to trendy tech solutions that come and go. Hybrid apps, however, are one trend that’s here to stay. Software developers in almost every industry have been meeting their customers’ needs for years with early versions of hybrid app technology and in the next few years, hybrids will reign on tablets and mobile phones.
I’ve spent a significant amount of time investigating what exactly a hybrid app is, and the best technologies to build one. The requirements for the nascent digital music service that LimeWire is currently building are driving a deep understanding of what it means to be a hybrid.
‘Real’ Hybrid Apps
It means that your service must be available both when you are connected and disconnected. It has to be deeply integrated into both the local file system and a set of cloud-based Web services. A pure-desktop app with a sprinkling of Web features just won’t do. A pure-Web app with Ajax feature won’t cut it either. Consumers are just too demanding.
And for a digital music service, a real hybrid app means that it has to search for and play music immediately — music lovers don’t want to wait a few hundred milliseconds to hear their favorite tracks.
What we are starting to see with today’s hybrid apps is an architecture where speedy local desktop UIs are deeply married to dynamic online content and services. It’s not an afterthought or clever trick. It’s the starting assumption. Technically, that means a fully functional Web browser embedded inside a local application shell. Content is served up fresh from the standard Web servers and stored locally in standard files.
This has been termed “interoperability.” Software developers have been chasing interoperability for ages. All sorts of standards have come and gone promising true interoperability. The benefit of interoperability for consumers is long-term access to content. A hybrid application based on existing Web standards and existing operating system services means that downloads won’t be lost as technology continues to evolve.
There are many technical options for implementing a hybrid app, and you can build prototypes with almost all of them. A few of the leading contenders include Nokia’s OT with WebKit, Appcelerator’s Titanium, and Oracle’s Java Platform integrated with Gecko.
Appcelerator’s Titanium is another hybrid app framework that is focused on mobile as well as desktops. Titanium is a rapid development tool that conserves a lot of complexity for the engineer — it lets you write native apps using Web dev techniques. It’s also a newer framework that is maturing rapidly. I like Titanium a lot, but feel that it needs to mature a little more. Writing a native app with Web tools is fast, but sometimes you need to wrestle directly with the complexity of the OS, especially if your product demands deep integration and performance.
Oracle’s Java Platform integrated with Gekco — Java is the original cross-platform solution (well, not the original but certainly well-tested by now). Gekco is the Mozilla foundation’s technology that powers Firefox. Technically this is not a “product” like QT and WebKit or Titanium, so you have to know a thing or two about both to integrate them. We found that Gekco was not as HTML5 complaint as WebKit nor as fast at rendering and parsing. However, through testing we have found that Gekco supports the mature parts of HTML5 with both speed and reliability.
Of course, you can go completely native and use the .Net or Coco frameworks as the basis for your hybrid app. You’ll have less shared code, which can be difficult to manage, but you’ll have native UIs. However, if you want to provide a consistent user experience on all operating systems and devices, a single cross-platform framework, like QT, Titanium or Java, is the best way to achieve it.
The Server Side
Once you have the client side of your hybrid app, you’re not finished. You also need to build the server side. Luckily, if you’ve based your hybrid on a standard Web client, you can use almost any HTTP stack on the server side. For example, we’re using a variety of Web technologies, including Java, Hadoop, PHP, Python and Riak, all communicating via Apache Thrift. This architecture lets us use the right tool for the job and was pioneered by Facebook (among others).
More Options: JQuery and SproutCore
In our prototyping and development efforts we found both JQuery and SproutCore to be very useful. Apple is a big supporter of SproutCore, and just about everyone in the industry is using JQuery.
The Hybrid Rule
Overall, hybrid isn’t the exception anymore — it’s the rule.
We’re building a hybrid app not because it’s trendy, but because it’s the only way to provide our savvy music consumers with the features and services they have come to expect from a world-class product. Our users don’t just use a single computing device: They hop off their laptops and on to their mobile phones and expect a seamless transition. Our music service has to be deeply integrated into both devices and the cloud simultaneously because our users have deeply integrated technology into their lives.
A hybrid application based on existing Web standards and existing operating system services means users won’t miss a beat.
John Pavley is VP of engineering for LimeWire.