In my last post I started looking into writing mobile web apps with HTML5. While I was hunting around I found PhoneGap which allows you to create an app using HTML, CSS, and JavaScript but rather than hosting those files as a website it wraps them up into a platform specific app that runs on phone locally. They support iPhone, Android, Windows Phone, Blackberry, WebOS, and Symbian so it seems you can develop your app once and install it onto any of these decides. It also extends what you can do with HTML5 by adding support for the camera and notifications.
They also have a cloud based build service called PhoneGap Build which can take your HTML, CSS, and JavaScript and produce an app for each platform without you having to have any platform specific SDKs installed. According to the website, it doesn’t quite remove the need for a Mac to do an iOS build. You still need one to create the signing certificate and provisioning file. Buying a computer to produce two files is hard to justify. Luckily, someone has figured out how to do it on a Windows machine. So I’m all set right?
I’m going to have to ramp up my HTML knowledge. I’ve only ever played around with it. I’m going to start with a simple HTML5 website. Then I’ll look at porting it into PhoneGap to make a downloadable app for the iPhone, Android, and Windows Phone.
I think a good place to start would be to mimic an existing app so I’m going to write a calculator. It’s not very exciting but there’s not too much logic so the JavaScript won’t get out of control and it should be able to respond to the accelerometer to change between portrait and landscape orientations as I rotate the phone. The landscape orientation will be a scientific calculator and portrait will be a standard one like the iPhone calculator does.