Last month, I gave a presentation about cross-platform app development at MobileTechCon in Mainz, Germany. Several attendees asked for for the slides (now available on SlideShare) and since I promised to deliver links to the presented technologies and demos I hereby summarize the material. Also, you can find a video recording of this talk on my blog. I split the presentation into different parts where I tried to motivate the topic “cross-platform app development” at the very beginning.
More than eight major platforms such as iOS, Android, Symbian OS, BlackBerry OS, Windows Phone 7, MeeGo, HP webOS, or bada with different programming languages and paradigms each currently struggle for predominance of the mobile market. Not even looking at the vast amount of different devices, the sheer number of app stores (currently 94) indicates a growing diversity of today’s market.
When producing mobile apps, the key problem arises in the conflict between market penetration on the one hand and cost of development on the other. If you want to address the majority of today’s mobile users you could either develop your app for each of these platforms independently, or try to follow a cross-platform strategy in order to cut the invest. While the former means running several parallel traditional software projects (with all their individual consequences) in parallel, the latter approach tries to reuse parts of the intellectual achievements (often source code) while accepting other drawbacks.
Mobile Web vs. Native Apps
A wide range of software companies and clients choose mobile web applications as a proven way to address any mobile device that features a web browser. At my presentation I used the website of tageschau.de and SPIEGEL ONLINE (both German) to demonstrate the difference between classic and mobile-enabled websites. As a cliff-hanger I demonstrated an ordinary unit converter website on the iPad as well as an optimized web-based game for the iPhone to debilitate the misconception of a missing app store for mobile applications.
In contrast to the aforementioned web-based solutions I presented the gorgeous convert app by taptaptap. It implements the very same use-case “unit conversion” more elegant and efficient even on a smaller display. The Unreal Tech Demo finally proved that native applications offer certain capabilities that are currently out of reach for web-based alternatives.
Even though mobile apps made a big step forward of the last years, they still suffer from technical limitations including visibility on the market due to the absence of an “official” distribution channel. Also, native apps are superior regarding user experience – the foremost reason that made apps such a huge success in the first place.
Both aspects might change over the next years.
Mobile Web Apps
Using any of these libraries simplifies the development of a native-look-a-like web app but comes at a cost. One cannot reuse an existing set of HTML but has to produce properly redesigned documents suited for the given framework. Also, these frameworks are far-off from the idea of cross-platform. Only a limited set of mobile browsers are currently supported. If you need a fail-safe web-based solution you have to stick with an even more cut down feature set or implement platform-specific mobile websites.
One of the major drawbacks of mobile web applications is the lack of the lack of direct access to individual features of the udnerlying hardware platform. Even though recent versions of mobile browsers propagate information such as screen orientation or geolocation they are still limited. There is neither a common way to read the accelerometer nor can one access the camera to upload a video.
Hybrid apps combine advantages of the native world such as distribution via the app store with common web technology as outlined above. But since the rendering and interaction relies on an embedded web browser they appear to me as the poor-mans native app. The user downloads and pays for a native app and therefore should not be disappointed. The developer is required to spend a considerable amount of time to make the included web app look and feel as a native counter part in order to match these expectations.
This approach offers a number of benefits but has an inherent drawback at the same time. Developers are tied to the feature set of the chosen framework whenever the demand exceeds the foreseen possibilities of the given technology or cannot catch up with new features of a platform (e.g. iPhone’s Retina Display). Even though some of these technologies are open-source and offer extension mechanisms, the developer has to stick with the paradigms of the chosen framework. Therefore, she cannot use a project-specific short-cut to deliver the unforeseen remaining 20% of the app without following the restrictions of the framework.
The common idea of this approach is to produce truly native apps for each targeted platform with its respective programming language from a single code-base. During my talk I presented xmlvm and APPlause as two examples of code generators.
The advantages of this approach are manifold and do not end with the extensibility of the produced apps. If needed the generated output can (be adjusted to) interact with every single aspect of the native platform. Even though the results of xmlvm are barely readable, other solutions such as APPlause based on a domain-specific language not only simplify the development process but produce code that conforms to the sample-code in any aspect (let me know if you want to read more about this technology on this blog).
These advantages come at a price of a relatively high upfront investment, though. None of the publicly available technologies is production-ready right now. Nevertheless, if you plan to produce a set of related apps or try to mobilize an enterprise application you should definitely have a look at this approach!
Where To Go?
Unfortunately, there is not one technology to bind them all. The right choice depends on the specific needs of your project and often turns out to be a combination of the aforementioned approaches. At the end of my talk at MTC 2010, I had a very lively Q&A session with the audience regarding this question. S&S allowed me to upload the video recoding of this talk on my blog.
As always: If you need further help with your current project, just let me know.
Also, if you happen to be at this year’s iPhoneDevCon in Cologne (01-02 December) you should attend my session about cross-platform mobile development. I will give a similar, refined presentation with a lot of live demos and more information on the audio track. You welcome to ask more questions over there – but this should not bar you from dropping a comment below.
Meanwhile, S&S media gratefully allowed me to publish a (German) live recording of this talk.