Mobile Corner
Welcome to Mobile Corner: The Windows Phone Ecosystem
Nick Randolph continues his introduction to Windows Phone 7 development with a look at some of the tools and resources available to developers.
- By Nick Randolph
- 03/29/2011
Welcome to Mobile Corner, my column covering mobile .NET development and in particular Windows Phone 7 development. In my last online column, I walked through the history of Microsoft's mobile platform efforts and provided a brief introduction to the column. This time around, I'm exploring some of the tools and resources around Windows Phone 7 development. On April 1st, look for Mobile Corner in the April issue of Visual Studio Magazine, which will also be available on the Web. In that column, I'll walk through creating a YouTube search app for Windows Phone 7.
In the past Microsoft created the operating system (Windows Mobile) and the developer tools (Visual Studio) and left you as the developer to your own devices to design, create and sell applications. Now with Windows Phone 7, Microsoft has not only delivered a revitalized mobile platform, they have also delivered an entire ecosystem which will help you design, develop, build, test and most importantly sell, your applications.
Runtime and Tools
All development for applications or games for Windows Phone 7 is done by writing .NET managed code in either C# or VB.NET. However, there is a choice for you to make, whether you develop an application in Silverlight, or a game in XNA. It is of course possible to build games in Silverlight, and particularly for simple 2D games this may be a viable approach, or applications in XNA.
With Silverlight you typically design the layout using a visual designer and write your logic to respond to events raised by the user interacting with the application. XNA is all about the game loop, which is a repetitive update-draw loop. In the Update part of the loop you're responsible for updating the state of the game and the layout of sprites on the screen. Then during the Draw part, you're responsible for rendering the sprites to the screen. This gives you ultimate control, which is essential for game development, but also significantly increases the time and complexity of an application.
A couple of years ago Microsoft made an ambitious move to integrate designers into the application development process. Expression Suite includes tools for designers to create graphics (Expression Design), design applications (Expression Blend and Expression Web) and capture and edit video (Expression Encoder). When building for Windows Phone 7, you'll want to develop your code in Visual Studio 2010 and design the interface with Expression Blend. Both of these products have an Express version available for free, exclusively for Windows Phone 7 development. However if you have already purchased the full version of either, or both, of these tools, you'll be pleased to know that the Windows Phone 7 developer tools will integrate seamlessly with them.
In addition to Visual Studio and Expression Blend, the developer tools also include the Windows Phone 7 Emulator. Unlike other platforms that have simulators that may behave differently to an actual device, the Windows Phone 7 Emulator is the full Windows Phone 7 operating system, compiled to run on your PC. This means that you get full fidelity when it comes to graphics acceleration (assuming that your PC meets the minimum requirements), allowing you to develop and test your application without having to connect to a real device.
Of course, your final round of testing should always be done on a real device, as there will always be some discrepancies between the emulator and a real device.
Services and Portal
It is unlikely that your application will operate in isolation; users have come to expect applications to be connected to either external services, such as social networking sites like Facebook, Twitter or LinkedIn, or device based services, such as location or notifications. Windows Phone 7 has a set of APIs for working with location-based services and for sending and receiving notifications within applications. You can also take advantage of the support for Xbox Live and the capabilities of Windows Azure from within your application.
When it comes to selling your application, Microsoft has followed suit in providing their own applications Marketplace. Users can access this either via the Marketplace hub on their Windows Phone 7 device, or via Zune, the desktop companion software for Windows Phone 7. Developers can elect to offer their applications for free, or make them available for sale. When a user pays for an application, 30 percent of the revenue goes to Microsoft for processing the sale and handling the distribution of the application. Developers can make use of trial mode, which allows users to experience the application before purchasing the application.
The Windows Phone 7 Marketplace is open to any developer willing to register and pay for a Marketplace account. However there is a G rating for applications and games in the Marketplace and there are a number of criteria that need to be addressed in order for an application to be certified and published to the Marketplace. For most applications this process takes a matter of days and the feedback from the testing and verification team in most cases provides enough information for any issues to be easily resolved.
Getting Started
The best place to go to get started building Windows Phone 7 applications and games is http://create.msdn.com. From this site, the first thing you'll need are the developer tools -- follow the link on the main page to download and install them. Microsoft had made this process as simple as possible so that you should only need to step through a single installer. If you don't already have either Visual Studio or Expression Blend, the installer will download and install the Express versions of these tools.
Once you have the tools, now it's time for some additional resources to help you get started:
There are also some great resources for getting to know both Visual Studio and Expression Blend
In the upcoming April issue of Visual Studio Magazine, I'll walk readers through creating a quick sample application that offers a ten thousand foot view of designing and developing a Windows Phone 7 application. Of course, before you get started you'll want to ensure you have the necessary tools.
You can go to http://create.msdn.com and follow the link to download the free tools. If you already have the professional versions of Visual Studio and/or Expression Blend, this will install the SDK components into these products. Alternatively, if you don't have one or either of these products an Express version will be installed for use in building Windows Phone 7 applications.
About the Author
Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications. With a heritage in rich client applications for both the desktop and a variety of mobile platforms, Nick currently presents, writes and educates on the Windows Phone platform.