Presentation is loading. Please wait.

Presentation is loading. Please wait.

Metro Apps Start, Suspend… Apps do not get notified when they are getting terminated.

Similar presentations


Presentation on theme: "Metro Apps Start, Suspend… Apps do not get notified when they are getting terminated."— Presentation transcript:

1

2 Metro Apps Start, Suspend…

3

4

5 Apps do not get notified when they are getting terminated

6 User Launche s App Splash screen

7

8 launch shareTarget kind search

9

10

11

12 Metro Style Apps connected

13

14 Network TriggerSystem TriggerTime Trigger Background Task Infrastructure VoIPIMMail AppOS

15 Longer Battery Life Always Reachable Apps

16 Recap

17 WinRT APIs for Metro style apps Fundamentals Communications & Data Media Devices User Interface

18 Fundamentals Communications & Data Media Devices User Interface

19 HTTP APIs Socket APIs Background APIs Data APIs Information APIs Web services

20

21 What is the Windows Runtime?

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

23 Windows Metadata & Namespace Language Projection Windows Core Windows Runtime Core XAMLStorage…Network UIPickersMediaControls Metro style app Runtime Broker Language Support (CLR, WinJS, CRT) Web Host (HTML, CSS, JavaScript))

24

25

26

27 Strings HSTRING Avoids copying in multiple languages Basic Types INT32, UINT64 * Pointers allowed in limited cases Enumerations enum AsyncStatus Flag or non-flag styles Structures struct Rect; Can contain strings, but not interfaces Simple Arrays INT32 [] For very basic collections Interfaces IInspectable Methods are defined in interfaces Generic Interfaces IVector Type-generic interface Runtime Class Windows.Storage. StorageFile Binds interfaces to make a class

28 Shell32.dll Object Activation Store (Registry)Windows Metadata (Disk)

29 Object Windows Metadata C++ App Projectio n CLR C#/VB App Projectio n HTML App Chakra Projectio n

30

31 Object Windows Metadata v8 App Projection Object Windows Metadata v9 App Projection

32 CollectionsIVector, IVectorView, IMap Iterators, Collections and events cross-language Delegatesdelegate AsyncActionCompletedHandler Encapsulate the context to call back to an object EventsIApplicationLayout::LayoutChang ed Lists of callback recipients PropertySetinterface IPropertySetCollection of items with varying types Async Interface ReceivePropertiesOperationA way to get a delayed result without blocking ContractsWindows.ApplicationModel. DataTransferManager Connect Apps to Windows Extension Points

33 Array Associative Collection C++ App STL-style Projection CLR C#/VB App IEnumerable (T) style Projection HTML App Chakra JavaScript Projection

34

35 App Windows UI Object Windows Object App Code Windows Object

36

37 RuntimeBroker.exe Windows Runtime Object App Projection Proxy

38 Inside WinRT

39

40 Launch Contract Extension 1 Extension 2 Runtime Class A Class Catalog Extension Catalog Search Contract Extension 3 Runtime Class B Runtime Class C

41

42 Class Catalog Extension Catalog Deployment Engine

43

44 Class Catalog Extension Catalog Explorer.exe Activation System Query Investigate Activate

45 Class Catalog Explorer.exe Activation System Activate RPCSS DCOM Launch Application.exe

46 RPCSS Class Catalog main() {... } Run Register Query MTA

47 Application.exe App Code RPCSS Explorer.exe Activation System Instance Complete Activation Activate App Callback

48 Application.exe Application Code MTASTA #1 Application Code STA #2 Application Code Run Register Activate Run

49 WinRT APIs Foundations

50 Windows Runtime APIs 50 Available to all programming languages Requires a language neutral type system

51

52

53

54

55

56

57

58

59

60

61 .NET parallel programming

62

63 compresse d dataand encrypted

64

65

66 C++ and XAML

67

68

69

70 Using Windows Runtime from C#

71 C# and Visual Basic influenced the Windows Runtime

72

73

74

75

76

77

78

79 You can write your own Windows Runtime components in C# or Visual Basic

80 You should build a Windows Runtime component when you want your code to be used from JS, C++, C# and VB

81

82 Influenced by C# and VB Feels natural and familiar from C# and Visual Basic Build your own managed Windows Runtime components

83 Using Windows Runtime with C++

84

85

86 Key Bindings FeatureSummary 1. Data Types ref classReference type value classValue type interface classInterface propertyProperty with get/set eventDelegate property with add/remove/raise delegateType-safe function pointer genericType-safe generics 2. Allocation gcnewGarbage-collected allocation ref newReference-counted allocation 3. Pointer & Reference ^Strong pointer (hat or handle) %Strong reference BINDINGS TO FOREIGN TYPE SYSTEMS

87

88

89

90

91

92

93

94

95 HRESULTException E_OUTOFMEMORYOutOfMemoryException E_INVALIDARGInvalidArgumentException E_NOINTERFACEInvalidCastException E_POINTERNullReferenceException E_NOTIMPLNotImplementedException E_ACCESSDENIEDAccessDeniedException E_FAILFailureException E_BOUNDSOutOfBoundsException E_CHANGED_STATEChangedStateException REGDB_E_CLASSNOT REG ClassNotRegisteredExceptio n E_DISCONNECTEDDisconnectedException E_ABORTOperationCanceledExceptio n

