Many IT companies say the future is mobile. This is not going to be true till the data rates become affordable, but perhaps the large touch screen of the iPhone is a taste of things to come.
Its quite excited to learn about developing for this new platform and see what we can create. Will we be able to use my existing web development and programming skills, or will we need to learn a new set of skills. This is what we’ve learnt so far about what we’ll need to know.
There are two options when developing for the iPhone (or iPod touch): Develop a web application or develop a native iPhone application. There are pros and cons for both, and both require a completely different set of skills. Until recently you could only develop web applications, but Apple has recently released a beta of the iPhone SDK building up towards the planned opening of the iPhone App Store.
Developing a web based iPhone application
If you’re a web developer, then this is going to be the easiest and possibly best option. You can use your existing web development skills and you can host your application on your current server.
Using an iPod touch we can test websites on the iPhone. They’re the same except the iPod touch doesn’t have all the applications the iPhone does (most notably, and understandably the phone application). However, we’ve discovered that we don’t even need an iPod touch. The iPhone Software Development Kit (SDK) includes an iPhone simulator. You will need a Mac though to run the SDK.
If you have an existing web application, it will probably already work on the iPhone, unless it uses Flash or a few other non-supported technologies. There are several things you could do to make it work better on an iPhone, some of these things will be helpful for other mobile devices.
You can add an iPhone, or small screen specific style sheet. This will allow you to lay things out better for the available screen size. You may also wish to take advantage of some Safari and iPhone specific CSS. For example there’s CSS support for simple animation and transitions.
You may wish to detect that the browser is on an iPhone and serve them a specialised version. Facebook is an excellent example of this and creates an experience that is very similar to using a native iPhone application.
There are also some custom meta tags which allow you to control the screen area and whether the user can zoom. You can also add custom links that will launch other iPhone applications. You can even store data in a client side SQLite database, which is apparently part of the HTML 5 spec.
Now that all sounds great, but there are limitations with an iPhone web app. Firstly it’s not going to work when the user is offline, and it’s going to be slow when their connection is slow. You’re also not going to be able to access all of the features of the device such as its location awareness, orientation awareness or be able to access things like the address book. If you want to make use of all the power and all the features then you’re going to have to make a fully native iPhone application.
Developing a native iPhone application
If you’ve previously developed software for Apple Macs then you’re probably going to find you can quite easily turn those skills to iPhone development. If you haven’t then there’s a lot your going to need to learn. It’s aimed at software developers, rather than web developers and the skills needed are very different.
Before you begin there are a few things you will need. You’ll need a Mac, you’ll need to download the iPhone Software Development Kit (SDK) and it’d help for testing if you had a iPhone or an iPod touch (this last bit isn’t essential as there is a simulator).
The SDK includes all the tools you’ll need to develop iPhone applications. These tools include an interface designer, a code editor, profiling tools and an iPhone simulator. They’re completely free, but there is an option to join the iPhone Developer Program. This costs $99. As far as we can tell, you need to join this if you wish to share your applications with anyone. Otherwise you can only install your programs on one designated test iPhone. We’ve also read in forums that the Developer Program is so popular that Apple are putting everyone on a waiting list. We thought we’d wait till we created a program worth sharing before I joined the program. There’s a lot to learn before we can even think about doing this.
You’ll also need a good understanding of object orientated programming. If you’ve used Ruby on Rails, you’ll be pleased to know that they seem to make heavy use of the Model View Controller architecture that Rails is built on.
All the actual fun stuff seems to be contained in the various frameworks that provide the iPhone functions and features that your application can use. I’ve not had time to explore this fully as learning Objective C has slowed me down a bit. These frameworks seem to be the Foundation Framework, UIKit and the Cocoa Touch Framework. You’ll need to understand the basics of these frameworks so you can start making use of the functions they provide.
Once you’ve got your head round Objective C you can start looking through all the code examples they’ve got. It’s probably a good way to start understanding how all the framework features work.