APLIKACIJE KOJE SU IZVAN SEBE Domagoj Pavlešić, dizzy.hr.

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Staying in Sync with Cloud 2 Device Messaging. About Me Chris Risner Twitter: chrisrisner.
Page 1 Ricardo Villalobos Windows Azure Architect Evangelist Microsoft Corporation Designing, Building, and Deploying Windows Azure applications.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
1 Web Services Visual C# 2008 Step by Step Chapter 30.
MSDN How do I add Voice Commands to my application Find Install Voice Command Sets Search Search for {dictatedSearchTerms} Find Find.
CHAPTER 6 Loop Structures.
JavaScript & jQuery the missing manual Chapter 11
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
| | Tel: | | Computer Training & Personal Development Microsoft Office PowerPoint 2007 Expert.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Windows Phone 8 uses Microsoft Push Notifications Windows 8/8.1 uses Windows Notification Service Windows Phone 8.1 uses Windows Notification.
| | Tel: | | Computer Training & Personal Development Outlook Express Complete.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
Windows Phone 8 Tips & Tricks for Developers Sascha Corti, Microsoft Switzerland Technical Evangelist | techpreacher.corti.com.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
CSCI 6962: Server-side Design and Programming Web Services.
App to App Communication Developer’s Guide to Windows 10
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Local, scheduled, periodic and push updates.
Web hosting in app Creating a Windows Store app with web assets.
Basic State Plate App Logo Short Name Plate App Logo Short Name Semi-Live State Plate App Logo Short Name Badge Plate App Logo Short Name Badge Live.
XML Registries Source: Java TM API for XML Registries Specification.
Advanced Windows 8 Apps Using JavaScript Jump Start Exam Prep M5: Data, Files, and Encryption Michael Palermo Microsoft Technical Evangelist Jeremy.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
C# GUI - Basics. Objectives.NET supports two types: WinForms, traditional, desktop GUI apps. WebForms – newer, for Web apps. Visual Studio.NET supports.
Practical Session 12 Reactor Pattern. Disadvantages of Thread per Client It's wasteful – Creating a new Thread is relatively expensive. – Each thread.

Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Offline Web Apps - an offline web application is a list of URLs for HTML, CSS, JavaScript, images, or any other kind of resource. Most browsers have offline.
Debugging Ensemble Productions CAMTA Meeting 11 th November 2010 John Murray.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.
Andrew Coates Advanced Windows 10 development with the Office 365 APIs DEV33 5.
Web Technologies Lecture 11 Implementing RESTful services.
Agenda UCMA 3.0 Highlights Management PowerShell cmdlets to create and manage UCMA trusted applications and endpoints. Autoprovisioning Application.
Function as a Service An Ad Hoc Approach to Cloud Computing By Keith Downie.
Today’s Applications Web API Browser Native app Web API Web API
EDISCOVERY AND ARCHIVING IN OFFICE 365 Scott Schnoll, Microsoft Corporation.
Cross-platform s Apache Cordovom i Visual Studijom Petar Kovačević, Axilis d.o.o.
Sander Berkouwer Microsoft MVP Directory Services Microsoft Netherlands Virtual Technical Evangelist Blogger on DirTeam.com ServerCore.Net.
Internet of Things Windows IoT for small devices CATALIN GHEORGHIU I Computer Solutions.
ASP.NET WEB API Napredne tehnike i mogućnosti RENATO JOVIĆ, Tagit Adriatica d.o.o.
Sockets A popular API for client-server interaction.
Data in Windows 10 UWP Andy Wigley XML, JSON, SQLite or EF Core ?
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.
AZURE LOGIC APPS SERVICE BRANKO VLAISAVLJEVIĆ, Ekobit.
Microsoft Cortana for App Developers
Eclipse.
Windows Calls Applications (windows.applicationmodel.calls)
Windows Developer Day Fall Creators Update Chris Cortes
Writing simple Java Web Services using Eclipse
Data Virtualization Tutorial… OAuth Example using Google Sheets
Microsoft Ignite /6/2018 1:06 PM BRK2061
Debugging with gdb gdb is the GNU debugger on our CS machines.
Project Rome: Cross device interactions
Microsoft Build /9/2018 8:05 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
DUCKS – Distributed User-mode Chirp-Knowledgeable Server
App-to-app communication
11/19/ | App Model & Storage © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
CIS16 Application Development Programming with Visual Basic
12/2/ :23 PM APP-410T Real time communication: keep your Metro style app connected whether it is running or suspended Raghu Gatta Principal Development.
TechEd /9/2018 4:17 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tap Play Store in your mobile.wait for next screen.
6. WinForms 2003 C# GUI - Basics.
4/9/ | Contracts © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
CodePainter Revolution Trainer Course
Lecture 12: The Fetch Api and AJAx
Presentation transcript:

