Windows Phone 7 Software Architecture

Source: Internet
Author: User
Tags representational state transfer visual studio 2010
ArticleDirectory
    • After you select the framework to be used for developing a Windows Phone 7 application, the application cannot use the functions provided by the other framework, that is to say, applications that use Silverlight framework as the basis for application development can still use the functions provided by xNa framework by referring to components. Otherwise, applications that use xNa framework as the basis for application development can also use the functions provided by Silverlight framework by referring to components.

Microsoft's latest Windows Phone 7 smartphone targets not only general audiences, but also a large number of enterprise users, therefore, we have added support for cloud services in terms of software support. Figure 1 shows the software support for Windows Phone 7. The top shows the runtime and tools, and the bottom shows the cloud-related services. The two constitute the support for developing Windows Phone 7 applications, and support during application execution.

Figure 1: Windows Phone 7 software support

Windows Phone 7 provides two frameworks: Silverlight framework and xNa framework. The Silverlight framework is an application design concept based on the XAML file. It provides the same development experience as the development of Windows applications and Silverlight applications with the help of the event-driven mechanism. XNa framework is mainly used to support loop-based game programs, that is, to use the loop to constantly update the content displayed on the screen to display smooth game effects.

Both the Silverlight framework and xNa framework are application development architectures on the net platform. They can effectively help program designers develop secure smart phone applications, in addition, the program designer only needs to slightly modify the existing Silverlight application or xNa application, such as modifying the screen height and width, and adding the sensor-related features unique to the smart phone, the Silverlight application or xNa application can be transplanted to Windows Phone 7 for execution.

Using Silverlight framework to develop Windows Phone 7 applications is similar to designing Silverlight applications, windows Phone 7 applications based on the Silverlight framework are composed of a bunch of pages (inherited from the derivative category of the phoneapplicationpage category). Each page is a sub-file named. a XAML file represents an operating image. You can use Visual Studio 2010 express for Windows Phone or expression blend for Windows Phone to design the page user interface. XNa framework and Silverlight framework are different in that xNa framework is mainly used to support development of game programs and provides 2D/3D animations, sound effects, and various game-related functions, assists enterprises or individuals who are interested in developing game programs to develop game programs for Windows Phone, Xbox 360, Zune player, and Windows 7 platforms. XNa framework and Silverlight framework are different in that xNa framework is mainly used to support development of game programs and provides 2D/3D animations, sound effects, and various game-related functions, assists enterprises or individuals who are interested in developing game programs to develop game programs for Windows Phone, Xbox 360, Zune player, and Windows 7 platforms.

In support for application development, programmers can use the features provided by the framework to control Windows Phone 7 multi-touch screens, sensors, sound devices, microphones and other hardware, or play sound and film.

In terms of file processing, the Windows Phone 7 application can only access files located in the isolated storage area (isolated storage), and cannot access any files outside the isolated storage area, prevent malicious programs from endangering the operation of other applications or Windows Phone 7.

The location function supported by Windows Phone 7 can be integrated with the location service provided by cloud services to help applications query the actual location of the device and be notified when the device location changes, determine the direction and speed of device movement, or calculate the distance between two points.

The underlying layer that supports the above features is a complete set of functional frameworks, as shown in Figure 2. The underlying common base class library provides Microsoft. the basic functions of the net platform are also the basis of the Silverlight framework and xNa framework.

Figure 2: supported development of the Windows Phone 7 Application Framework 2: supported development of the Windows Phone 7 Application Framework

 

In addition to the framework built in Windows Phone 7, Windows Phone 7 applications can also use cloud services on the Internet, including windows Azure, Xbox Live services, Notification Services, location services, Web Services and WCF services provided by other third-party vendors, and even the representational State Transfer) and other advanced technologies to provide more function support for Windows Phone 7 applications. With the help of cloud services, users can access the same information and enjoy the same service when using different computer devices, it is an important foundation for supporting the development of a new generation of mobile computing solutions. With the help of cloud services, programmers can not only use more functions than the built-in functions of Windows Phone 7, but also provide a 24-hour uninterrupted cloud service, it will not be unable to obtain services because the battery power of smart phones is exhausted.

