Application platform for Windows Phone

[This documentation is preliminary and is subject to change.]

July 06, 2012

Applies to: Windows Phone OS 7.1

The Windows Phone application platform enables developers to create engaging consumer experiences running on a Windows® Phone. It is built upon existing Microsoft® tools and technologies such as Visual Studio, Expression Blend®, Silverlight®, and the XNA Framework. Developers already familiar with those technologies and their related tools will be able to create new apps for Windows Phone without a steep learning curve.

This topic contains the following sections.

The Windows Phone application platform provides two frameworks for developing apps:

  1. The Silverlight framework for event-driven, XAML-based app development that allows developers to develop creative markup-based user experiences and rich media apps.

  2. The XNA Framework for loop-based games that enables immersive and fun gaming and entertainment experiences.

With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single app.

The Windows Phone application platform helps developers to create apps by providing:

  • A familiar and inexpensive toolset.

  • A cohesive and well-designed managed API set.

  • An isolated sandbox for each app.

  • Runtime services on devices that can be used to access web services in the cloud, such as Xbox LIVE®, Windows Azure, location, and notification services. Access to third-party Windows Communication Foundation (WCF) and Representational State Transfer (REST) services across the web is also supported.

  • The Windows Phone Marketplace to distribute their app.

The Windows Phone application platform, like most platforms, will continue to evolve over time, but its goal will always be to deliver:

  • Richer apps, developed for a highly standardized platform.

  • Support for personal and connected consumer data across multiple devices.

  • A robust developer portal and app marketplace for complete end-to-end lifecycle management.

  • Powerful and productive development tools.

The Windows Phone application platform is designed to support the multi-screen world that consumers live in.

Three screens and the cloud.

Consumers today use a variety of screens and devices, all equally important and all tied together by the cloud, which connects the relevant information together, providing users with the information they need as they move from device to device. Common user experiences make it easy to move between devices, and a common development platform makes it easy to develop apps for all the device types.

Back to Top

The Windows Phone application platform architecture is made up of four main components.

YamaGuide_Yama Arch
  1. Runtimes – Silverlight and the XNA Framework, along with Windows Phone–specific features, combine to provide a mature environment on which to build secure, graphically rich apps.

  2. Tools – Visual Studio and Expression Blend, and their related tools and documentation, create a complete developer experience for quickly creating, debugging, deploying, and updating apps.

  3. Cloud Services – Windows Azure, Xbox LIVE Services, Notifications services, and Location services, along with a variety of other web services, allow developers to share data across the cloud and benefits consumers by providing a seamless experience across whatever device they are using. Connections to third-party web services are also fully supported.

  4. Portal services – The Windows Phone Marketplace provide robust services that allow developers to register, certify, and market their apps.

Back to Top

Runtimes

With Silverlight and the XNA Framework, all development is done in managed code, in a protected sandbox allowing for the rapid development of safe and secure apps. Apps written for Silverlight or the XNA Framework today will run on Windows Phone with only a minor number of adjustments, such as for screen size or for device-specific features.

The two frameworks, along with Windows Phone–specific components and the Common Base Class Library provide a substantial number of components for developers to construct apps on.

  • Silverlight - Silverlight is the ideal framework for creating Rich Internet Application-style user interfaces. A Windows Phone Silverlight app exposes its UI through a set of pages. Windows Phone controls that match the Windows Phone visual style can be used to enhance the look and feel of the UI.

    Visual Studio or Expression Blend can be used for designing the XAML-based interfaces. Visual Studio can be used to implement the app logic by utilizing the media rich Silverlight libraries or the base functionality provided by the Common Base Library. For more information, see Silverlight and XNA Framework for Windows Phone.

  • XNA Framework - The XNA Framework is composed of software, services, and resources focused on enabling game developers to be successful developing on Microsoft gaming platforms. Microsoft provides technology that allows professional developers to quickly enable games on platforms like Windows Phone, Xbox 360, Zune HD, and Windows 7. The XNA Framework provides a complete set of managed APIs for game development. This includes 2D sprite-based APIs that support rotation, scaling, stretching, and filtering as well as 3D graphics APIs for 3D geometry, textures, and standard lighting and shading.

    With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single app. For more information, see Silverlight and XNA Framework for Windows Phone.

  • Sensors - A variety of sensors will return data that can be consumed by developers. For example, multi-touch input, accelerometer, compass, gyroscope, and microphone sensors will all be accessible by APIs. For more information, see Touch Input for Silverlight, Responding to User Input, or Sensors for Windows Phone.

  • Media – Both Silverlight and the XNA Framework provide developers with a programming model for building rich user experiences that incorporate graphics, animation, and media. The managed APIs support a variety of media formats and allow for discovery and enumeration of media on the device and for playback of that media. For more information, see Media for Windows Phone.

  • Data - Isolated storage allows an app to create and maintain data in a sandboxed isolated virtual folder. All I/O operations are restricted to isolated storage and do not have direct access to the underlying operating system file system. This prevents unauthorized access and data corruption by other apps.

    Structured data can be stored in a relational database and can be accessed by using LINQ to SQL.

    For more information, see Isolated storage APIs for Windows Phone or Local database for Windows Phone.

  • Location - The Microsoft Location Service for Windows Phone allows app developers to access the user’s physical location information from a single API. Developers can query for the current location, subscribe to Location Changed events, set the desired accuracy of the data, get access to the device heading and speed, and calculate the distance between points. The Location APIs on the phone will work in conjunction with the Location Cloud Services. For more information, see Location for Windows Phone.

