Windows Phone Application Platform

1/15/2011 7:27:25 PM
Microsoft did not invent any new languages or frameworks for the Windows Phone application platform. The company simply adapted its existing frameworks. This means that you will be able to program using C#  with .NET Framework. What .NET provides is a common base class library that every Microsoft .NET programmer will be familiar with, including support for multithreading, XML, Linq, collections, events, data, exceptions, IO, service model, networking, text, location, reflection, globalization, resources, runtime, security, and diagnostics.

On top of core .NET Framework, the Windows Phone application platform consists of two major frameworks: Silverlight and XNA. You'll use Silverlight primarily for business applications and simple 2D games. Silverlight uses the Extensible Application Markup Language (XAML) that is declarative markup language for creating compelling UI. The designers will have tremendous flexibility in creating UI for Windows Phone using familiar tools like Adobe Illustrator, Photoshop, and Microsoft Expression Design to create vector-based UI that can be easily exported to XAML. XNA is primarily used for creating games, and the framework comes with a game engine that allows you to create loop-based games and also provides a 3D engine, allowing you to create 3D games.

In the following sections, you will learn more in detail about the main components of the Windows Phone application platform: Silverlight, XNA, tools, and cloud services.

1. Silverlight for Windows Phone

The interesting thing about Silverlight is that Silverlight is used in the web technology that is browser plug-in that enables rich Internet application content just like Flash technology. Silverlight provides you with a sandboxed experience, and the limitation of Silverlight with respect to the underlying operating system is clearly borderline. Within a Silverlight application, you cannot access any native operating systems unless through provided APIs, if any. This architecture of Silverlight makes it very compelling security-wise to be used in Windows Phone, because Windows Phone provides the same restriction of only providing APIs to developers and limiting access to the native operating system.

Also Silverlight uses XAML, which can be used to declare vector-based graphics and create animations. Any designer familiar with vector-based applications, like Adobe Illustrator and Microsoft Expression Design, can easily create highly visual elements in vector and can be exported out to XAML. This means the designers have full control over the layout, look and feel, and graphical assets, making Silverlight an extremely powerful choice for creating consumer-oriented applications. Also XAML provides a powerful data binding feature to the controls making it ideal for creating business oriented applications.

2. XNA for Windows Phone

Like Silverlight, XNA is not a new technology. XNA is used in creating Xbox games, using managed code. It is a natural choice for creating games since Windows Phone has Xbox LIVE integration, allowing XNA-based Xbox games to be easily posted over to Windows Phone. The only thing Xbox game developers have to worry about is screen resolution, which can easily be adjusted and fixed.

XNA provides a rich framework perfect for game developments, like a game loop engine, 2D and 3D engines, and the ability to manage game assets like models, meshes, sprites, textures, effects, terrains, and animations.

3. Tools

You can download the tools you need for developing Windows Phone applications from Also on this Getting Started page, you will find rich documentation and tutorials. Also consider downloading the UI Design and Interaction Guide to understand the Metro design guidelines that Microsoft encourages you to use in developing applications.

3.1. Visual Studio

If you do not have a paid version of Visual Studio 2010 on your development machine, then the development tool that you have downloaded from Microsoft will install a free version of Visual Studio 2010 Express for Windows Phone as show in Figure 1. Visual Studio is absolutely necessary because it can be used to design, debug, create projects, package and automatically generate package manifests. It also includes a phone emulator on which to test the results of your work.

Figure 1. Microsoft Visual Studio 2010 Express for Windows Phone

3.2. Expression Blend

You will need Expression Blend if you want to develop compelling applications using Silverlight for Windows Phone as show in Figure 2. Typically Expression Blend is used by designers, and many of the Expression Blend functionalities are similar to Adobe Illustrator, Photoshop, or Expression Design. Also from Expression Blend you can import any Illustrator, and Photoshop files, and if you are using Expression Design, you can export Expression Design file directly to an XAML file.

Expression Blend also provides a way to create animation sequences. Although you can achieve in creating animation in Visual Studio using XAML, it would be very difficult to write complex XAML code to represent complex graphics or animation sequences. It is best to leave complex graphics and animations to Expression Blend.

Figure 2. Microsoft Expresion Blend 4 for Windows Phone

3.3. Windows Phone Emulator

The Windows Phone emulator as seen in Figure 3 is integrated to Visual Studio that simulates a real device. However, there are things you cannot do in the emulator, like test the accelerometer, GPS, compass, FM radio, SMS, e-mail, phone calling, contact list, camera, and other features that require a physical device.

There is, however, a technique called Reactive Extensions, which you'll be able to use to simulate the data feed you can expect on a real phone. For example, you'll learn how, using Reactive Extensions, you can simulate the accelerometer and GPS readings so that you can work with the emulator without the need of the device.

Figure 3. Windows Phone emulator

3.4. Documentation and Support

There are many ways you could get help while you are developing your application if you get stuck on a problem. You can visit, and you will find the Windows Phone 7 Training Kit that might contain how-tos on specific technology you are having problems with. You can go to, where you can ask about Silverlight for Windows Phone–related questions, or if you have other related Windows Phone questions, you can visit Also the Windows Phone development team puts out many useful blogs that you can follow at Of course, you also have Windows Phone documentation, found at MSDN

4. Cloud Services

