Recently I've found myself building more and more applications that need to run on a number of mobile devices; from BlackBerry to BREW, iPhone to Android, iPad to Desktop. When building applications for numerous devices, you have two options: "Go Native" or "Go HTML".
"Going native", or building applications in the native languages for devices offers the best performance, and offers access to underlying hardware and low-level SDKs. You will not find better performance on a mobile device than the native SDKs. However, it may also require a diverse skill set, and potentially multiple applications to maintain. If you are targeting the masses, this means you would need a BlackBerry application, an iPhone application, a Windows Mobile application, and let's not forget that you may need different application versions per supported revision of target mobile operating system.
If your application doesn't need the capabilities exposed by native SDK, and you want a single codebase to maintain, there is one very clear alternative that has been around for many, many years: HTML.
You may feel as though you are going back in time to the pre-RIA days (as I sometimes do), however mobile browsers are increasingly more capable. They are an ideal choice for applications that need to reach a large number users, on a large number devices. Not all browsers support HTML5, but most support HTML4.1, and most support JavaScript. Many of the javascript frameworks have grown to a level of maturity that enables robust "enterprise class" applications that you can rely upon. For devices that do support HTML5 features, you can take advantage of those features as necessary. You may need to account for conditional code based on specific platform features and APIs, however it can be maintained by a single skill set, as opposed to learning multiple development languages and frameworks.
Recently, there have been a number of JS frameworks that have mobile initiatives. Below are just a few:
When performing initial research into the capabilities of your target devices, you can use http://html5test.com to see if the features are supported. When you are ready to start developing, you can use http://html5boilerplate.com/ as a baseline for your applications; it includes much of what is needed to have your application work well across many devices. At runtime you can use something like http://www.modernizr.com/ to check if specific HTML5 features are enabled, and have your application react accordingly.
Yes, you have to fall back upon old-school HTML tricks, and conditional programming based upon features. You will need to support both touch and non-touch interaction paradigms, need to support device specific features, and yes, you have to account for numerous aspect ratios.
The positive side is that you can build an application that is accessible nearly everywhere, by nearly everyone.
--------------------
Andrew Trice
Technical Architect
iDev Practice Manager
Universal Mind