APLIKACIJE KOJE SU IZVAN SEBE Domagoj Pavlešić, dizzy.hr

App to App in Windows 8.1

Launcher.LaunchUriAsync(new Uri("sampleapp:?ID=aea6")); Launcher.LaunchFileAsync(file); URI/Protocol Activation User/OS chooses target

Share Contract DataTransferManager.ShowShareUI(); User chooses target

App to App in Windows 10 UAP

Invoke a specific app URI Activation++ var options = new LauncherOptions(); options.TargetApplicationPackageFamilyName = "24919.InstapaperIt"; var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com"); await Launcher.LaunchUriAsync(launchUri, options);

Send Files URI Activation++ var options = new LauncherOptions(); options.TargetApplicationPackageFamilyName = "24919.InstapaperIt"; var token = SharedStorageAccessManager.AddFile (gpxFile); ValueSet inputData = new ValueSet(); inputData.Add("Token", token); var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com"); await Launcher.LaunchUriAsync(launchUri, options, inputData);

Discover if app already installed to handle a Uri Query URI Support var queryUri = new Uri("instapaper:"); await Launcher.QueryUriSupportAsync(queryUri, LaunchUriType.LaunchUri); ? var queryUri = new Uri("instapaper:"); string packageFamilyName = "24919.InstapaperIt"; await Launcher.QueryUriSupportAsync(queryUri, LaunchUriType.LaunchUriForResults, packageFamilyName);

Launching the app Launch for Results var options = new LauncherOptions(); options.TargetApplicationPackageFamilyName = "24919.Instap"; var launchUri = new Uri("instapaper:?AddUrl=http%3A%2F%2Fbing.com"); await Launcher.LaunchUriForResultsAsync(launchUri, options, data); var resultData = new ValueSet(); resultData.Add("Result", value); operation.ProtocolForResultsOperation.ReportCompleted(resultData); App1App2

Apps from the same publisher share files and settings

A subfolder is required. Edit app manifest to add. Folders are automatically provisioned. Publisher’s shared storage folder

Access folder named “fonts” Windows.Storage.ApplicationData.Current.GetPublisherCacheFolder("fonts"); Clear shared storage Windows.Storage.ApplicationData.Current.ClearPublisherCacheFolderAsync(); Shared storage folder interaction

App Services Client App A Client App B Background Task App with App Service

Scenario: Bar Code Scanning Bar Code decoding App Service Image bytes in ValueSet or FileToken Decoded data

Scenario: Enterprise suite of apps App Service Maintains Inventory cache Client App A Client App B Interact with cloud services App Service Proximity Reading Services

DEMO

