Build applications for Windows 8 and Windows Phone 8

Source: Internet
Author: User

Windows 8 and Windows Phone 8 tend to merge. At the same time, developers who are interested in building applications for these two platforms must understand the important similarities and differences between the two. Understanding the current common functionality of the Windows 8 and Windows Phone Runtime APIs gives you the opportunity to deliver applications to these two platforms with a lot of the same knowledge, tools, code, and assets. In this article, I'll look at these differences and commonalities to help you understand what you can and can't do before you start building a solution that also targets these two platforms.

The consistency in UX (the magnets, the rich touch interface, the application bar, and navigation usage) simplifies the process of designing and implementing applications for these two platforms. Using the same API perimeter application simplifies code sharing in many scenarios. You can choose the technology that is appropriate for your application: Use C #, Visual Basic, C + +, or mixed technologies for these two platforms. Resources on Aka.ms/sharecode contain a wealth of information about creating applications that run in Windows Phone 8 and Windows 8, and existing code-sharing methods to maximize the reuse of your code in building applications for both.

Specific aspects of the comparison

To effectively write code for these two platforms, you need to understand the important differences in functionality, as well as the functionality that is broadly similar but differs from API and implementation. For these features, you should not attempt to reuse code. I'll describe three important areas of concern in detail:

Ux

Data model and Support code

Platform-specific features

Ux

Appearance dimensions are an important consideration when designing the UI of cross-platform applications. You need to consider features such as screen resolution, screen size, and device default orientation. The UI must be carefully determined to ensure that the user experience is optimized under the constraints of a particular device.

You will soon realize that all of the features that you add to the Windows Store application in Windows Phone 8 applications are unreasonable, so you must design your own UX for each platform. Figure 1 illustrates the various UX differences that must be considered in order to build the best possible experience.

Figure 1:windows Phone 8 vs. Windows 8 UX Features

XAML Namespaces : Although Windows 8 and Windows Phone 8 use XAML for UI design, you should not reuse XAML across applications. The difference between these two platforms is huge: page layouts and Orientations, XAML namespaces, and XAML controls make reusing this difficult.

Although many controls exist on two platforms, the controls are in different namespaces. For example, you can find Windows 8 equivalent controls for Windows Phone in Windows.UIXaml.Controls, Microsoft.Phone.Controls, and Microsoft.Phone.Shell, and Syste M.windows.controls contains Windows 8 controls and some shared controls. Fortunately, the XAML editor warns you when you try to add an unsupported control. However, XAML does not support conditional compilation, so it is not easy to add namespaces to a platform or another platform at run time.

XAML Controls : Each control library is optimized for its corresponding platform. Therefore, it is highly recommended that you design your own user controls for each platform individually. This will help to maintain consistent UX on each platform while reducing the likelihood of migrating XAML as a result of an error. Figure 2 shows some basic controls.

Figure 2:windows Phone 8 and Windows 8 basic controls

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.