1 / 34

Lap around the Windows Runtime

PLAT-874T. Lap around the Windows Runtime. Martyn Lovell Development Manager, Windows Runtime Microsoft Corporation. Agenda. What is the Windows Runtime? Goals & Architecture Inside a Windows Metro style app JavaScript, C++, C# What are What are Windows Runtime Objects ?

Mercy
Download Presentation

Lap around the Windows Runtime

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. PLAT-874T Lap around the Windows Runtime Martyn Lovell Development Manager, Windows Runtime Microsoft Corporation

  2. Agenda • What is the Windows Runtime? • Goals & Architecture • Inside a Windows Metro style app • JavaScript, C++, C# • What are What are Windows Runtime Objects? • Classes, Interfaces and Patterns

  3. What is the Windows Runtime?

  4. Metro style application APIs User Interface HTML5/CSS XAML DirectX Controls Data Binding SVG Tiles Input Accessibility Printing Devices Communications & Data Web Contracts Geolocation Portable Sensors NFC Local & Cloud Storage Streams Notifications Media SMS Background Transfer XML Networking Visual Effects Playback Capture PlayTo Fundamentals Application Services Threading/Timers Memory Management Authentication Cryptography Globalization

  5. Windows 8 Metro style Apps Desktop Apps 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

  6. The Windows Runtime is the solid, efficient foundation for building great Metro style apps

  7. Windows Runtime Architecture Metro style 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

  8. The Windows 8 Developer Experience • Easy to build a Metro style app • Dramatic improvements in developer experience • Freedom of choice – language, library, markup

  9. Major improvement to developer experience Great intellisense & tooling Responsive and Fluid Async APIs where they are needed App-Centric Platform Well managed app-to-app contracts Platform based Versioning Apps keep running on future Windows versions DesignPrinciples

  10. Inside a Windows Metro style app

  11. demo Creating basic Metro style app HTML/JavaScript

  12. Windows Runtime Architecture Metro style 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

  13. WindowsMetadata • Concise, complete description of the Windows Runtime • Generated natively from C++ or C#/VB Compiler • Efficient binary format derived CLI Metadata • Same structures, different meanings • Rich enough to allow multi-language projection generation • Full intellisense on statically known information

  14. The Windows Namespace • Windows.* Runtime objects are in a simple, unified, hierarchical namespace • Great intellisense and browsing in Visual Studio • One Clear type for each function • Catalog is extensible but private • Your apps can add objects (in C++/C#) • Objects can be seen from JavaScript

  15. Windows Runtime Basic Types

  16. demo Creating basic Metro style app C++ & C#

  17. Windows Runtime Architecture Metro style 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

  18. What is a Windows Runtime Object? Shell32.dll IInspectable IUnknown IStorageItemInformation Object IStorageItem FileInformation Runtime Class IStorageFile Interfaces Windows Metadata (Disk) Activation Store (Registry)

  19. Projections C++ App Projection IInspectable IUnknown Object C#/VB App CLR Projection HTML App Chakra Projection Windows Metadata

  20. Object Creation

  21. Versioning IInspectable IInspectable IUnknown IUnknown Future Windows Windows 8 Object Object Windows Metadata v8 App Windows Metadata v9 App Projection Projection

  22. demo How patterns project Collections && Async

  23. Windows Runtime Architecture Metro style 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

  24. Windows Runtime Patterns

  25. Collections IInspectable C++ App STL-style Projection IUnknown IVector<T> Array IVectorView<T> C#/VB App IEnumerable (T) style Projection CLR IObservableVector<T> IInspectable HTML App JavaScript Projection Chakra IUnknown IMap<T> Associative Collection IMapView<T> IObservableMap<T>

  26. Asynchronous Objects • Basic requirement for Metro style apps • Always responsive, ready • “Long running” APIs must be delivered as async • Simpler to allow apps to make synchronous calls • But then bad apps can overwhelm quality of system • Instead, build async into API shape • And have language projections integrate it deeply

  27. Threading App Threadpool Main UI Thread Windows UI Object Windows Object Windows Object App Code App Code App Code

  28. Three main types of object Thread bound – works only on the thread where it was created – most UI Thread flexible – works on any thread, uses locking if needed to control simultaneous access Brokered – out of process UI runs in single threaded environment that is not reentrant (“ Application STA”) Callbacks can only enter if they are related to an outgoing call Most non-UI runs in any thread WindowsRuntime Threading

  29. Brokered Objects RuntimeBroker.exe App Proxy Projection IInspectable IUnknown Windows Runtime Object

  30. Summary • The Windows Runtime is the solid, efficient foundation for the new Windows 8 developer platform • Build Metro style apps easily with the Windows Runtime • Windows available in your choice of language and environment • One Windows API, Natural and Familiar everywhere

  31. Further reading and documentation • Other sessions with more drilldown • Windows Runtime internals: understanding "Hello World" (PLAT-875T) • Async everywhere: creating responsive APIs & apps (PLAT-203T) • Using the Windows Runtime from C++ (TOOL-532T) • Using the Windows Runtime from C# and Visual Basic (TOOL-531T) • Using the Windows Runtime from JavaScript (TOOL-533T) • Q&A at //build –WinRT folks at the Apps booth • I and other WinRT folks will be there today from 3-5, plus more. • Q&A online – http://forums.dev.windows.com

  32. thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback

  33. Great use of the template= a few tiny tweaks, but it looks very nice. Good luck in rehearsals today! -hannaha © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related