Slide Deck of my presentation at the SoCal Code Camp June 23rd 2012 in San Diego
WinRT Fundamentals by Kevin Stumpf
Check out the corresponding blog post:
http://blogs.interknowlogy.com/2012/06/25/socal-code-camp-winrt-fundamentals/
This presentation was highly code and talk laden, so the deck itself might not be too useful if you haven't attended my session. However, attendees asked me to publish the slides... so there they are :-)
Unleash Your Potential - Namagunga Girls Coding Club
Win rt fundamentals
1. Kevin Stumpf
Sr Software Engineer
kstumpf@interknowlogy.com
2. 1. Short introduction to Windows 8
2. Windows Runtime (WinRT)
3. Ways to develop Metro style apps for Windows 8
4. Language Projection
5. .NET’s role in the WinRT world
6. XAML Differences to WPF
7. Limitations
6. 1. Knowledge applies to Desktop, Tablet & WP8
2. The future is handheld
1. Consumer Market
2. Corporate Market (Hotel Check-Ins, Nurses, etc.)
3. Develop commercial Apps for the Marketplace
4. Strong Marketing from Microsoft as their Metro
Ecosystem is vital
7. What the WinRT is about and
how it is integrated in the Win32
world
8. 1. Windows 8 Architecture
2. WinRT vs. Win32
3. WinRT API
16. 1. WinRT API Metadata
2. Projection explanation
3. Projection areas
17. WinRT API is described by .winmd Files
Only Metadata, no implementation
Foundation for the Language Projection
Format follows ECMA-335 standard (Common Language Infrastructure)
Independent from .NET, although it shares the same file format
Files can be disassembled using IL
Location: C:WindowsSystem32WinMetadata
20. 1. Integration in WinRT
2. Metro style subset
3. Visual Studio Project types
21. C#/VB is NOT compiled against WinRT, it is still compiled to the same MSIL and then JIT-
compiled at runtime by the CLR
Executing CLR is the same for Desktop and Metro style based apps
Desktop and Metro style both use .NET 4.5
Metro style uses a constrained .NET subset which is just another .NET Profile (similar to
Silverlight, WP7)
Metro style apps in addition reference the WinRT by referencing Windows.winmd
CLR communicates with WinRT
A .NET developer's view of Windows 8 app
development
22. Subset restricts functionality at development time that would be forbidden by the application
container at runtime
Certain functionality was moved to the WinRT API (File access, network) to avoid redundancy
Certain functionality was completely removed
◦ Dangerous/ Obsolete / Legacy APIs
◦ Badly designed APIs
◦ Not applicable anymore (Console, ASP.NET)
Refactorings
23. No exceptions with a full stack trace anymore! Instead, HRESULTS and wild guessing
Debugging is limited: No reflection of the framework’s implementation is possible anymore
26. No MultiBindings
No RadialGradient Brushes
No PixelShader effects for UIElements
No RelativeSource->FindAncestor Bindings
No Implicit DataTemplates
No Triggers, just VSM
No Markup Extensions
28. WinRT API only addresses the most common use
cases
A subset of COM and Win32 functionality is
available to address other scenarios such as
◦ Accessing raw data from the webcam
◦ DirectX
◦ Diagnostics
◦ …
29. .NET World: Pinvoke
C++: Import the Win32 library and invoke the
imported method
JavaScript: No winmd metadata available => Not
callable from JavaScript.
Workaround: Build a C++ or .NET WinRT
component that wraps the C++/COM functionality
of interest