Back to Top

Tools

Developers can download and install a package that includes all the tools that they need to start developing apps for Windows Phone.

If Visual Studio is not already installed, Visual Studio 2010 Express for Windows Phone will be installed.

If Visual Studio is installed, an add-in to Visual Studio will be installed.

For more information about downloading and installing the Windows Phone SDK, see Installing the Windows Phone SDK

  • Visual Studio 2010 - Visual Studio is the IDE for building Windows Phone apps. Within the Visual Studio IDE, developers can create Silverlight or XNA Framework programs that run on Windows Phone. Visual Studio includes a designer, debugger, project system, packager, and manifest generation. For more information, see Visual Studio 2010 Express for Windows Phone.

  • Expression Blend - In the same way that designers use Expression Blend to design Rich Internet Applications for the desktop browser, they can also design creative and unique Silverlight-based apps on a Windows Phone. Expression Blend for Windows Phone allows designers to create XAML-based interfaces for Windows Phone apps, whose behaviors can then be implemented by developers in Visual Studio. For more information, see Expression Blend.

  • Windows Phone Emulator - Windows Phone Emulator is integrated into Visual Studio and Expression Blend to make the testing and debugging of apps easier and more efficient. The emulator fully supports app deployment, debugging, and app execution. It includes support for GPU emulation and orientation change. For more information, see Windows Phone Emulator.

  • XNA Game Studio - The XNA Game Studio is an integrated design environment that developers can use to build fun and exciting games for Microsoft Windows®, the Microsoft Xbox 360® video game and entertainment system, Microsoft Zune®, and Windows Phone. XNA Game Studio extends the Visual Studio tools to support the XNA Framework. The XNA Framework is a managed-code class library that contains functionality targeted specifically at game development tasks. In addition, XNA Game Studio includes tools for incorporating graphical and audio content into your game. For more information, see XNA Game Studio.

  • Samples, documentation, guides, and community - Documentation, How-to Guides, sample code, and sample apps are provided to aid developers ramping up on Windows Phone development. Forums, blogs, and websites are available for developers to ask questions and share information with the greater Windows Phone community. The new Visual Studio Help system will allow developers to continuously update their documentation sets. For more information, see App Hub, Windows Phone Blogs, or Windows Phone 7 Forums.

Back to Top

Cloud Services

The Windows Phone application platform provides many features for building compelling web-integrated apps. While a Windows Phone is powerful and rich, the cloud makes it even more powerful. The Cloud Services are always on, are more scalable, can contain more functionality, and are not dependent on battery life. Services built on Azure or third-party web services can be accessed to bring data to the phone. The Windows Phone Marketplace provides a means for developers to certify and distribute their apps to consumers.

  • Notifications - To enable efficient, dynamic, and up-to-date information and communication channels, Windows Phone application platform provides an API to enable services to notify the user when relevant events have occurred. This eliminates the need for polling and reduces battery consumption. For more information, see Push Notifications for Windows Phone.

  • Location Cloud Services - The Location Cloud Services will work together with the Location APIs on the phone, making its presence transparent to the developer. The service will use Wi-Fi, cellular, and GPS data to provide a single source for providing position lookup. Assisted GPS (AGPS) is available to improve the fix for GPS. For more information, see Location for Windows Phone.

  • Identity, feeds, social, and maps services - The extensive variety of web services in the cloud allow consumers to identify themselves, interact with social communities, receive data feeds, and use maps for navigation. Developers can enrich this experience by providing new apps that use these services. For more information, see Communications for Windows Phone.

  • Windows Azure - Visual Studio 2010 provides the development environment for creating apps using the Windows Azure™ Platform, an Internet-scale cloud computing and services platform hosted in Microsoft data centers. The Windows Azure Platform provides a range of functionality to build apps that span from consumer web to enterprise scenarios and includes a cloud operating system and a set of developer services. Fully interoperable through the support of industry standards and web protocols such as Representational State Transfer (REST) and Simple Object Access Protocol (SOAP), you can use the Azure services individually or together, either to build new apps or to extend existing ones. For more information, see Windows Azure.

  • Microsoft Advertising SDK for Windows Phone - Monetize your Windows Phone apps and games by including ads from Microsoft Advertising. The Microsoft Advertising SDK for Windows Phone enables you to create apps that can do the following:

    • Easily integrate text and banner ads into your apps and games.

    • Provide a monetization solution that maximizes in-app advertising revenues by unlocking the power of multiple sales channels competing in real time to purchase your ad inventory.

    • Provide various ad targeting capabilities to deliver the most relevant ads to your users.

    • Seamlessly handle impression reporting.

