One of the main selling points to me for Windows Phone 7 was the opportunity to write mobile apps in a .NET environment. I thought I would summarize here my experiences over the last few months from signing up as a developer, writing and deploying for the first time and working with the Marketplace.
Becoming a Windows Phone developer could not be easier, the Microsoft Developer Network (MSDN) has a section solely for developers working on XBox and Windows Phone; create.msdn.com. Having signed in with a Windows Live ID, you complete the standard registration type form and wait for the slightly ominous sounding next step, Identity Validation. The name of this step is a lot more scary than it actually is, they simply require a scan of some form of official document to verify you are who are claiming to be. They claim this process could take up to a week however mine was turned around inside 24 hours, now either I’m really easy to track down or they aren’t checking into you that deeply.
One of the best things about the .NET framework is the development environment, Visual Studio is without a doubt one of the best IDEs out there for doing just about anything; desktop development, web or cloud and now mobile. If you have the full Visual Studio 2010 then you can download the Windows Phone development tools as a plug-in however if you don’t have the £500 to drop on an IDE (if someone would like to donate to get me a copy I’d appreciate it) then you’re in luck you can get almost the same functionality for nothing with Visual Studio 2010 Express, this lacks some of the fancier features of the full program (plug-ins, team support, etc) however it is ideal for experimenting with Windows Phone. With either option you get a new build target of WP7, this target launches the emulator which is fluid and does not feel anywhere near as clunky the Android one tends to.
Okay so that’s the environment, but what is it actually like to develop for Windows Phone 7? If you’ve developed for Silverlight or WPF then you’ll have no problem at all getting up to speed with the WP7 specific libraries. There is a thriving Windows Phone Developer community sharing a wealth of knowledge and components, so even if your development experiance is limited you can quickly get help when you do hit a roadblock. If you have experience with Visual Studio you will be familiar with the “designer mode” for creating UI elements, the Windows Phone SDK adds a range of phone specific version of many UI elements, better tailoring their design to the touch interface. The templates for pages and controls can be used to get you up to speed very quickly with designing within the Metro UI guidelines, however I thoroughly recommend having a read of Jeff Wilcox’s Metro design guide for developers as this will take an average looking app and give it beautiful metro polish. However there will come a time when what you want to achieve is just not in the standard toolkit of components but designing a custom control seems a bit overkill. For many of these situations you can turn to the Window Phone Developer community I mentioned earlier. One toolkit I would strongly recommend is the Coding4Fun Windows Phone Toolkit, this contains a range of additional controls, converters and helpers to speed up your phone development. The control I needed was the TimeSpan Picker which extends the lovely looking (and very touch friendly) time picker control from the SDK to help users input TimeSpans, ideal if like me you are writing anything requiring timers. The only control in the set I am hesitant to recommend is the About prompt, while it looks very slick and makes writing a quick about info pane as simple as possible I noticed some jarring animation when running this on an actual device. If you want to write an about page for your app I suggest looking again to Jeff Wilcox who created a beautiful, detailed and performance friendly Pivot based about page for his app “4th & Mayor” which he details here. I have implemented a similar model for PBTrainer 1.2 and have to say it feels a lot more polished than using the dialog.
Its for reasons like this that you need to test your application not just in the emulator but on real hardware, no matter how good the emulator it’ll never compare to installing and using the application on a real device. Before you can deploy your app to hardware you need to unlock your phone, now if you went the official route and have a developer account this is as simple as connecting up your phone, running the Developer Phone Registration Tool and a couple of next presses later and you are done. However if you’re just experimenting and just want to push just to you own device then there are third party solutions that allow you to side-load XAP files onto your device, however these do come with somesignificant risks. Once you have a unlocked device you can push the XAP files created in Visual Studio down to the device using Windows Phone Application Deployment Tool which painlessly installs the application onto your device where it is indistinguishable from one downloaded from the Marketplace. Another of the really nice features of Windows Phone App Hub is the ability to release your application into a “private beta” state, this means that users whose feedback you trust can get their hands on your apps for 90 days at no cost without the need for an unlocked phone. This means you can get your application out there to real users on a variety of hardware and carriers before it reaches the full Marketplace. There is a really nice write up of this functionality here.
Now that the app is out there in the wild it’s time to watch it explode and make you a instant millionaire, right? The MSDN provides an awesome dashboard to help track the performance of the application as it spreads through the marketplace. Below is the total and cumulative download chart for PBTrainer.
[gallery link=”file” columns=”2” orderby=”title”]
As you can see its a fairly linear progression, with just a slight spike around the 1.1 release. This information can be incredibly useful you could see the impact of promotional drives or seasonal spikes of interest. However the dashboard provides another even more useful resource for improving your app, stack traces. Every time your app crashes in the wild WP7 sends back diagnostic data to Microsoft (with user approval, however this is on by default). So if you rush out a new feature without testing it properly first (but you’d never do that …right?) you’ll be able to see its impact on this graph. All of these statistics can be downloaded as Excel spreadsheets if you so desire, this includes additional data that now yet available on the website but as they keep updating the developer dashboard I’m sure this information will be accessible direct from the web app soon.
What’s next? I’m finishing off the polish on PBTrainer 1.2 which hopefully should be going in for review next week. This will add unlimited drills, an improved drill history record and a much nicer about page. Keep watching pbtrainer.andymarch.co.uk for the notification of the latest release…or just go download now and you’ll get the update as soon as its on the Marketplace.