Week 18: Mobile development technologies

Introduction

Last week we covered cross-platform mobile web development with WURFL. This is all very well if all we want to do is create websites which are viewable on a mobile device, but often we want to write custom applications for mobile phones, i.e. standalone applications which run independently of a web browser. Why might we want to do this?

How to develop a mobile application

Typically you download a Software Development Kit to a desktop machine, which comes with an emulator - a graphical representation of a phone which you can test your application on. You develop and debug your code on a desktop machine, and then transfer it to a mobile device, once it's known to work on the emulator. Of course further bugs might come to light on the actual mobile device - probably the trickiest part of mobile development!

Location based applications - GPS

Before considering the different development options and mobile operating systems, a word on GPS (Global Positioning System) as this is one of the most exciting developments in the mobile software world. Certain mobile phones (e.g the Nokia N95/96/97) can use GPS - a series of satellites controlled by the US - to locate you on the Earth. This is the same technology that car "satnav" (satellite navigation) systems use.

This allows the development of interesting mobile applications that use your position on the Earth to deliver information about nearby points of interest, such as pubs or restaurants, through your phone. GPS enabled phones are the most effective for these location based applications, but any phone can use the mobile phone mast system to give an approximate location on the Earth.

Mobile operating systems

Back to the main topic of this week, and what options are available for the development of native (standalone) mobile applications? The first thing to consider is the operating system as different programming languages are supported by different operating systems. The main operating systems are:

Mobile development technologies

So what are the development options for actually creating applications for mobile devices? These are the main options:

Java ME (Java Micro Edition)

The most widespread development option for mobile devices is probably Java ME (Java Micro Edition). This is a slimmed down version of the full Java programming language (one of the most commonly used programming languages today) for hardware with relatively limited memory and processing power, such as many mobile phones. We will be looking into Java ME in more detail next week but here are its key features.

So what are the disadvantages?

Even still, for most general-purpose mobile applications Java ME is probably the natural choice, due to its widespread support, and the fact that it is relatively easy to develop for.

Symbian C++

Having talked about Java ME, it makes sense to move on to Symbian C++ because for many of the most common devices, this is the alternative. As discussed already, many mobile devices use the Symbian operating system. C++ is a programming language similar to Java, but allows more direct control over the hardware. This makes it very powerful, but also makes it easier to make mistakes and possibly crash the device. Advantages of Symbian C++:

Disadvantages:

.NET Framework for Windows Mobile

Windows Mobile phones do not come with Java ME installed, although you can install Java to them yourself which allows you to write Java applications. However the normal way of writing applications for Windows Mobile is the same as the normal way of writing regular Windows applications: the .NET framework. The .NET framework is a library developed by Microsoft to allow you to create graphical and network applications on Windows operating systems, and since Windows Mobile is a Windows operating system, you can write .NET applications for it. In terms of the actual programming languages, you would use either Visual Basic or C#.

Advantages of .NET framework:

Disadvantages:

iPhone

Apple's iPhone is, like the Nokia N95/96/97, one of the more advanced "smartphones" available. It runs its own operating system and consequently you need to write applications built specifically for the iPhone. iPhone applications are developed in a language called Objective-C, which is related to C++; like C++, Objective-C adds object orientated capabilities to the older C language. Since it is an Apple product, developing for the iPhone shares similarities to developing desktop applications for the Mac.

Advantages of iPhone development:

Disadvantages:

Android

One of the more recent entrants to the field of mobile development is Android. Android is a complete operating system available for mobile devices, based on Linux. Unlike every other option discussed here, it has been built from the ground up to be open source; both the core operating system and the standard applications available are open source applications. To develop applications for Android, you use Java, but the libraries (add-ons to the language for developing graphics, network applications, etc) available are different from those available in Java ME. Android uses its own Java libraries for these tasks rather than those from Sun, the originator of Java.

Advantages of Android:

Disadvantages:

References:

Qt

The final option we'll consider is Qt. Qt is a library for developing cross-platform graphical and network applications in C++. So far it is available for a range of desktop operating systems such as Windows, Linux, Mac OS X and Solaris (Sun UNIX), and also Windows Mobile, but Nokia have announced Qt for Series 60 (Symbian) phones: see here. This is potentially a very exciting development as it means that it will be possible to develop truly cross platform applications which run on both desktop and mobile devices with only small changes (due to the smaller screen resolution of the phone). It is likely that Qt will have many of the advantages of Java ME (easy to develop for, cross platform) but without some of the disadvantages (compiles to native code, access to hardware). So the advantages of Qt:

Disadvantages:

So what platform should you develop for?

As you can probably see from the above, mobile development is a fast-changing area with new options appearing all the time: the iPhone and Android options have only been available for the last year or so and Qt for Symbian is due in the near future. The best all round option right now is probably Java ME, though if you're developing specifically for an iPhone or a Windows Mobile device, you might want to go with Objective-C or the .NET framework respectively. Nonetheless it is worth keeping a close eye on Android and Qt, as these have the potential to become big in the not too distant future, particularly as they are both open source and being supported by big names in the web and mobile world.