Back to Top

Portal services

The Windows Phone Marketplace provides a centralized location for developers to submit and certify their apps. Consumers have a centralized location from which to buy or update their apps.

  • Registration and validation - Developers can get started on App Hub by signing up with their Live ID. After registration is complete, developers can get all the needed tools in a single download.

  • Certification, publishing, and update management - A set of tools will help the developer to submit and certify their apps for the Windows Phone Marketplace. Apps are submitted in an .xap file format, which is essentially one compressed file that contains all the files that are needed by the app. Developers can track their submission status and then receive a notification once the certification is complete. After an app is certified, it can then be submitted for publishing on the Windows Phone Marketplace. Developers can set pricing and select the markets in which they want to publish the app.

    If developers fix bugs, add new functionality, or provide a whole new version of the app, they must go through the certification and publishing process again.

  • Windows Phone Marketplace and blling - The Windows Phone Marketplace provides the one place where developers can make their apps available for purchase by consumers. Both Mobile Operator and credit card billing are supported, making it as easy as possible for consumers to pay for the app.

  • Business intelligence - Business intelligence tools will provide developers with information reporting about their app.

Back to Top

This section describes how developers can use the Windows Phone application platform from the beginning to the end of the development cycle.

YamaGuide_E2E Arch

Getting started with App Hub

App Hub will be the starting point for developers. Developers can begin by signing up for a Windows Live ID. Next, they can sign up to obtain the Windows Phone SDK and associated licensing materials for developing apps using Visual Studio and Expression Blend. This will be a single download that contains everything the developer requires for building an app for Windows Phone. Developers can also register one or more phones for use as test hardware in validating the apps that they are building. Any retail Windows Phone can be registered as a test device.

App Hub contains samples, documentation, and active developer communities that help make Windows Phone developers successful.

Designing an app and producing an app package

Once developers have signed up to be a Windows Phone developer and have installed the developer tools, they can begin developing their apps.

Games and graphics-intensive apps are created in Visual Studio using the 2D and 3D libraries of the XNA Framework.

The visual design for XAML-based apps for Silverlight is created in Visual Studio and/or Expression Blend. The resulting XAML document containing markup is then interpreted by the Silverlight presentation engine and other components of the Windows Phone application platform.

With Windows Phone 7.5, you can now combine Silverlight and the XNA Framework into a single app. For more information, see Silverlight and XNA Framework for Windows Phone.

The Visual Studio IDE is used to write managed code defining the visual behavior of all Windows Phone apps. When the app is completed, a package is created that includes everything the app needs.

Debugging an app

While creating a Windows Phone app, a developer can debug the program on a phone or in Windows Phone emulator. Debugging the app involves creating a package targeted to the debugging platform and then using Visual Studio to deploy the package. Call stack walking, expression evaluation, source code stepping, and variable watch windows are all supported.

Publishing an app

After an app has been completed, a developer can make the program available to other users on the Windows Phone Marketplace. To publish to the Windows Phone Marketplace, developers submit a .xap file. The .xap file is a compressed file containing all the information needed by the app. This includes an app icon, a start tile, metadata, and licensing terms that determine how their program can be used.

Next, the developer signs into App Hub and submits the app package for certification. This is the only way to make an app available to consumers. The certification process will verify that the app is well-behaved, works for the languages and markets indicated, and does not adversely affect the overall health of the phone.

Once the package has satisfied the Windows Phone Marketplace certification requirements, the developer is notified and can publish the app to the Windows Phone Marketplace through App Hub. Apps are then made available for consumers to download in the Windows Phone Marketplace. Credit card and mobile-operator billing operations are supported.

Managing published apps

After a Windows Phone app is published to the Windows Phone Marketplace, the developer uses App Hub to manage the versions of the app that are available for purchase.

Back to Top

Show: