For now, the developers of Windows Phone 8 are all going to be fighting in a tech friend, and I believe that while you're doing Windows Phone 8 development, you're also looking at Windows 8, I'm sure a lot of developers will start on Windows 8 and Windows Phone 8. To keep abreast of. In fact, the most important update of Windows Phone8 this time is the Windows Phone Runtime and our Windows 8 shared NT kernel, and we collectively refer to the Windows runtime abbreviation WinRT for more than 11,000 members With Windows 8 However, our Windows Phone runtime abbreviation WINPRT is a subset of WINRT with more than 2,800 shared members and features of more than 600 windows phones. (For example: Voice, VOIP, lock screen management, etc...) As we can see from the shared Windows kernel so many AIP are shared at the API level, so how much of this shared API can facilitate our development, and I'll give you a separate introduction later. At the same time welcome everyone here to communicate with me or on Sina Weibo @ Wang Bo _nick
Windows 8 and Windows Phone 8 share the Windows kernel, which means that developers can use common programming models to build applications and games.
From the perspective of development costs or product planning, developers can use the same Code/development language/development tools to create applications and games while simultaneously applying the WINDOWS8 and Windows Phone 8 to radically accelerate development time.
There must be some students here to think about what characteristics of winprt in the development process how to determine the existence of a winrtapi or WINPRT, and winprt unique API?
Here I give everyone a detailed list of MSDN can be found in: http://msdn.microsoft.com/en-us/library/windows/apps/jj207212 (v=vs.105). Aspx#bkmk_ Understandingthewinrtdocumentation
From which we can clearly see that the Windows Phone 8 and Windows 8 development process can share those parts here is the note that the Javascript+html development mode in Windows 8 WINRT environment is supported by API level calls but in WINPRT environment is based on IE10 control, incidentally, the Windows Phone 8 IE10 control of the operation of JavaScript, especially to HTML5 Support for a large package also includes multi-touch support.
Here is a TechED 2012 on the people like the Windows Phone API QuickStart Poster (PDF) (at that time a limited number of students do not get the download here to print out also very good)
And a detailed description of the new features of Windows Phone8: http://msdn.microsoft.com/en-us/library/windows/apps/jj206940 (v=vs.105). aspx
Secondly, in the actual development of the use of a lot of system control actually these controls are very similar in the design of the time there are many similarities
As you can see from the above diagram, most of the controls in Windows 8 and Windows Phone 8 are similar, although they are not entirely based on the same namespace but are the same for XAML, So many control UE operations are the same when the designers are doing the foliar design, and of course Windows Phone 8 has some unique controls, such as Panorama and pivot, because the Windows Phone user habits are unique, but in Windows 8 users prefer to use the GridView and FlipView.
Here I give a detailed list of MSDN for you to refer to the different points of the controls in Windows 8 and Windows Phone 8: http://msdn.microsoft.com/en-us/library/windowsphone/develop/ jj735581 (v=vs.105). aspx
It says so much that certain friends will ask what we do in the actual project.
1. Split UI logic using MVVM
If you've ever had a Silverlight or WPF friend, you've probably heard or used MVVM's pattern, if it happens that your Windows8 or Windows Phone project happens to be developed using MVVM then you can choose to go through share The form of ViewModel is believed to save you a lot of time for your development.
Here is a way to believe how to operate:
http://msdn.microsoft.com/en-us/library/windows/apps/jj721615 (v=vs.105). aspx
http://msdn.microsoft.com/en-us/library/windows/apps/gg521153 (v=vs.105). aspx
2. Using Portable Class Libraries
Believe that the friends have found Viewmodle and model are placed in a portable/common here to explain the structure of portable Class libraries
Portable Class Library is a new class libraries template in VS2012 based on. NET4.0 the class library as a subset of Silverlight, Windows Phone, Windows 8, and Xbox360 and can run in the above environment, It is undoubtedly possible to share some of the same business logic between different platforms, which will be of great convenience to developers.
There are a few things to note when using portable Class libraries
- Supports only managed code development C # or VB. NET
- Do not use conditional compilation
- Do not use the Windows runtime API
- Do not use the UI control Library
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/jj714086 (v=vs.105). aspx
3. Share code files using link form
The form of link was introduced in the case of WP7 to WP8 before me, and this form also applies to Windows Phone 8 and Windows 8, which is very simple. I don't have much to introduce here.
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/jj714082 (v=vs.105). aspx
4. Using Windows Runtime Components
In developing WINRT or WINPRT applications, there are a few things that are not open to the language we're using. Windows Runtime components to help encapsulate and support all development language calls
Benefits of using Windows Runtime components
- Can play a C + + performance Advantage
- Calls that can support multi-use speech
- Support for Direct3D, Win32, or COM APIs (this is partial)
- Calling a third-party class library
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/jj714080 (v=vs.105). aspx
5. Sharing XAML UI
This feature may be less useful for a page, and a wrapper control should still be helpful (personal feeling)
Interested students can take some time to digest: Http://channel9.msdn.com/Events/Build/2012/3-043R
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/jj714088 (v=vs.105). aspx
6. Compiling commands using Conditional compilation
In the end, I also introduced in the previous WP7 to WP8 that the main thing is to separate the compilation between different projects when sharing files, and to use the link code together.
namespace ProjectB
{
public class MyClass
{
public void CommonMethodA()
{
// code that is common to Windows Phone 8 and Windows 8
}
public int CommonMethodB()
{
int result = 0;
// code that is common to Windows Phone 8 and Windows 8
return result;
}
public void PlatformSpecificMethod()
{
#if NETFX_CORE
// code for Windows 8
#else
// code for Windows Phone 8
#endif
}
}
}
Overview of Windows Phone 8 and Windows 8 development technologies