This articleArticleWrite well.
Http://www.wpxap.com/thread-429060-1-1.html
Basic concepts:
1. Windows 8 has two versions: Pro and RT. pro uses x86 and RT uses arm.
2. x86 can run both Metro and all existing desktopsProgram(As long as there is no compatibility problem), in addition to running the metro program, arm can only run limited desktop programs provided by Microsoft and does not allow third-party desktop programs, such as the resource manager that comes with Windows 8, ie10 for desktop, WP for desktop, and drawing for desktop also have the most important built-in desktop office.
3. There are two types of cross-platform: one is to write once and can run directly across platforms, and the other is to run only after transplantation.
4. for stores, both Windows 8 Pro and RT visit the same Windows Store, while WP7 and WP8 visit the store of mobile phone edition. The two stores are completely independent, you won't see any windows Metro programs in the phone store.
5. For Windows 8 Pro and RT versions, only Metro programs can run directly across platforms, and must be non-C ++, that is, C # + XAML or HTML + Js.
6. the WP8 program needs to be transplanted no matter how it is, because the RTP of WP8 is similar to RT no matter how close it is, it is also a scaling version, and you do not want the mobile phone and tablet to be a set of interfaces, many basic software interface changes are basically re-developed.
7. the porting problem is mainly determined by the commonality of language and API. Silverlight is C # + XAML, which has the same language, API, after reading another post, I know that the winrt API is not changed with the previous Silverlight, and the method for calling it is the same for C #. Of course, winrt is native code and siverlight is managed.CodeEfficiency is poor, but do not think this gap is very large. For example, if you want to call Silverlight to play an MP4 video, Silverlight calls the system function instead of playing the video by yourself, they are both native and hard to solve.
conclusion:
Windows 8 shares a store, but if you want your Metro program to be shelved, you can fix the two, c ++ cannot be used. If C ++ is required, we need to transplant a specific copy of the arm (even if the porting adjustment is small or even just re-compiled ), then, the two software versions are available for both x86 and arm versions, and the two versions are maintained.
WP7 and WP8 are shared in the store. If you want to achieve compatibility between the two platforms, that is, maintain only one version and fix WP7 and WP8 at the same time, what method should you use, at the beginning, Microsoft WP7 shielded everything from CE and did not open native code. It was just to prepare for the continuity of the platform after the change of blood today. Therefore, after the change of WP8, WP7 can continue to exist as a subset of WP8, the basic software is still common.
if you want to create other versions, especially C ++, you can make one copy of WP7, one copy of WP8, one copy of Windows 8 Pro, one copy of Windows 8 Rt, and maintain four versions, you need to know that WP8 dual-core take-off WP8 will only start to sell for half a year. After WP8 starts to sell, WP7 will be sold for a long time as the middle and low end.
you can determine which client software you need to use C ++. In addition, it is managed C ++, and everyone calls winrt in the same position, the logic is not well optimized. Be careful that HTML + JS is smoother than yours. It is far inferior to C # To know the efficiency and maintainability of C ++'s business logic #.
Of course, there is nothing to say about the game. In addition to small games, large 3D games will soon abandon WP7.
Performance:
In fact, web page developers are the best at optimizing the loading logic, which is related to the loading methods of HTML Dom, and developers are optimized in place, the examples are loaded asynchronously only when they are slide to what you can see. This is something that web developers can't develop. They would have deducted requests and loads for each piece of data, traffic ah, used to asynchronous completion of one thing to do another.
The worst loading logic optimization, the first choice is to build a block-based Net programmer, what mvvm, requests to 50 pieces of data, it is definitely a one-time binding to display, and then let you know, net programmers often insert 1000 pieces of data into the list without any delay. For example, if you enter the song list with many lyrics, the performance of the first 100 pieces of data is still good, if you have 1000 songs, you will feel it. Sadly, I am the one with more than 1000 songs on my cell phone. I like to store my favorite albums and have a choice at any time.
In addition, the net program uses multithreading and easy to further cause the card. A typical example is that after a program such as Sohu video enters, as long as you dare to slide the page immediately, the request for this page will be triggered, then, the user slides to another page and triggers several page requests. These requests are carried out simultaneously, after these parallel requests are completed, you should first determine whether the user is still on the page and whether it is necessary to fill the data in the interface immediately, or wait for the user to switch back to the page and then fill in the data on the interface. Obviously, this basic logic is not done, so you must be stuck first when you slide.
C ++ doesn't know much about it, but it must be a C ++ program with low stability in the same period.
Finally, you will find that the most difficult program is the HTML + JS with the lowest language efficiency. If you don't believe it, you can wait and see.
As we all know, in WP7, a subset of WP8, more and more software will not support WP7 in the future, especially new 3D games, but it will not turn all developers to C ++, c ++ is just a choice.
Let's look for some practical instructions:
Class 1: HTML + JS:
This type of program can be used in Windows pro and RT. Many Microsoft programs are used, such as photo, Xbox Live, music, video, bingnews, bingsports, bingtravel, bingweather, and SkyDrive.
As you can see, many. winmd files may exist in software with complex functions written by Js.
A simple explanation of the winmd assembly is something that can be written by C # And C ++ and then called by JS, C #, C ++.
Javascript is a dynamic language after all. It is too easy to write errors and debugging is not as convenient as writing. Therefore, the others are still using C #, just like web development, such as the MVC framework, views: the interface is HTML + JS, and the Controller and service are both C #.
I didn't find the structure of some applications. Is it really similar to the MVC Framework for web development? haha, is the net programmer for web development very friendly.
If these are written in C #, the cross-platform capability will not be damaged. If C ++ is used, prepare for different platforms.
The figure shows video.
Class 2: C # + XAMLMost third-party developers choose to use Silverlight for porting to WP7 because of language interconnectivity and API similarity, so that WP7 and WP8 can be directly shared.
Bingmaps provided by the system, third-party Sina Weibo, pptv, QQ music, Tudou, and Renren HD.
The figure in the figure shows pptv. If we see no support for the processors in the second figure, we can kill x86 and arm. I think Microsoft is not user-friendly here. Do common users still care about x86 or arm? The platform is better, such as Win8 pro and win8rt.
This is the most popular and universal solution for Microsoft's platform.
Category 3: C ++I tried a few domestic software and now I found a backend QQ. Since QQ chose C ++, I want to provide two sets of maintenance for Windows 8 Pro and Windows 8 RT respectively.
CPU support. Currently, it can only be used for x86.
It can be seen that even if C ++ is used, the XAML is still used, the components in winrt are still called, and the interface is still the interface control in winrt, The mangaged C ++, I cannot see its advantages.
If some of the core needs to use the C ++ computing power (most of the data presentation classes do not have this requirement, we can say that 90% of common applications do not have this requirement ), maybe C ++ has a ready-to-use encapsulated class library, but this part can be fully transformed into a winmd class library using C ++ and a ready-to-use class library for JS or C # Calls.
The project uses the C ++ language and C ++ to call winrt, and the language habits have also changed. After all, winrt is the essence of net, such as metadata. All habits inherit from net, dealing with winrt using C ++ is a net routine, and I don't see any advantages.
The XAML of the interface is also derived from WPF. It has always been net stuff. Why c ++ and XAML? Is it expected that the performance of winrt calling is higher? At that time, the most smooth program interface was written by Js.
C ++ is always honest and practical in the computing-intensive part. For example, for game engines, do not compete for business on the interface.
C ++ is the least capable of cross-Microsoft platforms. To put it bluntly, it is something that C # cannot satisfy. Only C ++ has something that needs to be transplanted urgently, c ++ is required.
Which of the following types do you think belong to? QQ, Weibo, Tudou, Youku, and so on?
Currently, it is applicable to WP7 and WP8, and the best scheme that can be easily transplanted from Win8 is obviously C # + XAML, which corresponds to WP7 and WP8, that is, the Silverlight they can support.
As a developer, do it yourself.