Universal Windows Platform One codebase for Mobile, Desktop, IoT, Xbox, HoloLens, etc. Gergely

Slides:



Advertisements
Similar presentations
Windows 8.1 SDK Windows Phone 8.1 SDK Diff
Advertisements

Mobile Holographic Surface Hub XboxIoT Desktop.
DesktopMobile Xbox static class ApiInformation { Boolean IsTypePresent( [in] HSTRING typeName); Boolean IsMethodPresent( [in]
IoT HoloLens Surface Hub Windows Desktop Windows Mobile Xbox ONE CORE OS ONE APP PLATFORM ONE STORE Windows 10.
Growing Reach with Universal Windows Apps Windows Developer Platform Improving User Engagement.
Introducing the UWP.
请点击以下链接下载 WinHEC 的演讲材料 Download WinHEC presentations here:
Friday, August 29, 2014 CSCI 351 – Mobile Applications Development.
Mobile Holographic Surface Hub XboxIoT Desktop.
Introducing Xamarin 2.0 Introducing Xamarin 2.0 Michael Hutchinson
Extend your app to multiple device families and use new capabilities by targeting the UWP.
Windows Camp #wincamp Windows Camp Игорь Сычев Premier Field Engineer, Microsoft Что нового/полезного принесла VS2015 для разработчиков приложений.
Easy for users to get & stay current Unified core and app platform Windows Phone 7.5 Windows Phone 8 Windows Phone 8.1 Windows 8 Xbox One Windows on Devices.
Windows Binary Phone Binary Windows universal Desktop PC 2 in 1 Mobile Tablet Phablet Phone Xbox IoT Band IoT headless Raspberry Pi Home.
Easy for users to get & stay current Unified core and app platform Windows Phone 7.5 Windows Phone 8 Windows Phone 8.1 Windows 8 Xbox One Windows on Devices.
Microsoft Virtual Academy North Shore.NET User Group Our Sponsors.
Lagash Systems Mariano Sánchez – Software
IoT HoloLens Surface Hub Windows Desktop Windows Mobile Xbox ONE CORE OS ONE APP PLATFORM ONE STORE Windows 10.
Monday, August 31, 2015 CSCI 351 – Mobile Applications Development.
Easy for users to get & stay current Unified core and app platform Windows Phone 7.5 Windows Phone 8 Windows Phone 8.1 Windows 8 Xbox One Windows on Devices.
Monday, August 31, 2012 CSCI 333 – Systems Programming.
Bridges to the Magickal Faerie Land of Windows 10 Hannes Nel M263.
04 |Sharing Code Between Windows 8 and Windows Phone 8 in Visual Studio Ben Riga
Integral Users will interact with your app on a big screen with keyboard and mouse.
Universal Apps: A Developers Guide Keith Patton – Marker Metro M257.
Developing Universal Windows Apps in Visual Studio 2015.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Understanding and implementing the remote provision pattern in SharePoint.
The Windows 10 App platform: an introduction to the UWP Andy Wigley b:
Best 5 Mobile App Development Tools for Developer's to think beyond the Limitation.
0 Developing for Windows 10 Tony Champion Champion DS.
Understanding Mobile Devices, Interactions, and Tools Lesson 1.
Windows 10 Anniversary Update coming to PCs, tablets, phones, Xbox One, Microsoft HoloLens and IOT.
Building Windows Phone 7 Games and Applications Yes, yes! “Games and Applications” and not “Applications and Games” Content is under NDA – please do no.
11/12/ :06 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Windows Bridge for iOS Bring your iOS apps to Windows
Beginning of Xamarin for iOS development
The Xamarin Promise - Realized
4/26/ :28 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Windows Calls Applications (windows.applicationmodel.calls)
Adaptive UI in UWP XAML Andy Wigley
CSCI 351 – Mobile Applications Development
5/15/2018 5:43 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
The Universal Windows Platform
Migrating 8.1 Apps to Windows 10
Microsoft Ignite /19/2018 2:35 AM
8/3/2018 7:11 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Designing Cross Platform Applications on .NET Core
9/11/ :55 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Microsoft Build /13/2018 2:24 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
CSCI 351 – Mobile Applications Development
Desktop App Converter (Project Centennial)
DNN Connect 2017 Microsoft Keynote
Project Rome: Activity API & Pick Up Where I Left Off
1.1. .NET architectural components and .NET Core
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Modernizing App Experiences
Microsoft Build /19/2018 7:06 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Myth Busting: Hosted Web Apps
Microsoft Build /8/2018 8:41 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
DotnetConf 11/14/2018 3:27 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Creating Windows Store Apps Using Visual Basic
Build /20/2018 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
Bring existing desktop apps to UWP with the Desktop Bridge
Hosted Web Apps with Windows App Studio
Building Awesome Metro style HTML apps in Blend
Microsoft Office 4/3/2019 Deep Dive into native Universal App development with the Office 365 APIs Speaker name Title Microsoft Corporation © 2012 Microsoft.
Open Automation Software
Delivering great hardware solutions for Windows
Device Access Tomas Lukša.
Presentation transcript:

Universal Windows Platform One codebase for Mobile, Desktop, IoT, Xbox, HoloLens, etc. Gergely

About me Gergely Kalapos, Short: Gergö as a Software Engineer Born in Hungary Studied Software Engineering at JKU in Linz Started with.NET development around 2008

Goal of the talk Give an overview about UWP E.g. if you have a product and you have to deliver a Windows client/version UWP can be relevant. After this talk you should be able to decide if UWP is the way to go. Show you an interesting concept (1 codebase (including UI!) for everything) E.g. if you are an iOS developer imagine that you write one codebase for Mac, Apple Watch, iPhone, iPad, and iWoaßNetWos This is not a deep dive talk on UWP

Goal of the talk I don’t work for Microsoft -> I will also tell you what I don’t like about it or what are thing which do not work well

Outline 1.What is UWP? Why did Microsoft create it? 2.Create a single UI: Phone(~4”) Surface hub 55” 3.Code sharing: IoT (Resberry Pi) Desktop PC (i7, 16GB Ram) 4.Cortana Integration

How to try it? Install Visual Studio 2015 and Windows 10 (It also works with a VM, it runs perfectly on my Mac with VMware!)

How to try it?

History Source: Microsoft

Windows Runtime

Windows Runtime – Why do we need it? public async Task LongRunningMethod() { var file = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFileAsync("VeryBigFile.dat ", Windows.Storage.CreationCollisionOption.ReplaceExisting); using (var stream = await file.OpenStreamForWriteAsync()) { using (var streamWriter = new StreamWriter(stream)) { var lotsOfData = GetLotsOfData(); await streamWriter.WriteAsync(lotsOfData); }

Benefit

One UI for every Windows 10 device

Devices with very small (Phone) and very big (Xbox) display. What about the UI? Tailored UI selected manually. //Get the diagonal size of the integrated display var dsc = new DisplaySizeHelper.DisplaySizeClass(); double _actualSizeInInches = dsc.GetDisplaySizeInInches(); //If the diagonal size is <= 7" use the OneHanded optimized view if ( _actualSizeInInches >0 && _actualSizeInInches <= ONEHANDEDSIZE) { rootFrame.Navigate(typeof(MainPage_OneHanded), e.Arguments); } else { rootFrame.Navigate(typeof(MainPage), e.Arguments); } Avoid this if you can (it’s possible in most cases!)

Devices with very small (Phone) and very big (Xbox) display. What about the UI? Tailored UI, selected by the framework Avoid this if you can (it’s possible in most cases!)

Adaptive UI Adaptive triggers Declarative state transition Two built in trigger: MinWindowHeight, MinWindowWidth

Adaptive UI Adaptive State Setter Setting values in a visual state

Adaptive UI StateTriggers and Setters form a visual state. All the Setters are applied when the StateTrigger returns true.

Adaptive UI Recommendation: Use this, if there is no specific reason not to use Adaptive UI E.g. Continuum

Adaptive UI Demo (Hello World + PasswordWallet + Expression Blend)

One codebase for every Windows 10 device

Adaptive Code – How to take advantage of special hardware – The Windows 8.1 Solution 1 codebase 2 binaries Compilation directives C# Syntax #if WINDOWS_PHONE_APP Windows.Phone.UI.Input.HardwareButtons.BackPressed += this.HardwareButtons_BackPressed ; #endif C++ Syntax #if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP _backPressedEventToken = HardwareButtons ::BackPressed += ref new EventHandler (this, &NavigationHelper::HardwareButton_BackPressed); #endif And this was very- very ugly!

Adaptive Code – How to take advantage of special hardware – The UWP way There is really a single binary for every device family No ifdefs -> this is done in runtime There is a common API surface (More then 80% of all the APIs is there) All the rest are in so called platform specific APIs, which do not invalidate binaries! If you add a platform specific api you can light up device specific features only for a specific device family. (e.g. in a contacts app on mobile can also call a contact)

Adaptive Code – How to take advantage of special hardware – The UWP way Windows universal Desktop PC 2 in 1 Mobile Tablet Phablet Phone Xbox IoT Band IoT headless Raspberry Pi Home Automation Surface Hub Holographic HoloLens

Adaptive Code – How to take advantage of special hardware – The UWP way Platform Specific APIs can be added as new references

Testing for capabilities IsApiContractPresent IsEnumNamedValuePresent IsEventPresent IsMethodPresent IsPropertyPresent IsReadOnlyPropertyPresent IsTypePresent IsWriteablePropertyPresent Windows.Foundation.Metadata.ApiInformation

Testing for capabilities var api = "Windows.Phone.UI.Input.HardwareButtons"; if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(api)) { Windows.Phone.UI.Input.HardwareButtons.CameraPressed += CameraButtonPressed; }

ApiInformation demo Demo

Limit the App to a specific device family By default the app runs on every device family. In the manifest you can change this Runs only on Mobile device family:

Cortana Integration

Demo Sample from Microsoft

Cortana Integration – 1. The VCD File Adventure Works, When is my trip to Las Vegas? When is my trip to Las Vegas? when is [my] trip to {destination} Looking for trip to {destination} Las Vegas Dallas New York

Cortana Integration – 2. Registering the VCD StorageFile vcdStorageFile = await await Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstallCommandDefiniti onsFromStorageFileAsync(vcdStorageFile);

Cortana Integration – 3. AppService (Only for background stuff)

Summary

Resources A Developer’s guide to UWP guide-to-windows guide-to-windows About API contracts from Larry Osterman (Explains the low level implementation of API Contracts, very interesting!) Larry-Osterman-API-Contracts Larry-Osterman-API-Contracts Sample Apps

Why do I do this?

Thank you!