1 / 51

Windows Runtime Deep Dive

DEV317. Windows Runtime Deep Dive. Brendan Forster Senior Developer, ASP.NET/IIS MVP @ shiftkey. # auteched #dev317. About. What is it How can you use it What’s it doing under the hood Don’t worry, there are plenty of demos. Audience. People who work with different languages

avalbane
Download Presentation

Windows Runtime Deep Dive

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DEV317 Windows Runtime Deep Dive Brendan Forster Senior Developer, ASP.NET/IIS MVP @shiftkey

  2. #auteched#dev317

  3. About • What is it • How can you use it • What’s it doing under the hood • Don’t worry, there are plenty of demos

  4. Audience People who • work with different languages • care about native code • are curious about internals

  5. You do not need to remember any of this …but its pretty neat anyway

  6. Windows Store Apps Desktop Apps DX HTML JavaScript HTML / CSS XAML View JavaScript (Chakra) C/C++ C#, VB Model Controller C C++ C# VB Windows Runtime APIs Devices & Printing Communication & Data Graphics & Media System Services .NET SL Internet Explorer Win32 Application Model Windows Kernel Services Kernel

  7. Windows Store Apps Desktop Apps DX HTML JavaScript HTML / CSS XAML View JavaScript (Chakra) C/C++ C#, VB Model Controller C C++ C# VB Windows Runtime APIs Devices & Printing Communication & Data Graphics & Media System Services .NET SL Internet Explorer Win32 Application Model Windows Kernel Services Kernel

  8. Windows Store Apps Desktop Apps HTML JavaScript HTML / CSS View DX XAML JavaScript (Chakra) C/C++ C#, VB Model Controller C C++ C# VB Windows Runtime APIs Devices & Printing Communication & Data Graphics & Media System Services .NET SL Internet Explorer Win32 Application Model Windows Kernel Services Kernel

  9. What it is "Windows Runtime, or WinRT, is a cross-platform application architecture used on the Windows 8 operating system.“ Wikipedia

  10. What it is In laymans’ terms: use what you want. • Use C#, C++, Javascript for your logic • Use XAML or HTML for your UI • Low-level access to hardware and devices

  11. demo An introduction to Windows Runtime What even is it?

  12. Windows Metadata • API specification • Describe the APIs to consumers • Common Intermediate Language • (the one that .NET assemblies use)

  13. demo What is Windows Metadata anyway? “All I see is blonde, brunette, redhead.”

  14. How do we use the metadata ?

  15. Language Projections • Libraries export metadata • Consumers parse said metadata • Tailor the API to the consumer • because each language has its own weirdness beauty

  16. Windows Store App Language Support (CLR, WinJS, CRT) Language Projection Windows Metadata & Namespace UI Pickers Controls Media XAML Storage Network … Windows Runtime Core Windows Core

  17. Let’s dig a bit deeper

  18. Projecting an array

  19. IInspectable IUnknown Array

  20. IInspectable IUnknown IVector<T> Array IVectorView<T> IObservableVector<T>

  21. STL-style Projection C++ App IInspectable IUnknown IVector<T> C#/VB App IEnumerable (T) style Projection CLR Array IVectorView<T> IObservableVector<T> HTML App Chakra JavaScript Projection

  22. That sounds hard

  23. pffffftt

  24. demo Write a Windows Runtime Component How awesome are you? Huh?

  25. A better example

  26. Cartoonify • Take in a image, output a cartoon • C++ for the image processing • Javascript for the UI

  27. demo Cartoonify all the things It needs a better name, seriously…

  28. Let’s go deeper

  29. Windows Store App Language Support (CLR, WinJS, CRT) Language Projection Web Host (HTML, CSS, JavaScript)) Windows Metadata & Namespace UI Pickers Controls Media XAML Storage Network … Windows Runtime Core Runtime Broker Windows Core

  30. Your app runs in a sandbox

  31. What?

  32. Process Monitor WWAHost.exe

  33. Process Monitor WWAHost.exe

  34. Process Monitor MyApp.exe

  35. Process Monitor MyApp.exe

  36. Process Monitor MyApp.exe

  37. Process Monitor

  38. How does it know?

  39. Package Manifest

  40. Package Manifests <Package> ... <Applications> <Application Id="App" Executable="Billboard.exe" EntryPoint="Billboard.App"> <VisualElementsDisplayName="Billboard" … > <DefaultTileShowName="allLogos" /> <SplashScreen Image="Assets\SplashScreen.png" /> </VisualElements> </Application> </Applications> ... </Package>

  41. Package Manifests <Package> ... <Applications> <Application Id="App" StartPage="default.html"> <Extension Category="windows.search" /> <Extension Category="windows.backgroundTasks" StartPage="js\app.js"> <BackgroundTasks> <Task Type="controlChannel" /> </BackgroundTasks> </Extension> </Extensions> </Application> </Applications> ... </Package>

  42. What about permissions?

  43. Runtime Broker

  44. Package Manifests <Package> ... <Capabilities> <Capability Name="internetClient" /> <DeviceCapability Name="location" /> </Capabilities> ... </Package>

  45. Recap

  46. Use what you want • Use C#, C++, Javascript for your logic • Use XAML or HTML for your UI • Low-level access to hardware and devices

  47. Related Content • Got Questions? • Community Lounge – Thursday/Friday • Speaker Lounge – Thursday 11am • Twitter - @shiftkey

  48. Track Resources • dev.windows.com • channel9.msdn.com/Events/BUILD/BUILD2011/ • github.com/shiftkey/auteched2012 • github.com/shiftkey/cartoonify

  49. fin

More Related