10. Contracts
• Web of Applications
–Sharing Contract
–Picker Contract
–Search Contract
–More!
11. What is Windows Runtime ?
• OO API for writing Metro style applications
• Written in native C++
• Tuned for performance
• Supports type reflection through metadata
• Supports many languages though
projections
• Part of Windows, build each time OS is
compiled
12. Language Support
• 29 apps in total
• In Dev Preview: C# XAML
5 apps
– 75% JS, C++
DirectX 2
– 17% C#, apps
– 8% C++ JS HTML
22 apps
18. .NET Metro Profile
• Subset of Client Profile
• No Remoting
• No System.Data
• No System.Web
• No server side WCF
• No private reflection, no Emit
• Some API only in async version
26. Custom WinRT objects
• Share objects across all languages
• Languages
– C++/CX : speed
– C#/VB : Ease of use
• Restrictions apply
– Sealed classes
– Exposed through an interface
– Public API can only expose WinRT objects
30. What is not supported ?
• No { DynamicResource }
• Poor WritableBitmap
• Poor data binding
• No default implementation for
IObservableVector<T>
• 2 manifestations of INPC
• No overlapping windows (no
MessageBox)
31. Common pitfals
• Code behind namespaces
• XAML namespaces
• DP
Custom controls and styles
•xmlns:views=”using:My.Custom.Views”
• ObservableCollection
32. Getting Windows 8 Dev Prev
• Windows 8 Developer Preview with
developer tools English, 64-bit (x64)
– 4.8 GB – DVD dual layer or pendrive 8GB
– VS 2011 Express
– Blend 5 Preview (Works only with HTML5/CSS)
• Windows 8 Developer Preview English, 64-bit
• Windows 8 Developer Preview English, 32-bit
• Visual Studio 2011 Ultimate Dev Prev
33. Reference
• MSDN Metro Guide:
– http://msdn.microsoft.com/en-us/windows/apps
• Building Windows 8 Blog:
– http://blogs.msdn.com/b/b8/
• BUILD Videos:
– http://www.buildwindows.com/
• WinRT Transitions
– http://bit.ly/vZU4fd
• WinRT vs SL5 comparison
– http://bit.ly/spEtNE
Typography:Type is beautiful and can be functionalType’s placement builds visual hierarchyGenerally achieved with Segoe fontMotion:Consistent set of motions/animations brings the UI to lifeImprove perceived performanceContent:Your content is always the main focusBetter usage of space on both small and larger form factorsHonestyTouch firstHigh resolutionAuthentically DigitalStationary to ubiquitousDesktop PC:in one place with a clear start and finish timeSmartphone/tablet: anytime/anywhere (cloud),context-aware (aided by sensors like accelerometers, gyroscopes, and geolocators)Formal to casualDesktop PC:a formal start and finish time marked by booting up and shutting downSmartphone/tablet: instant-on/always-on (fast boot-up times),fills in-between moments like standing in line or watching TVArms-length to personalDesktop PC:literally an arms-length activitySmartphone/tablet: portable form factors,consumers keep close to their bodyAbstracted to physicalDesktop PC:mouse/keyboard paradigm relies on an abstracted interaction with contentSmartphone/tablet: touchscreensenable direct physical manipulation of contentCloud Integration-> Tight integration with Azure for seamless computing between devices-> Every app allocated small space in the cloud for settings-> Authentication through Cloud/Live
OO API for writing Metro style applicationsWritten in native C++Tuned for performance, every call is a v-table dispatch, every call which might take longer than 50ms is asyncModern unified type systemSupports type reflection through metadataSupports many languages though projectionsPart of Windows, build each time OS is compiledDesktop is fully supported, SL, WPF, everything is thereWinRT not for drivers developersTwo Tech stacks in Windows 8 – Desktop & MetroDesktop-> Same as for Windows 7 but with .NET 4.5 (async constructs)-> Implies that all existing code will work as expected, and that you can take advantage of changes in .NET 4.5 (Developer Preview available now)Metro Overview-> Scrapped: GDI, Win32, ATL, WPF, Silverlight in Metro-> Reason: All content must be GPU-accelerated, Impossible to maintain equal API for each vertical-> Equal footing for each tech – WinRTNew possibilities-> While impossible to reuse old techs, idea is to facilitate migration of skills to WinRT and allow interop between the languages-> WPF/SL skills migrate to XAML/C#/C++-> Web skills (HTML5/JS/CSS) allow for easy creation of Web applications-> Creation of Windows MD libraries – possible to call C++/C# libraries from Javascript-> Renewed focus on C++ development – new tooling & APIs-> Blend 5 to support HTML5 & XAML (C++,C#,VB)
Why C++ - performance!!!
Object oriented API for writing Metro style applicationsWritten in native C++Tuned for performance, every call is a v-table dispatch, every call which might take longer than 50ms is asyncModern unified type systemSupports type reflection through metadataSupports many languages though projectionsPart of Windows, build each time OS is compiledDesktop is fully supported, SL, WPF, everything is thereWinRT not for drivers developersTwo Tech stacks in Windows 8 – Desktop & MetroDesktop-> Same as for Windows 7 but with .NET 4.5 (async constructs)-> Implies that all existing code will work as expected, and that you can take advantage of changes in .NET 4.5 (Developer Preview available now)Metro Overview-> Scrapped: GDI, Win32, ATL, WPF, Silverlight in Metro-> Reason: All content must be GPU-accelerated, Impossible to maintain equal API for each vertical-> Equal footing for each tech – WinRTNew possibilities-> While impossible to reuse old techs, idea is to facilitate migration of skills to WinRT and allow interop between the languages-> WPF/SL skills migrate to XAML/C#/C++-> Web skills (HTML5/JS/CSS) allow for easy creation of Web applications-> Creation of Windows MD libraries – possible to call C++/C# libraries from Javascript-> Renewed focus on C++ development – new tooling & APIs-> Blend 5 to support HTML5 & XAML (C++,C#,VB)
No, it is not!
WebView – rendering HTML contentMedia Element/Player – Proper DX acceleration – no copying frames to DWMGridView – Clean organization of content w/ Semantic zoomFlipView – scrollable contentApplicationBar – top/bottom application bar
Each transitions is an animation that the WinRT framework plays in response to certain ‘events’.EntranceThemeTransition – item gracefuly slides in