a developer's view of windows 8
DESCRIPTION
Source codes for the demos are available at http://lunarfrog.com/blog/2011/12/01/cttdnug-presentation/TRANSCRIPT
![Page 2: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/2.jpg)
2
Agenda
• Developing for Classic Desktop
• Introduction to Metro UI
• Building Metro applications
![Page 3: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/3.jpg)
3
Is .NET dead?
vs
![Page 4: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/4.jpg)
4
Windows 8 platform
Windows Kernel Services
Internet Explorer Win32
CLR
Metro-style APIs
C# / VBHTML /
JSor
SL
C / C++
![Page 5: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/5.jpg)
5
.NET 4.5 Framework
• Pre-installed in Windows 8
• Windows XP is not supported
• Use 4.0 runtime (same as 3.5 use 2.0 RT)
![Page 6: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/6.jpg)
6
Asynchronous development
• New data structures
• New async APIs
• New keywords in C# and VB• async• await
![Page 7: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/7.jpg)
7
DemoAsync and Await
![Page 8: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/8.jpg)
8
If it runs on a Windows 7,
it'll run on Windows 8 PC
![Page 9: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/9.jpg)
9
DemoMetro UI
![Page 10: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/10.jpg)
10
App suspension
• Inactive apps are suspended by the OS:• Apps remain in memory• No CPU, Disk or Network consumed• All threads are suspended
![Page 11: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/11.jpg)
11
App lifecycle states
Not started Running
Suspended
Suspending
![Page 12: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/12.jpg)
12
DemoApp lifecycle
![Page 13: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/13.jpg)
13
Windows 8 platform
Windows Kernel Services
Internet Explorer Win32
CLR
WinRT APIs
Application Model
Communication Graphics/Media Devices
LanguagesC# / VB
HTML / JSor
SL
C / C++
![Page 14: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/14.jpg)
14
WinRT
• Object-oriented Win32 replacement
• Native, written in C++
• Based on COM
• .NET-like metadata
• Any language can be used to extend it
• Async everywhere (50ms rule)
![Page 15: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/15.jpg)
15
Windows 8 platform
Windows Kernel Services
Internet Explorer Win32
CLR
WinRT APIs
Application Model
Communication Graphics/Media Devices
IE 10 EngineC / C++
CLR
JavaScript C# / VB
HTML / CSS DirectX XAMLC# / VB
HTML / JSor
SL
C / C++
![Page 16: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/16.jpg)
16
.NET Metro profile
• Subset of Client Profile• No Remoting• No System.Data• No System.Web• No private reflection, no Emit• Some APIs replaced with async versions• Some .NET classes moved to WinRT
![Page 17: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/17.jpg)
17
XAML for Metro
• New variation of XAML, close to Silverlight
• Standard controls• Button, TextBox, ComboBox, CheckBox, etc.
• New controls• ProgressRing• FlipView• GridView• ListView
![Page 18: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/18.jpg)
18
Demo
• Image Browser• Scans Pictures library and shows all the
keywords• Allows to select a keyword• Shows all the images for the keyword
• Snapping
• Search integration
• FilePicker integration
![Page 19: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/19.jpg)
19
DemoDeveloping Windows 8 apps
![Page 20: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/20.jpg)
20
App packaging
• .appx file format (zip)
• Compiled app and resources
• App Manifest
• BlockMap
• Digital signature
AppXManifest.xml
BlockMap
Signature
Files / Assets
.appx package
![Page 21: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/21.jpg)
21
Installation
• Declarative approach
• Everything installed in one folder
• Installation is on per-user basis• Installation for first user• Registration for the next
• No custom actions
• Automatic updates
![Page 22: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/22.jpg)
22
How to start
• Main start point: http://dev.windows.com/• Samples• Metro style app reference and APIs• Forums• Windows 8 Developer Preview with developer
tools (x64)
• Installation on a VM• VirtualBox 4.1.2+• VMware Workstation 8.0+• Hyper-V
![Page 23: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/23.jpg)
23
Links
• BUILD conference videos
• http://channel9.msdn.com/Events/BUILD/BUILD2011
• 8 Traits of Great Metro Style Apps (Jensen Harris)
• Building Windows 8 blog • http://blogs.msdn.com/b/b8/
![Page 24: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/24.jpg)
24
Q & A
lunarfrog.com/blog
@taggedfrog
![Page 25: A Developer's View of Windows 8](https://reader035.vdocuments.us/reader035/viewer/2022070302/548d9767b47959e20c8b66af/html5/thumbnails/25.jpg)
Thank you!
25