Come to microsoft to build a WinRT developer's answer

Source: Internet
Author: User

Http://www.infoq.com/news/2012/11/Panel-WinRT-Answers

Original article:

Panel: answers from Microsoft developers who built
Winrt

Posted by Abel Avram on Nov 05,
2012

Sections
Development
Topics
Windows,
Windows 8,
Operating Systems,
WinRT,
Panel
Share | share
On facebookshare
On diggshare
On dzoneshare
On twittershare
On redditshare
On deliciousshare
On email

Chris Anderson, Chris guzak, Jerry
Dunietz, Kamen moutafov, Martyn Lovell, Elliot
H omiya, lead developers working on various winrt components, have taken questions during the build 2012 panel the Windows runtime Q & A, answering some of the developers'
Ardent questions on Windows 8 applications, especially winrt ones. Following is a digest of the answers to most important questions.

There is one CLR, one set of DLLs, for desktop and Windows Store applications, but a desktop application's CILS do not go the path of WinRT.

WinRT asynchronous cballs may create a problem for cases when, for example, someone has to check the name of hundreds of files. an exception is thrown for each call making the debugging experience cumbersome. the team considers solving this problem in
Future.

Microsoft is not disclosing any information regarding future versions. NET or WinRT, but they will do that at some point in the future. all that they can say right now is the "Windows 8 has a version of WinRT in it."

Opening a file by a Windows Store app will fail if the file is already opened by a desktop app in exclusive mode. to avoid such a conflict one needs to open the file in read mode. the underlying file system is common to both WinRT and desktop apps.

An async operation is executed on a separate thread that comes from a dedicated thread pool administered by windows. care must be taken when firing a large number of asynchronous callfrom the UI thread because they can have a severe impact on the Application
When they all come back. If an application is to run your async cals, then it is recommended to batch their execution so it won't overload the system.

There is a new type of string in winrt in order to have a common way that supports the needs of various targeting winrt. A string created in a language-C #, C ++, JavaScript, etc. -is not automatically duplicated when passed to winrt, only a reference
Is passed for performance reasons, but it can be duplicated when necessary.

The Windows Store certification process covers only the basic tests to ensure an application's compatibility with winrt devices, such as surface, and it is not an exhaustive one. extensive testing needs to be saved med in order to ensure an application behaves
Correctly when run on a target device.

Microsoft is not providing programmatic access to some of the system's hardware information-such as the battery level-in winrt to avoid developers use it to change the application's behavior based on that. the idea is to let applications have a consistent
Behavior hardware SS devices and system states. The Windows 8 Dev portal provides some information regarding the devices and Windows versions an application runs on.

It is hard or impossible to write System Administration type of applications for winrt. The system prohibits or limits access to certain system resources.

There is no programmatic way to query or enforce the application that will serve a certain protocol, such as the file protocol setting determining which application plays mp3 files. The demo-is left to the user.

Regarding communication between desktop and Store apps, one of the panelists said: "We work hard for that not to work. "The only way to communicate is through protocols and file type association which are under user's control.

A WinRT application can have multiple views running in separate threads. windows considers 2 such views as one single application, that meaning an user cannot switch between the views using the system app switching mechanic but a mechanic developed separately
For the app.

A Windows Store application can open ports and communicate but not the web server's port, 80.

Translation:


Chris Anderson, Chris
Guzak, Jerry Dunietz, Kamen
Moutafov, Martyn Lovell, Elliot
H Omiya leads developers to develop various WinRT components. These problems have been solved in building the 2012 windowsQ & A runtime panel and some developers are concerned about win8 applications, especially for winRT, the following is a summary of the answers to important questions.

This is a CRT dll setting for desktop and windows Store applications, but the WinRT path is not used for calling a desktop application.

Asynchronous WinRT call may cause a problem when cases when, for example, when you check the names of hundreds of files, an exception will be thrown, which may cause trouble during debugging, the team thinks they will solve the problem later.

Microsoft did not disclose any information about the future. net or WinRT version information, but they will solve this problem some time in the future, and then they can say that "win8 has WinRT available ".

If the file has been opened in exclusive mode by the desktop program, opening the file in windows store will fail. To avoid this conflict, you need to open the file in read-only mode, the related file system is shared by WinRT and desktop programs.

An Asynchronous Operation thread runs on a thread dedicated to windows Thread Pool Management. It will maintain a large number of asynchronous calls to the UI thread, because it will return all results when the program has a serious impact. If a program runs many asynchronous operations, it is recommended to execute it in batches so that it will not overload the system.

To have a public method to support various languages for WinRT, a new string type is available in WinRT. A string type is created in c #, c ++, JavaScript, and other languages, for performance reasons, it is not used to automatically copy a string through WinRT, but a reference to a string, but it can be copied when necessary.

The windows store certification service only includes testing the compatibility between programs and WinRT devices. Such as the surface, and it is not detailed. A comprehensive test requires that the program runs correctly on a running device.

Microsoft does not provide any way to access system hardware information, such as power supply. In WinRT, to prevent developers from using it to change application actions based on this information. The idea is to let different applications get the same information about the device and system status .. Windows
8. The development portal provides applications related to devices and Windows versions.

It is difficult or impossible to write the system management type of a WinRT application. The system prohibits or restricts access to certain system resources.

There is no programming method to query or execute some applications for services related to certain protocols. For example, to determine which applications play the mp3 file protocol, this decision is left to the user.

For the communication between the desktop and the application, a group member believes: "We have made a lot of difficult efforts to make it unable to work." communication is only done in one way, use protocols and files under the control of users.

A winRT application can have multiple views running in a single thread. windows considers two such views to be in a single application, this means that you do not have to switch between a window using the system application selection mechanism and a window for separately developing the application mechanism.

One windows
Sotre applications can open ports and communicate, but cannot open network service ports, 80.

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.