SlideShare a Scribd company logo
Kevin Stumpf
      Sr Software Engineer
kstumpf@interknowlogy.com
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
Important facts about Windows 8
1.   Hybrid OS
2.   Contracts
3.   Security System
App




                                   exposes
                publishes     Capabilities         restricts
Marketplace
                                                                        Broker




  Network (Client/Server)   Shared Directories                 Hardware
                            • Documents                        • Webcam
                            • Videos                           • Microphone
                            • Pictures                         • Proximity
                            • Music                            • GPS
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
What the WinRT is about and
how it is integrated in the Win32
world
1.   Windows 8 Architecture
2.   WinRT vs. Win32
3.   WinRT API
Diagram from
http://bit.ly/GWmiLO
Diagram from
http://bit.ly/GWmiLO
asynchronous                              object oriented




   private
                  based on
               extended COM            Hierarchical
                              self-explanatory namespaces
Ways to develop Metro style apps
for Windows 8
1.    Dependency Diagram
2.    Metro style GUI development
     1. XAML
     2. “HTML5”/CSS
3.    Business Logic development
     1. JavaScript
     2. C# / VB
     3. C++
CX   WRL
How C#, JavaScript and C++ can
access the very same WinRT API
1.   WinRT API Metadata
2.   Projection explanation
3.   Projection areas
   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
WinRT API
(Metadata)




        Type
     Projections     Naming
                   Projections     Pattern
                                 Projections
.NET’s role in the WinRT world
1.   Integration in WinRT
2.   Metro style subset
3.   Visual Studio Project types
   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
   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
   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
Major changes between WPF
XAML and WinRT XAML
   No MultiBindings
   No RadialGradient Brushes
   No PixelShader effects for UIElements
   No RelativeSource->FindAncestor Bindings
   No Implicit DataTemplates
   No Triggers, just VSM
   No Markup Extensions
WinRT Limitations and how you
can overcome some of them
   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
    ◦   …
   .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
Kevin Stumpf – kstumpf@interknowlogy.com

More Related Content

Similar to Win rt fundamentals

Windows 8
Windows 8Windows 8
Windows 8
Robert MacLean
 
Microsoft .Net Technology
Microsoft .Net TechnologyMicrosoft .Net Technology
Microsoft .Net Technology
vijayakumari kaliannan
 
Windows 8 & JavaScript
Windows 8 & JavaScriptWindows 8 & JavaScript
Windows 8 & JavaScript
Robert MacLean
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp EnGregory Renard
 
O futuro do .NET : O que eu preciso saber
O futuro do .NET : O que eu preciso saberO futuro do .NET : O que eu preciso saber
O futuro do .NET : O que eu preciso saber
Danilo Bordini
 
Deep Dive into WinRT
Deep Dive into WinRTDeep Dive into WinRT
Deep Dive into WinRT
Sasha Goldshtein
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu Vunvulea
 
jhkghj
jhkghjjhkghj
jhkghjAdmin
 
test2PPT
test2PPTtest2PPT
test2PPTAdmin
 
Asp net
Asp netAsp net
Asp dot net
Asp dot netAsp dot net
Asp dot net
husnara mohammad
 
Asp net
Asp netAsp net
Building apps with common code for windows 8 and windows phone 8 (WP8)
Building apps with common code for windows 8 and windows phone 8 (WP8)Building apps with common code for windows 8 and windows phone 8 (WP8)
Building apps with common code for windows 8 and windows phone 8 (WP8)
Tamir Dresher
 
Sharing code win8 wp8
Sharing code win8 wp8Sharing code win8 wp8
Sharing code win8 wp8matthidinger
 
ASP.Net Technologies Part-1
ASP.Net Technologies Part-1ASP.Net Technologies Part-1
ASP.Net Technologies Part-1
Vasudev Sharma
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
SynapseindiaComplaints
 

Similar to Win rt fundamentals (20)

Windows 8
Windows 8Windows 8
Windows 8
 
Windows Mobile
Windows MobileWindows Mobile
Windows Mobile
 
.Net + novas tecnologias + win8
.Net + novas tecnologias + win8.Net + novas tecnologias + win8
.Net + novas tecnologias + win8
 
Microsoft .Net Technology
Microsoft .Net TechnologyMicrosoft .Net Technology
Microsoft .Net Technology
 
Windows 8 & JavaScript
Windows 8 & JavaScriptWindows 8 & JavaScript
Windows 8 & JavaScript
 
Introdot Netc Sharp En
Introdot Netc Sharp EnIntrodot Netc Sharp En
Introdot Netc Sharp En
 
O futuro do .NET : O que eu preciso saber
O futuro do .NET : O que eu preciso saberO futuro do .NET : O que eu preciso saber
O futuro do .NET : O que eu preciso saber
 
Deep Dive into WinRT
Deep Dive into WinRTDeep Dive into WinRT
Deep Dive into WinRT
 
Radu vunvulea building and testing windows 8 metro style applications using ...
Radu vunvulea  building and testing windows 8 metro style applications using ...Radu vunvulea  building and testing windows 8 metro style applications using ...
Radu vunvulea building and testing windows 8 metro style applications using ...
 
jhkghj
jhkghjjhkghj
jhkghj
 
test2PPT
test2PPTtest2PPT
test2PPT
 
Asp net
Asp netAsp net
Asp net
 
As Pdotnet
As PdotnetAs Pdotnet
As Pdotnet
 
Asp dot net
Asp dot netAsp dot net
Asp dot net
 
Asp net
Asp netAsp net
Asp net
 
Building apps with common code for windows 8 and windows phone 8 (WP8)
Building apps with common code for windows 8 and windows phone 8 (WP8)Building apps with common code for windows 8 and windows phone 8 (WP8)
Building apps with common code for windows 8 and windows phone 8 (WP8)
 
Introduction of c# day1
Introduction of c# day1Introduction of c# day1
Introduction of c# day1
 
Sharing code win8 wp8
Sharing code win8 wp8Sharing code win8 wp8
Sharing code win8 wp8
 
ASP.Net Technologies Part-1
ASP.Net Technologies Part-1ASP.Net Technologies Part-1
ASP.Net Technologies Part-1
 
Synapse india reviews sharing asp.net
Synapse india reviews sharing  asp.netSynapse india reviews sharing  asp.net
Synapse india reviews sharing asp.net
 

Recently uploaded

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

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
  • 4. 1. Hybrid OS 2. Contracts 3. Security System
  • 5. App exposes publishes Capabilities restricts Marketplace Broker Network (Client/Server) Shared Directories Hardware • Documents • Webcam • Videos • Microphone • Pictures • Proximity • Music • GPS
  • 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
  • 11. asynchronous object oriented private based on extended COM Hierarchical self-explanatory namespaces
  • 12. Ways to develop Metro style apps for Windows 8
  • 13. 1. Dependency Diagram 2. Metro style GUI development 1. XAML 2. “HTML5”/CSS 3. Business Logic development 1. JavaScript 2. C# / VB 3. C++
  • 14. CX WRL
  • 15. How C#, JavaScript and C++ can access the very same 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
  • 18. WinRT API (Metadata) Type Projections Naming Projections Pattern Projections
  • 19. .NET’s role in the WinRT world
  • 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
  • 24. Major changes between WPF XAML and WinRT XAML
  • 25.
  • 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
  • 27. WinRT Limitations and how you can overcome some of them
  • 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
  • 30. Kevin Stumpf – kstumpf@interknowlogy.com