This is the first article to reinvent a new blog. The website is named "gentle" and I hope to help readers in the course of warm-up. The one-month technical training for Nokia Windows Phone 7 is almost over. As a trainer, I would like to summarize my understanding of the entire Windows Phone 7 ecosystem.
Background
I believe everyone has heard that Nokia basically gave up its independent R & D of the new operating systems Symbian and meego, just two days ago, January 1, June 22, the Agreement on transferring 2800 employees worldwide to Accenture has been finalized. This training mainly aims to provide Nokia employees with a preliminary understanding of Windows Phone as a whole, nokia is mainly engaged in R & D in Beijing (Yizhuang and Zhongguancun) in China, with about 200 trainees. Regarding this transformation, Nokia's employees expressed great regret. The release of the meego operating system in Europe has made many people even more sorry.
Mobile operating system
The overall ecosystem of Microsoft Windows Phone 7 is still well established. The following is a summary of my comparison with the core capabilities of Windows Phone and other mainstream mobile platforms.
|
Multi-task |
Hardware standards |
User Experience |
Power Consumption |
Operating system functions |
Application |
Windows Mobile |
Multi-task support |
Only Recommendation |
Moderate to moderate |
Generally amazing |
Average |
Less |
Windows Phone (7.0/7.1) |
Frontend applicationsProgramLayer is a single task |
Microsoft defines strict standards, and all OEMs must follow |
Good |
Amazing |
Currently, many easy-to-use functions of the system have not been developed. |
Less |
Android |
Multi-task support |
Only Recommendation |
Medium to good |
Amazing |
Strong |
Multiple |
IOS |
Single task |
No standard, only Apple |
Good |
Amazing |
Generally, what Apple developed is limited. |
Multiple |
Symbian |
Multi-task support |
Only recommended, can adapt to low hardware configuration |
Bad |
Power saving |
Strong |
Moderate |
Windows Phone 7 Architecture
The system kernel of Windows Phone 7 is also Windows CE, which is based on Windows CE 6.0 R3. Therefore, the operating system kernel remains unchanged at this level, the main difference is that the shell and application layer are greatly changed, and the application layer is used.. NET Framework-managed environment CLR, which has two programming frameworks: Silverlight and xNa. The system software architecture diagram is as follows:
In more detail, Windows Phone is divided into four layers, which are summarized as follows:
- CorekernelIs the indivisible minimum kernel (controlling the processor, memory and critical hardware)
- KernelExcept des everything else that runs in the kernel (e.g. logical kernel implements actions including threads, processes, etc ., networking stack, device drivers, printer drivers, graphics & Media drivers, KTM, ETW, etc .)
- CoreosIs the core (mostly user-mode) OS substrate upon which the OS itself depends (e.g. Win32, COM, Ole, RPC, WMI, DirectX, etc .)
- OSIs the remaining set of other high-level essential and non-essential features that may, or may not, be installed by the OEM/user/etc. (e.g. explorer, Silverlight ,. net, Media Center, IIS, etc .)
WP7 Development
For more information, see the development environment and tools at each layer.
|
Environment |
Development language |
Development Tools |
Deployment tools |
Application Layer |
CLR |
C #/Vb |
Visual Studio 2010 for Windows Phone |
Visual Studio 2010 for Windows Phone |
OS layer |
Native code |
C/C ++ |
Visual Studio C ++ 2008 SP1 or other tools |
Platform builder for Windows Phone |
Kernel layer (mainly BSP) |
Native code |
C/C ++ |
Visual Studio C ++ 2008 SP1 or other tools |
Platform builder for Windows Phone |
- Download development tools:
- Visual Studio 2010 for Windows Phone can be downloaded for free on the Microsoft website
- Visual Studio C ++ 2008 SP1 requires money
- Platform builder for Windows Mobile can be publicly downloaded, but the for Windows Phone version is only open to OEMs. This tool is used for Rom.
- Download development materials:
- The application development materials provided by Microsoft are very rich. We recommend WP7 Jump Start video, training kit and developer document
- Microsoft press ebook programming Windows Phone 7
- For OS and driver development, this resource is only available to OEMs. However, you can obtain the following information about the operating system through this link (you need to flip the wall and I believe many people interested in the underlying layer will be helpful)
- Windows Phone 7 architecture Guide
- Windows Phone 7 mizmization Guide
- Windows Phone 7 OEM Application Development Guide
WP7 Application Development
I believe that bloggers are most interested in application development, that is, the development of Silverlight and xNa. In fact, during the two-day training, Windows Phone 7 was mainly involved as a black box, that is, the gray part in the light blue in the software architecture diagram above, application development, we will introduce Windows Phone 7 from these aspects.
- platform Overview (WP7 hardware standard, software architecture, ecosystem)
- Metro UI (ui style, tile, glance & go, panaroma)
- build WP7 app ppt (Development Tool Vs + blend)
- page navigation (intra-program and inter-program navigation)
- execution model (Program lifecycle, sleep, and tombstone)
- data binding (mvvm, data binding)
- Sensor and gesture (gravity sensor, gyroscope, compass, GPS)
- xNa (2D and 3D games)
- push notification (tile, toast, raw)
- mango new feature (Chinese, SQL, background Service [15 seconds every 30 minutes ]...)
For detailed development process, I think you can read through the Microsoft tutorial, and basically it is the same as the desktop application development, so if you have developed Silverlight/WPF or xNa, in this case, WP7 applications can be developed without any effort. Here I want to talk about some things that may be useful to you.
1. XAML tree
All major lob applications in WP7 are Silverlight applications,For developers who have never been familiar with XAML, a deep understanding of it requires a process because it is different from the winform interface expression. In Silverlight, I think the logical tree and visual tree are very important links,Construct an object in XML format, Specifically
- Each xmlelement element in XAML can find the corresponding class in. NET Framework. Every time you add an xmlelement to XAML, it is equivalent #CodeAnd set the property value of the object through xmlattribute.
- The hierarchical structure of xmlelement is used to reflect the control relationship between father and son. It is equivalent to parentcontrol. Children. Add (childcontrol) in the code)
For more information about tree, see msdn.
2. Page Stack
Each Silverlight application in WP7 consists of multiple pages. The backend key may jump to different pages in your program or between different programs. You can understand the page navigation of WP7 through stack.
- Back key: Out stack.
- Start key (including the program opened through start) and search key: in the stack.
- Program switching (long press the back key): Move the page of an application in the stack to the top of the stack.
With this rule, you can easily understand and analyze what will happen when you click the back key at any time. There is also a fact that in WP7, only one instance of the same application can exist in the system, which means that if you open an application, you can open another one by using the START key, the system will kill your original Instance.
3. Data Binding
Data Binding is implemented by MicrosoftTwo objectsOfAttributeA convenient way to establish a bridge between them. Target and source have three binding methods: onetime, oneway, and twoway. Generally, your applications are designed in mvvm mode, separate the data from the interface, and then automatically associate the interface space with your model data through data binding. Therefore, the target is your uielement and the source is your viewmodel. You can also bind the uielement as the source to another uielement for interaction. For more information, see msdn.
4. execution model
About the application execution process, the major difference between the new 7.1mango version is the introduction and dormant (sleep) status, that is, when your application layer is interrupted (such as a call, or when the user clicks the START key, search key, etc.), your program thread will be terminated, but the memory will be saved, which is more than 7.0 directly into tombstone (the tombstone, that is, the memory is also released) A lot better.
- At any time, only one front-end program is running.
- Your program runs in sandbox, so you cannot perform cross-process operations. At the same time, the so-called "multi-process" in 7.1 does not know whether the background program is running, because only 15 seconds are allocated to your background program every 30 minutes.
- Your background program and foreground program are in two processes, they are not accessible
4. xNa
The xNa and Silverlight applications become different models.
& Lt; TD width = "133" valign = "TOP" & gt; & lt;/TD & gt; & Lt; TD width = "245" valign = "TOP" & gt; Silverlight & lt;/TD & gt;
xNa |
Model |
event-based |
loop-based |
UI |
Metro UI, common controls |
No UI Standard |
presentation |
vector-based |
Bitmap-based |
tools |
Vs and blend wysiwyg ui tools |
no drag and drop UI tools, need code to render |
XNa game framework is an endless loop. By default, you can call the update and draw Methods 30 times per second.
- For a two-dimensional xNa game, the elements in the game are simply understood as some small images. load is Sprite. Generally, you update the X and Y coordinates of the Sprite in the update method and draw them in the draw method;
- For 3D xNa games, all the elements in the game are 3D models + textures, and load is model. Generally, you can update the coordinates of X and Y and Z in the update method, camara is built on the draw method for projection. 3D models generally generate fbx files as xNa game resources using professional tools such as 3dmax or AutoCAD.
5. Sensors
Microsoft's API for WP7 hardware sensor is still very easy to use, such as gravity (acceleration) sensors, gyroscope, and so on. In version 7.1, it also introduced the spatial framework (motion) to simplify developers' work, these Apis still require a little bit of 3D space vector and decomposition knowledge.
We have analyzed some of the key points of Windows Phone 7 and look forward to the release of the 7.1 Chinese Version Rom. This will give an explanation to fans who are eating crabs.