7 things to consider when developing for Windows Phone 7 (at this point)

DZone 's Guide to

7 things to consider when developing for Windows Phone 7 (at this point)

· Mobile Zone ·
Free Resource

If you decided to start developing applications for Windows Phone 7, you might want to consider some points described in this article. Due to the nature of the publication, it might become outdated at the time of the official device/SDK release, so only rely on it for the current time span (while the Beta tools are used).

1. Development tools are in their Beta release. Be ready to encounter (some) issues.

As sad as this might sound, there could be some issues, both during the deployment and debugging. I’m not saying that there are a lot of them, but in my case some of the debugging sessions weren’t the most pleasant ones. Mainly because sometimes some unknown bugs caused the application to close, but the debugger didn’t catch the exception (although it was bound to the emulator). Also, some errors might appear in the Output window and not crash the application (even with IDE settings set to break the session in case exceptions are found). If the process that caused them was crucial to the application as a whole, this might cause incorrect application execution and corrupt or invalid data. Other bugs might also be present, as an example - there is a known bug that shows itself when it comes to developing multi-threaded applications. Chances are you won’t encounter these issues very often, but there is a certain probability for that.

2. You need a machine with good performance.

To develop Windows Phone 7 applications and to make sure you are using the emulator capabilities to the fullest, I would highly recommend using a powerful machine for development. That is an obvious thing, considering the fact that you should be running either Windows Vista or 7 to work with the development tools, but still. There is one thing I noticed about the emulator – if there is less than 1.5GB free RAM, the application debug session won’t launch successfully in some cases. I was trying to figure out why I couldn’t debug my application (running the session from Visual Studio) for quite a while until I noticed that when there are a lot of applications running, there is a bigger chance that the debug session will fail. Although the requirements outline 2GB as the minimal amount of RAM, I would highly recommend going with 3GB and up. Same applies to the CPU.

3. The emulator is not quite ready. Yet.

By this I mean that you cannot test some of the interesting functionality using the emulator bundled with the development tools. This includes the accelerometer and location-based services. At this moment, developers found workarounds like using web services to push device rotation and location data and chances are that these features will be introduced in the final version for the emulator, but at this point there is no support for such things whatsoever. Therefore, you might want to work on an additional emulation layer in case your application relies on capabilities like the ones mentioned above. Also, this brings us to the next point in the list.

4. Eventually, you will need a Windows Phone 7 device.

If you develop for a specific device, there will be a time when you will want to test how the application feels in real-life, in a real environment. Not only will you be able to test some of the features you won’t be able to really test on a PC (the accelerometer comes to mind), but you will also be able to track down specific performance issues and bugs that arise when you work with the actual piece of hardware. If you are a developer, there are ways to get a device for testing purposes a bit earlier than everyone else.

5.    Application data can be displayed in portrait view. In landscape view? Too.

In many application samples that you see on the web, developers mainly focus on portrait views. However, there is also the landscape view so you might want to consider that when developing an application – if the user turns his phone, chances are you can provide a better user experience by taking advantage of more screen space. And this can be applied to pretty much any kind of application.

6. Knowledge of the MVVM pattern is a big plus.

Most likely the application you are developing is going to use some sort of data. Not only will that data be consumed internally, but it will also have to be displayed to the end user. Good application organization and separation of the UI from the actual data is going to improve the development process a lot. From my own experience I can say – developing complex applications using old approaches is not going to cut in for long and MVVM might be the solution for this.

7. Get ready to work with a lot of XAML and Silverlight-specific approaches

Unless you are working with XNA (in case you want to work with games or on your own UI layer), Silverlight is going to be the only sub-framework that will allow you to develop Windows Phone 7 applications. This means that you will be able to design the UI using XAML (of course you can use tools that sort of automate this process, like Expression Blend, but I would recommend avoiding that unless you are really good with XAML). Also, good knowledge of data binding principles in Silverlight/WPF is going to help you a lot, especially with various data involved.

I tried to put these recommendations in a very generalized frame, but at this point I think that these are one of the most important (warning: subjective opinion) elements that should be considered when you plan to deep dive in Windows Phone 7 development. The rest will eventually come with experience.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}