Download presentation
Presentation is loading. Please wait.
1
Microsoft Ignite 2016 7/6/2018 1:06 PM BRK2061 Architect your Windows apps to work together, moving away from monolithic apps Andy Wigley Senior SDE, Microsoft © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
The monolithic app This app does it all Impressive, isn’t it!
But just try changing it
4
Why build a family of co-operating apps?
Don’t reinvent the wheel There are apps out there that are amazing at what they do – extensibility helps you leverage them. Better Together Extensibility makes it easy to plug in existing services that your users rely on every day Adding functionality Have you ever used an app and thought of a great feature? Extensibility lets you make it happen. Reduce development and maintenance costs Decomposing complex systems into discrete components with clear functionality, and with simple interfaces to other apps can lead to reduced software development and maintenance costs.
5
Why build a family of co-operating apps?
Don’t reinvent the wheel There are apps out there that are amazing at what they do – extensibility helps you leverage them. Better Together Extensibility makes it easy to plug in existing services that your users rely on every day Adding functionality Have you ever used an app and thought of a great feature? Extensibility lets you make it happen. Reduce development and maintenance costs Decomposing complex systems into discrete components with clear functionality, and with simple interfaces to other apps can lead to reduced software development and maintenance costs.
6
Why build a family of co-operating apps?
Don’t reinvent the wheel There are apps out there that are amazing at what they do – extensibility helps you leverage them. Better Together Extensibility makes it easy to plug in existing services that your users rely on every day Adding functionality Have you ever used an app and thought of a great feature? Extensibility lets you make it happen. Reduce development and maintenance costs Decomposing complex systems into discrete components with clear functionality, and with simple interfaces to other apps can lead to reduced software development and maintenance costs.
7
Why build a family of co-operating apps?
Don’t reinvent the wheel There are apps out there that are amazing at what they do – extensibility helps you leverage them. Better Together Extensibility makes it easy to plug in existing services that your users rely on every day Adding functionality Have you ever used an app and thought of a great feature? Extensibility lets you make it happen. Reduce development and maintenance costs Decomposing complex systems into discrete components with clear functionality, and with simple interfaces to other apps can lead to reduced software development and maintenance costs.
8
Project Rome: App Handover and Services across devices
7/6/2018 1:06 PM App Handover App Services App Extensions Project Rome: App Handover and Services across devices App Extensions App Extensions App Handover Your App App Services App Handover App Services © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9
Launch another app, wait for results
App Handover Filter Filter Filter Launch another app, wait for results
10
App Services App Service Edit Filter Filter Filter Inline Task Handoff
11
Manage and Bring in Content
App Extensions Edit Filter Filter Manage and Bring in Content
12
Project Rome Remote App Launch Inline Remote Task Handoff Edit Edit
Filter Filter Remote App Launch Remote App Service Edit Filter Filter Filter Inline Remote Task Handoff
13
Example: Extensible Photo-Editing App
What are we going to do? Leverage other apps to perform image manipulation
14
App Handover with Protocol Associations
15
LaunchUriForResultAsync Demo
Adding Cropping to our Photo-Editing Application Filter Filter Filter
16
Discovery Verify protocol is supported on device
var queryUri = new Uri("appb-forresults:"); string packageFamilyName = "sample.uwpappb"; await Launcher.QueryUriSupportAsync(queryUri, LaunchQuerySupportType.Uri, packageFamilyName);
17
Usage UWP App A UWP App B var options = new LauncherOptions();
options.TargetApplicationPackageFamilyName = "sample.uwpappb"; await Launcher.LaunchUriForResultsAsync(new Uri("appb-forresults:?works=today"), options); UWP App A UWP App B var resultData = new ValueSet(); resultData.Add("Result", "Value"); operation.ProtocolForResultsOperation.ReportCompleted(resultData);
18
Why LaunchUriForResultsAsync?
Lightweight App Handover Reuse instead of Rebuild Cross-Promotion
19
App Services
20
App Services Demo Adding Grayscale to our Photo-Editing App inline
Filter Filter Filter
21
App Services Store apps can provide services to other Store apps
7/6/2018 1:06 PM App Services Store apps can provide services to other Store apps App B with App Service var conn = new AppServiceConnection(); conn.AppServiceName = "FooAppService"; conn.PackageFamilyName = "12Me.MyApp"; var status = await conn.OpenAsync(); Client App A App Service Connection App Service Background Task Client App C var message = new ValueSet(); message.Add("MyKey", "MyValue"); var r = await conn.SendMessageAsync(message); conn.Dispose(); App Service Connection App Service Background Task © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Discover Query For Support
var services = await AppServiceCatalog. FindAppServiceProvidersAsync("com.my.appservice");
23
Create Add a background service Declare App Service In Manifest
<uap:Extension Category="windows.appService" EntryPoint="BackgroundService.Service"> <uap:AppService Name="com.my.appservice"/> </uap:Extension> Add a background service //Regular Service Background task public sealed class Service : IBackgroundTask
24
Usage Connecting to an App Service Messaging via App Services
using (var connection = new AppServiceConnection()) { connection.AppServiceName = "com.my.appservice"; connection.PackageFamilyName = "my.app"; AppServiceConnectionStatus status = await connection.OpenAsync(); … } Messaging via App Services var request = new ValueSet(); request.Add("key", "value"); var response = await connection.SendMessageAsync(request);
25
Why App Services? Background Execution App to App Messaging
Stay within the context of the invoking app App to App Messaging Available across devices - Project Rome
26
App Service Lifetime Service is activated on-demand, and persist for the length of the connection Client may terminate service by disposing its AppServiceConnection If the invoking app is suspended, app services sponsored by the app will be terminated Insufficient resources may cause launch failure or service termination
27
App Extensions
28
Host Package.appxmanifest
<uap3:Extension Category="windows.appExtensionHost"> <uap3:AppExtensionHost> <uap3:Name>PhotoExt</uap3:Name> </uap3:AppExtensionHost> </uap3:Extension>
29
Extension Package.appxmanifest
<uap3:Extension Category="windows.appExtension"> <uap3:AppExtension Name="PhotoExt" Id="base" PublicFolder="Public" DisplayName="Invert" Description="Invert Image"> </uap3:AppExtension> </uap3:Extension>
30
App Extensions Demo CODE WALKTHROUGH Edit Filter Filter
31
AppExtensions API Summary
using Windows.ApplicationModel.AppExtensions; Open Extension Catalog var catalog = AppExtensionCatalog.Open("PhotoExt"); Find Extensions IReadOnlyList<AppExtension> extensions = await catalog.FindAllAsync(); Get Notified catalog.PackageInstalled += Catalog_PackageInstalled; Load Content StorageFolder folder = await ext.GetPublicFolderAsync();
32
App Extensions Host and Extension both opt-in via declaration
Host provides the dev platform App Extensions are apps!
33
Project Rome: App Handover and App Services
across devices
34
Project Rome Architecture
7/6/2018 1:06 PM Project Rome Architecture Register and Discover Connected Devices Cloud Register with Microsoft Account Register with Microsoft Account Discover proximal devices © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
35
Remember LaunchUriAsync?
Microsoft Build 2016 7/6/2018 1:06 PM Remember LaunchUriAsync? LaunchUri – Custom schemes (LaunchUriAsync) Northwind Trader Contoso Launcher.LaunchUriAsync(new Uri("myapp:?Oh=yes")); © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
36
Remember LaunchUriAsync?
Microsoft Build 2016 7/6/2018 1:06 PM Remember LaunchUriAsync? Northwind Northwind Trader LaunchUri – Custom schemes (LaunchUriAsync) Contoso var connectionRequest = new RemoteSystemConnectionRequest(remoteSystem); var uri = new Uri("myapp:?Oh=yes") var options = new RemoteLauncherOptions() { FallbackUri = new Uri(" }; await RemoteLauncher.LaunchUriAsync( connectionRequest, uri, options); © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
37
7/6/2018 1:06 PM Remember App Services? Store apps can provide services to other Store apps App B with App Service On remote device var conn = new AppServiceConnection(); conn.AppServiceName = "FooAppService"; conn.PackageFamilyName = "12Me.MyApp"; Client App A App Service Connection App Service Background Task var status = await conn.OpenAsync(); var remoteReq = new RemoteSystemConnectionRequest(remoteSys); var status = await conn.OpenRemoteAsync(remoteReq); Client App C var message = new ValueSet(); message.Add("MyKey", "MyValue"); var r = await conn.SendMessageAsync(message); conn.Dispose(); App Service Connection App Service Background Task © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
38
Remote App Service Protips
7/6/2018 1:06 PM Remote App Service Protips Determine if you are invoked remotely isRemote bool on target AppServiceConnection Manifest <uap:Extension Category="windows.appService" IsRemote="true" EntryPoint="AudioPlayer.AudioPlayerTask"> Message size Maximum message size is 64kb © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
39
Demo: Remote Discovery and Remote App Services
40
Extend the experience Launch and Message 7/6/2018 1:06 PM swipe
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
41
Augment the experience
7/6/2018 1:06 PM Augment the experience Contoso Vote for Brandon Vote! Companion Experiences © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
42
Enrich the experience Remote Control 7/6/2018 1:06 PM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
43
App to App Extensibility
Use Protocol Associations for lightweight App Handover and reuse rather than rebuild Use App Services for background message passing and make apps work better together Use App Extensions, which offer great discovery and management, to connect and share content Use Protocol Associations and App Services to connect and share content across devices
44
App to App Extensibility
Use all these techniques together to build an ecosystem
45
Windows 10 developer breakout sessions
Thursday Code Title Time Room Speaker(s) BRK2061 Architect your Windows apps to work together, moving away from monolithic apps 9:00 AM B302 - B303 Andy Wigley BRK2063 Secure Windows apps and Microsoft Edge websites with Windows Hello 10:45 AM A302 Anoosh Saboori BRK3238 Dive deeper into Windows Store for Business 12:30 PM Thomas Murphy Ballroom 1 Jan Kalis, Matt Kotler BRK2064 Keep work and personal data separate and secure using Windows Information Protection in Windows apps 2:15 PM A313 - A314 Derek Adam BRK2062 Optimize Windows apps across screens with Continuum for phone 4:00 PM A402 - A403 Rouella Mendonca
46
Windows 10 developer breakout sessions
Friday Code Title Time Room Speaker(s) BRK2060 Use Windows Pen and Ink to build more engaging enterprise apps 9:00 AM B308 - B309 Jerry Nixon BRK2065 Build and distribute enterprise apps with the Windows Store for Business 12:30 PM A315 - A316 Jan Kalis, Kyle Marsh, John Vintzel
47
Windows 10 theater sessions (Theater 5)
Code Title Time Speaker THR1013 Simplify app discovery and distribution with Windows Store for Business 9/26 1:00 PM Jan Kalis THR2115 Reach customers on Windows 10 with your existing solutions 9/26 12:30 PM 9/27 12:05 PM 9/29 10:20 AM Ethel Garcia Simon Matachana THR2114 Bring your iOS apps to Windows 9/27 2:10 PM Zakir Tyebjee THR2112 Build great app experiences with the Universal Windows Platform on Windows 10 9/27 2:50 PM 9/28 10:20 AM 9/29 2:10 PM Andy Wigley, Michael Crump THR1016 Manage internal LOB apps with Windows Store for Business 9/29 11:05 AM
48
Let’s chat Come talk to us in the Microsoft Showcase area
I’ll be there right after this session Continue the conversation and get resources at
49
Please evaluate this session
7/6/2018 1:06 PM Please evaluate this session Your feedback is important to us! From your PC or Tablet visit MyIgnite at From your phone download and use the Ignite Mobile App by scanning the QR code above or visiting © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
50
7/6/2018 1:06 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.