96

97

98

99

100 Libraries

101

102

103

104 WinRT and JavaScript Basics

105 // C# namespace CustomWinRTComponent { public interface IMoreMath { } public sealed class MoreMath : IMoreMath { public static double Sinh(double x) { return Math.Sinh(x); } // JavaScript var MoreMath = CustomWinRTComponent.MoreMath; var y = MoreMath.sinh(0.7);

106 C++ and Metro Style Apps

107

108 try { int i = Add(41, 1); } catch (OverflowException^ e) { printf("Too big"); } inline int Add(int i, int j) { int res; HRESULT hr = __cli_Add(this, i, j, &res); if (hr != 0) { __throw_hr_as_exception(hr); // switch on hr & throw } return res; }; int Add(int i, int j) { if (i+j < i) { throw OverflowException(); } return i + j; } HRESULT __stdcall Add( Calculator* this, int i, int j, int* result ) HRESULT __stdcall __cli_Add(Calculator* calc, int i, int j, int* r) { try { *r = calc->Add(i, j); } catch (Exception^ e) { return e->HResult; } return S_OK; };

109 H^TH^T Its not okay to call me a carrot Calculator::ICalculator vtable &Calculator::QueryInterface &Calculator::AddRef &Calculator::Release &Calculator::GetIids &Calculator::GetRuntimeClassNam e &Calculator::GetTrustLevel &Calculator::Add ref class Calculator IStorageCell vtable * vfptr1 ICalculator vtable * vfptr2 int _storage int _refcount ICalculator^ calc

110 H^TH^T Its not okay to call me a carrot

111

112 Brings existing C++ code into Metro Style Apps

113 Windows Core OS Services JavaScript (Chakra) C C++ C# VB Metro style apps Communication & Data Application Model Devices & Printing WinRT APIs Graphics & Media XAML HTML / CSS HTML JavaScrip t C C++ C# VB Desktop apps Win32.NET / SL Internet Explorer System Services View Model Controller Core

114

115 Desktop appsMetro style apps Microsoft Libraries

116

117

118

119 .NET Kernel

120 Base Class Libraries The CLR JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder Profiling& Debugging APIs Entity Frame- work ASP. NET WCF And more! Work Flow Work Flow WPF Win Forms

121 Improvements to the Garbage Collector

122 Generation 1 Generation 0 New objects allocated as Generation 0 Accessible References Keep Objects Alive GC Compacts Referenced Objects Objects Promoted to Older Generation

123 Small Object HeapLarge Object Heap Client GCOne Server GCOne per logical processor Gen0/Gen1Gen2 Client GCAlways blockingCan be non-blocking Server GCAlways blockingCan be non-blocking

124

125

126 Enhancements to the CLR GC in.NET 4.5 LEARN MORE

127

128

129

130 C# Next

131 Managed Code Generics Language Integrated Query Dynamic + Language Parity C# VB 11.0 Windows Runtime + Asynchrony C# VB 7.0 C# VB 8.0 C# VB 9.0 C# VB 10.0

132

133

134 Class Field public Foo private string X X Compiler Source code Source File Source code.NET Assembly Meta-programmingRead-Eval-Print Loop Language Object Model DSL Embedding

135 Language Service Compiler APIs Compiler Pipeline Metadata Import

136 Quick Recap WinRT Visual C++ Component Extensions

137 Windows Core OS Services

138 HRESULTException E_OUTOFMEMORYOutOfMemoryException E_INVALIDARGInvalidArgumentException E_NOINTERFACEInvalidCastException E_POINTERNullReferenceException E_NOTIMPLNotImplementedException E_ACCESSDENIEDAccessDeniedException E_FAILFailureException E_BOUNDSOutOfBoundsException E_CHANGED_STATEChangedStateException REGDB_E_CLASSNOTREGClassNotRegisteredException E_DISCONNECTEDDisconnectedException E_ABORTOperationCanceledException

139 Collections

140 IIterable IIterator STL containers are the backing store

141

142

143 Async pattern

144

145 Win32

146 COM Core Kernel Accessibility Audio Direct2D Direct3D DirectComposition DirectManipulation DirectWrite File Systems Globalization Media Foundation Windows and Messages

147 C++ renaissance

148

149 Recap

150 PLAT-874T - Lap around the Windows Runtime APP-409T Fundamentals of Metro style apps: how and when your app will run TOOL-531T Using the Windows Runtime from C# and Visual Basic TOOL-532T Using the Windows Runtime from C++ TOOL-533T Using the Windows Runtime from JavaScript Related sessions C++ Language extension summaryC++ Language extension summary The Windows Runtime Windows Runtime Design Documentation & articles

151

152

153


Download ppt "Metro Apps Start, Suspend… Apps do not get notified when they are getting terminated."

Similar presentations


Ads by Google