Working with a Windows Phone application that requires saving the data to a database is a tricky thing. The first big problem is that you do not know how popular your application will be, and if it becomes popular, you might suddenly find millions of users using your application and saving the data to its database at a rate that would require an enterprise-level solution. Not just database you would need to worry you also need to consider the web service that can provide APIs to your application to save to the database since Windows Phone applications cannot directly connect to the database.

This is where the Microsoft Azure cloud comes into your solution. Microsoft Azure provides Windows Azure service for deploying services (WCF, Windows service) and SQL Azure for the database that allows you to scale infinitely as your demand grows larger.

There are also Bing Maps services that you can use freely. Bing Maps is free only if you are developing a Windows Phone application. Along with Bing Maps services, Microsoft provides Bing Maps controls in Silverlight that you can use in Windows Phone.

Push notification services are hosted in the cloud as well, which allows you to push messages to the phone, which is a very powerful messaging mechanism. Xbox LIVE services also reside in the cloud, which you can take advantage of in your application. This topic will not be covered in this book, however.

You learned a bit about Windows Phone and the Windows Phone platform in the foregoing sections. In the following sections, you will learn about the beginning to the end of Windows Phone application development.

5. Metro Design

Microsoft is targeting Windows Phone 7 toward busy professionals, and to provide compelling UI, Microsoft came up with Metro design. Metro design derives from the transportation industry typography and visual designs where busy professionals constantly scan and go, and because of this, Metro design puts heavy emphasis on simple and clean designs.

Metro design follow five principles. First principle emphasize on clean, light, open, fast to eliminate clutter, and typography, as consumers will be using the phone to read e-mail, SMS, Facebook, and Twitter while on the go. The second principle of Metro design puts the focus on content, where the design premise must gear toward presenting the content. The third principle focuses on seamless integration of hardware and software. The fourth principle puts an emphasis on gestures, where the design enables a world-class multitouch user experience. Lastly, the Metro design concept focuses on an application that is soulful and alive, where information that matters most to the user is presented in such a way that it is easily accessible at the click of the touch. You can find out more about Metro design by downloading the document provided by Microsoft at

  •  iPhone Application Development : Basic User Input and Output
  •  Mobile Phone Game Programming : A Quick J2ME Primer
  •  Mobile Phone Game Programming : Java As a Mobile Game Platform
  •  Mobile Phone Game Programming : Getting to Know Mobile Platforms
  •  Mobile Application Security : The Apple iPhone - Local Data Storage: Files, Permissions, and Encryption
  •  Mobile Application Security : The Apple iPhone - Permissions and User Controls
  •  iPhone Application Developmen : Using the View-Based Application Template (part 3)
  •  iPhone Application Developmen : Using the View-Based Application Template (part 2) - Preparing the View Controller Outlets and Actions
  •  iPhone Application Developmen : Using the View-Based Application Template (part 1)
  •  Mobile Application Security: Application Format
  •  Mobile Application Security: Security Testing
  •  Mobile Application Security: The Apple iPhone - Development
  •  Building Android Apps : Installing KiloGap in the Emulator
  •  Building Android Apps : Build KiloGap
  •  Building Android Apps: Create an Android Virtual Device
  •  Building Android Apps: Going Native - Setting Up the Environment
  •  Building Android Apps: Introduction to PhoneGap
  •  iPhone Application Development : How Xcode and Interface Builder Implement MVC
  •  iPhone Application Development : Understanding the Model-View-Controller Paradigm
  •  Building Android Apps: Going Offline - Debugging
    Top 10
    Nvidia Quadro K5000 Professional Graphics Card (Part 4)
    Nvidia Quadro K5000 Professional Graphics Card (Part 3)
    Nvidia Quadro K5000 Professional Graphics Card (Part 2)
    Nvidia Quadro K5000 Professional Graphics Card (Part 1)
    Mains Cables R US MCRU Music Server - The Mains Thing (Part 2)
    Mains Cables R US MCRU Music Server - The Mains Thing (Part 1)
    Merlin Music TSM MMM Speakers (Part 2)
    Merlin Music TSM MMM Speakers (Part 1)
    System Audio Aura 1 Bookshelf Loudspeaker (Part 2)
    System Audio Aura 1 Bookshelf Loudspeaker (Part 1)
    Most View
    Windows System Programming : Example: Listing File Attributes & Setting File Times
    Windows Azure : Messaging with the queue - Patterns for message processing
    Samsung Galaxy SIII And HTC One X: A Detailed And Thorough Comparison
    Canon EOS 650D: entry-level DSLR with vari-angle capacitive touchscreen
    Windows 7 : Working with the Printer Queue
    Microsoft Sued Comet For Making 94,000 Copies Of Counterfeit Windows
    How To Share Your Shots With Us!
    Asus Vivobook S200E - Stunning Looks And Great Features
    Windows 7 : Working with Multiple Local Group Policy Objects
    Choose The Right Business Broadband (Part 2)
    Network Attached Storage Round-Up (Part 1) - The Benefits Of A NAS
    The best browser hacks (part 1) - Mozilla Firefox
    AG Neovo U-23 : monitor with a 1920x1080 Full HD resolution
    Apple Society – Less Never More
    Educational Software Tools (Part 2)
    Programming Microsoft SQL Server 2005: Using Data Mining Extensions (part 1) - Data Mining Modeling Using DMX
    On Test - Postcard Apps (Part 1)
    100 Ways To Speed Up Windows (Part 4)
    Windows Vista : Permissions and Security (part 1) - Set Permissions for a File or Folder
    .NET Debugging : PowerDbg (part 2) - Send-PowerDbgCommand & Extending PowerDbg