Thursday 1 March 2012

Application Platform Overview for Windows Phone

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 applications for Windows Phone without a steep learning curve. This topic includes the following sections:
The Windows Phone Application Platform provides two frameworks for developing applications:
  1. The Silverlight framework for event-driven, XAML-based application development that allows developers to develop creative markup-based user experiences and rich media applications.
  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 application.
The Windows Phone Application Platform helps developers to create applications by providing:
  • A familiar and inexpensive toolset.
  • A cohesive and well-designed managed API set.
  • An isolated sandbox for each application.
  • 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 application.
The Windows Phone Application Platform, like most platforms, will continue to evolve over time, but its goal will always be to deliver:
  • Richer applications, developed for a highly standardized platform.
  • Support for personal and connected consumer data across multiple devices.
  • A robust developer portal and application 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.
3screens 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 applications 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 applications.
  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 applications.
  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 applications.
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 applications. Applications 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 applications on.
YamaGuide_Frameworks
  • Silverlight - Silverlight is the ideal framework for creating Rich Internet Application-style user interfaces. A Windows Phone Silverlight application 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 application logic by utilizing the media rich Silverlight libraries or the base functionality provided by the Common Base Library. For more information, see The Silverlight and XNA Frameworks 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 application. For more information, see The Silverlight and XNA Frameworks 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, Touch Input for XNA Framework, or Sensors Overview 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 application 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 applications.
    Structured data can be stored in a relational database and can be accessed by using LINQ to SQL.
    For more information, see Isolated Storage Overview for Windows Phone or Local Database Overview for Windows Phone.
  • Location - The Microsoft Location Service for Windows Phone allows application 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 applications 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 applications. 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 applications on a Windows Phone. Expression Blend for Windows Phone allows designers to create XAML-based interfaces for Windows Phone applications, 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 applications easier and more efficient. The emulator fully supports application deployment, debugging, and application 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 applications 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 applications. 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 applications 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 applications that use these services. For more information, see Networking and Web Services Overview for Windows Phone.
  • Windows Azure - Visual Studio 2010 provides the development environment for creating applications 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 applications 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 applications or to extend existing ones. For more information, see Windows Azure.
  • Microsoft Advertising SDK for Windows Phone - Monetize your Windows Phone applications and games by including ads from Microsoft Advertising. The Microsoft Advertising SDK for Windows Phone enables you to create applications that can do the following:
    • Easily integrate text and banner ads into your applications 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 applications. Consumers have a centralized location from which to buy or update their applications.
  • 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 applications for the Windows Phone Marketplace. Applications are submitted in an .xap file format, which is essentially one compressed file that contains all the files that are needed by the application. Developers can track their submission status and then receive a notification once the certification is complete. After an application 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 application.
    If developers fix bugs, add new functionality, or provide a whole new version of the application, they must go through the certification and publishing process again.
  • Windows Phone Marketplace and Billing - The Windows Phone Marketplace provides the one place where developers can make their applications 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 application.
  • Business Intelligence - Business intelligence tools will provide developers with information reporting about their application.
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 applications using Visual Studio and Expression Blend. This will be a single download that contains everything the developer requires for building an application for Windows Phone. Developers can also register one or more phones for use as test hardware in validating the applications 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 Application and Producing an Application Package
Once developers have signed up to be a Windows Phone developer and have installed the developer tools, they can begin developing their applications.
Games and graphics-intensive applications are created in Visual Studio using the 2D and 3D libraries of the XNA Framework.
The visual design for XAML-based applications 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 application. For more information, see The Silverlight and XNA Frameworks for Windows Phone.
The Visual Studio IDE is used to write managed code defining the visual behavior of all Windows Phone applications. When the application is completed, a package is created that includes everything the application needs.
Debugging an Application
While creating a Windows Phone application, a developer can debug the program on a phone or in Windows Phone emulator. Debugging the application 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 Application
After an application 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 application. This includes an application 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 application package for certification. This is the only way to make an application available to consumers. The certification process will verify that the application 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 application to the Windows Phone Marketplace through App Hub. Applications are then made available for consumers to download in the Windows Phone Marketplace. Credit card and mobile-operator billing operations are supported.
Managing Published Applications
After a Windows Phone application is published to the Windows Phone Marketplace, the developer uses App Hub to manage the versions of the application that are available for purchase.

No comments :