AppServiceConnection connection = new AppServiceConnection(); connection.AppServiceName = "microsoftDX-appservicesdemo"; connection.PackageFamilyName = "24919ArunjeetSingh.InstapaperIt"; AppServiceConnectionStatus connectionStatus = await connection.OpenAsync(); if (connectionStatus == AppServiceConnectionStatus.Success) { //Send data to the service var message = new ValueSet(); message.Add("Command", "CalcSum"); message.Add("Value1", Int32.Parse(Value1.Text)); message.Add("Value2", Int32.Parse(Value2.Text)); //Send message and wait for response AppServiceResponse response = await connection.SendMessageAsync(message); if (response.Status == AppServiceResponseStatus.Success) { int sum = (int)response.Message["Result"]; new MessageDialog("Result=" + sum).ShowAsync(); } } else { //Drive the user to store to install the app that provides the app service } App Services – Client

namespace AppServicesDemoTask { public sealed class AppServiceTask : IBackgroundTask { private static BackgroundTaskDeferral _serviceDeferral; public void Run(IBackgroundTaskInstance taskInstance) { // Associate a cancellation handler with the background task. taskInstance.Canceled += TaskInstance_Canceled; // Get the deferral object from the task instance _serviceDeferral = taskInstance.GetDeferral(); var appService = taskInstance.TriggerDetails as AppServiceTriggerDetails; if (appService.Name == "microsoftDX-appservicesdemo") { //Maybe ValidateCaller(appService.CallerPackageFamilyName) ?? appService.AppServiceConnection.RequestReceived += RequestReceived; } }... App Services – Service (1/2)

private async void RequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args) { var message = args.Request.Message; // This service uses a Command keyed entry for the client to invoke services from the App Service string command = message["Command"] as string; switch (command) { case "DoIt": { var messageDeferral = args.GetDeferral(); int value1 = (int)message["Value1"];... Do some processing //Set a result to return to the caller var returnMessage = new ValueSet(); returnMessage.Add("Result", result); var responseStatus = await args.Request.SendResponseAsync(returnMessage); messageDeferral.Complete(); break; } case "Quit": { //Service was asked to quit. Complete service deferral so platform can terminate _serviceDeferral.Complete(); break; } } } App Services – Service (2/2)

Declaring App Service

Two-way Communication Client and server can keep a two-way chatty communication channel open Client can attach a RequestReceived event handler to its own AppServiceConnection instance Both client and server can send and receive messages AppServiceConnectionStatus connectionStatus = await connection.OpenAsync(); if (connectionStatus == AppServiceConnectionStatus.Success) { connection.RequestReceived += OnRequestReceived; }

Debugging Tips Getting the PackageFamilyName for the App Service Debugging your App Service

Getting the Service PackageFamilyName Later on, ‘Store – Associate App with the Store’ sets the correct PackageFamilyName In Tech Preview, Store not open yet for UAP Call Package.Current.Id.FamilyName to return PFN to use in debugging

Debugging App Services 1.Set breakpoints in app service code 2.Check ‘Do not launch but debug my code when it starts’ in project properties 3.Launch app service foreground app in debugger – nothing happens! 4.Run client app to connect to app service 5.Debugger attaches and breaks on your breakpoint

Activated on-demand Terminted by app: – By disposing connection – By instruction service to shutdown – When client app is suspended Insufficient resources –AppServiceConnectionStatus.ResourcesNotAvailable –AppServiceResponseStatus.ResourceLimitsExceeded App Service Lifetime

App Services are designed to be flexible and light-weight and are modelled on web REST Web services –Simple Request-Response message API –Data packaged as string-keyed ValueSets –Easy to use with multiple different payloads When you publish an App Service, you are defining a communications endpoint –An App Service endpoint provides the Caller a way to send data to the Callee –An App Service endpoint also provides the Caller a way to request return values from the Callee and for the Callee to respond with these return values. What Protocol?

Build your own caller validation mechanisms on top of app services – Simplest is for service provider to whitelist callers based on their PackageFamilyName – PackageFamilyName of caller is passed with every request Possible to build more complicated caller validation mechanisms on top of ValueSets once a connection has been established – Whitelist could be followed by explicit X.509 certificate exchange Access restristion

No versioning REST API versioning model Breaking change demands new endpoint Versioning

URL/Protocol activation –specific app –send files –query Uri support –launch for results Shared Storage App Services App2app recap

Nagrađujemo vas sa 125 WinCoin bodova što ste posjetili predavanje. Osvojite dodatnih 150 WinCoin bodova ukoliko popunite službeni upitnik. HVALA!

domagoj.eu