In the cloud services provided by Microsoft, the notification service can help Windows Phone 7 applications receive events to be processed in subscription mode, saving the power consumed by regularly querying specific information or status. The location service can provide location-related functions for Windows Phone 7 applications using Wi-Fi, cellular, and GPS. In addition, the identity service can provide the authentication function, the feed service can provide the data feed service, the social service can provide the community service, and the map service can provide the map and navigation service. After the Windows Phone 7 Application is developed, the program designer can use the portal service to publish the developed application to the mobile online software store (marketplace) for users to purchase and use it.

  Silverlight framework vs xNa framework

After learning about hardware and software support for Windows Phone 7, when creating a Windows Phone 7 Application project, you must select Silverlight framework or xNa framework as the foundation for application development. The framework Architecture Function diagram shown in Figure 3 shows that the underlying layer of the Silverlight framework and xNa framework is a group of services that provide sensor-related functions, location functions, and live service functions, the network communication function, the xNa sound effect API, And the xNa media API are located under this group of shared services. NET Compact framework, composed. NET Compact framework provides basic program development assistance, including data types, XML file processing, integrated query in the LINQ language, isolated storage areas, WCF services, and serialization.

Figure 3: Architecture and functions of Silverlight framework and xNa framework

As shown in figure 3, Silverlight framework and xNa framework share the same nature. The difference is that Silverlight framework and xNa framework support different types of applications. Silverlight framework supports the development of common Windows Phone 7 Applications and provides the control items and display functions required by the program designer to design applications. Of course, it also supports the use of animation functions, the main purpose of xNa framework is to support programmers to design game-related programs, including assistance in picture continuous update and display, content pipeline game content processing, and 2D/3D graphic display.

The content pipeline of xNa framework is a function that creates game content (including texture, Sprite, mesh, effect, Font, music, sound effects, level settings, and role traits, assists programmers in preparing all the game content they need during game design, this prevents the speed of game execution from being affected in order to convert different data formats into the content formats supported by the game.

Figure 4 shows how xNa's content Pipeline Function processes game content:
Figure 4 Process of xNa content pipeline processing game content

As shown in figure 4, after the game content formats in different formats are imported by importer, the game content formats are converted to the object formats that can be represented by the content dom (Document Object Model, that is, the format that processor can process. After the content DOM object is processed by processor, It is compiled. content in xNb (short for xNa binary file) format can be loaded and used by games executed on Windows, Xbox 360, or Windows Phone 7.
XNa's content pipeline feature allows programmers to expand their built-in features to handle emerging game content formats or to generate custom output formats. XNa's content pipeline feature allows programmers to expand their built-in features to handle emerging game content formats or to generate custom output formats.

Table 1 lists the features and applicable application types of the Silverlight framework and xNa framework:

Functions and features of the Silverlight frameworkFunctions and features of the Silverlight framework Features of xNa frameworkFeatures of xNa framework
Suitable for developing event-driven applications based on XAML files Integrated development of highly efficient failoverSuitable for developing highly efficient games
Suitable for application of Silverlight web page development experience to Windows Phone 7 Application Development Combined to quickly develop 2D and 3D Linear NetworksSuitable for rapid development of 2D and 3D games
Provides control tokens for application development and useProvide control items for application development and use The content Pipeline Function is provided to allow the application to process the internal content to be used when the program is running.The content Pipeline Function is provided to help applications process the game content to be used during game program execution.
Supports audio/video media playback.Support for audio and video media playback
Supports webbrowser control items for Web browsing, Bing map Silverlight control items for displaying highly interactive maps, and panoramic control items for developing panoramic browsing functions, the quota control items that support viewing application pages or data back and forth in an axis mode.

After you select the framework to be used for developing a Windows Phone 7 application, the application cannot use the functions provided by the other framework, that is to say, applications that use Silverlight framework as the basis for application development can still use the functions provided by xNa framework by referring to components. Otherwise, applications that use xNa framework as the basis for application development can also use the functions provided by Silverlight framework by referring to components.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.