I've just got a new Smartphone, an i-mate SP3. I'm quite excited about it; in my opinion it's a very good piece of technology in as little as 100g of weight. And the software is of course a big part of the smartness of it. So, I wanted to test how easy or hard it would be to develop and deploy a simple application for it. This is the report of about three hours spent after this idea.

1. What application am I going to develop?

Well, I want something simple, but at the same time something that lets me try a bunch of the more interesting features for smart clients... let's say invoking a web service, and download some data from the web. Idea! Why not put together this experiment with my new passion about aeronautics? I'll try to build an application to access the latest METARs and TAFs from any airport in the world! METARs are scheduled weather observations, usually taken every half an hour at the main aerodromes of the world, codified in a string of text (see here for an explanation of the METAR code for the US, and here for the code used in Europe). TAFs are similar to METARs, but they are used to identify weather forecasts instead of observations. How will I call the application? SmartMETARs, of course ;-)

2. Where do I find the data?

First problem, I need to find the data for my application. A quick search on MSN Search Beta brings me to the sources I need. The National Oceanic and Atmospheric Administration provides the raw data I need in text files on the Internet, and Cape Clear SoftwareTM provides a free web service that offers several search features for weather stations, and station details.

3. Develop the application

Now, I have no more excuses: my application is only waiting to be written! I open Visual Studio .NET 2003, looking if I already have what I need to start. New Project - Visual C# Projects - Smart Device Application. Looks promising! The Smart Device Application Wizard starts, asking me to choose the platform to work on. Pocket PC, Windows CE. No Smartphone? No Party!! Ok, ok. I need some SDK. Just a quick search on the MSDN site and I find the download site for the Smartphone SDK! Download, install, reopen VS, bingo!! Smartphone is there now! Opening the new Smartphone project the default form is already sized for the typical LCD dimensions of a phone... cool! The development can start! First thing, let's try debugging on the emulator. Let's try just hitting F5. Gianniiii!!! Optimism is the scient of life!!! (This will be understood only by Italians, or people who watch Italian TV...). A dialog appears, titled "Deploy SmartMETARs", asking me to choose where do I want to deploy the application for debugging. Options are: Smartphone 2003 Emulator (Radio required), Smartphone 2003 Emulator (Virtual Radio), and Smartphone Device. Let's go with the second, that is in fact the default... Deploy! The emulator window opens... nice model! the OS starts, just as on my i-mate... few seconds and then... System_SR_ENU.phone.cab was successfully installed on your device. WOW! Few seconds more... and my form starts, with the debugger attached!!!

Ok, now I can really start developing. Nothing very special, actually. It's all like the full.NET framework (at least for what I need to do :) ). I'll just put here a list of things where I had to spend some time researching:

4. Deploy it

After a couple of hours building the application (6 forms) and testing it on the emulator, I can now try deploying it on my real smartphone! Ok, right click on the project in VS, Deploy... Deploy SmartMETARs dialog... this time I choose Smartphone Device... boom! Deploy failed :-(  Ah, wait a minute... how can the PC deploy it on the phone if it's not connected?!? Tooooo optimistic! Ok, let's try connecting via ActiveSync, and to try the hard way, I go via bluetooth... Connected... retry deploying... Got it!!! Same behavior as the emulator, with the difference that the application doesn't start automatically in debug :-) How the h... do I start it on the phone? The app has been deployed to /Storage/Program Files/SmartMETARs, so I use my Windows Explorer on the PC to browse the device, and to create a shortcut to the .exe under \Storage\Windows\Start Menu\Accessories. Now on the phone I press Start, Others, Others, Accessories... and there it is. Select... Go! My first application is live on my Smartphone. And it works, too!

See my MSN Space for screenshots!