DotNet Cologne 2015 - Windows 10 AppDev, Teil1: App Developer Basics- (Daniel Meixner)

44
NET

Transcript of DotNet Cologne 2015 - Windows 10 AppDev, Teil1: App Developer Basics- (Daniel Meixner)

NET

Convergence

http://windows.Microsoft.com

Easy for users to get & stay current

Unified core and app platform

The convergence journey

Windows 10

ConvergedOS kernel

Convergedapp model

http://windows.Microsoft.com

One app platform

One Store +One Dev Center

Full Support for Existing Code

SDK +Services

Adaptive User Interface

NaturalUser Inputs

Tools

Install latest Windows 10 OS (10.0.10075.0)

insider.windows.com

Install VS 2015 RC w/ Universal Windows SDK & Tools

www.visualstudio.com

Build your first Universal Windows

App

Windows 10 Windows Server 2012 R2 *Windows 7

Windows 8.1

• Best developer experience for building Universal Windows apps

• Deploy/Debug/Profile

• Simulator

• Local Machine

• Mobile Emulators

• Remote Machine

• Device

• XAML Designer/Intellisense

All other features work at parity with Windows 10, except:

• Deploy/Debug/Profile

• Remote Machine

• Device

• XAML Intellisense

All other features work at parity with Windows 10, except:

• Deploy/Debug/Profile

• Mobile Emulators

• Remote Machine

• Device

• XAML Intellisense

• No WACK (Server R2)

*will be supported at RTM

Target a version of UAPnot the Operating System

http://windows.Microsoft.com

UAP = Universal App Platform

A collection of contracts & versions

http://windows.Microsoft.com

Platform Versioning

<TargetPlatform

Name="Microsoft.Universal"

minVersion="2.0.0.0"

maxVersionTested="3.5.0.0" />

http://windows.Microsoft.com

Extension SDKs

UAP

Windows Core Windows Core Windows Core Windows Core

UAP UAP UAP

Desktop Mobile Xbox More…

http://windows.Microsoft.com

The Extension SDK/Manifest

http://windows.Microsoft.com

Adding extensions

http://windows.Microsoft.com

Extension SDKs

• Extends the UAP

• Targets specific platforms

• Updates at a separate cadence

• Enabled on every device

One Common source

One Windows kernel

One File I/O stack

One Driver model

One App model

One APP Binary

Windows Core

Adaptivity

http://windows.Microsoft.com

Shared Projects

Windows

Binary Phone

Binary

http://windows.Microsoft.com

Not all APIs were available everywhere

http://windows.Microsoft.com

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<BackPressedEventArgs^> (this, &NavigationHelper::HardwareButton_BackPressed);

#endif

Feature Detection

http://windows.Microsoft.com

Testing for capabilities

IsApiContractPresentIsEnumNamedValuePresentIsEventPresentIsMethodPresentIsPropertyPresentIsReadOnlyPropertyPresentIsTypePresentIsWriteablePropertyPresent

Windows.Foundation.Metadata.ApiInformation

http://windows.Microsoft.com

Bridges

Universal Windows PlatformWherever your code was born, you can bring it to Windows

XboxIoTUniversal

Windows Platform

Middleware Platforms

Middleware Partners (e.g., Xamarin)

Game Engine Partners (e.g., Unity)

Windows Platform

Universal Windows 8 Apps (C++/C#/JS)

Universal Windows 10 Apps (C++/C#/JS)

Project Centennial (Classic Apps)

Web Platform

Microsoft Edge HTML Engine

Cordova Tooling (HTML/JS)

Hosted Web Apps (HTML/JS)

Other Mobile Platforms

Project Astoria (Java/C++)

Project Islandwood (Objective C/C++)

http://windows.Microsoft.com

Web Site

• Discoverable and

presented through a

browser

Hosted Web App

• Majority of app hosted on

a web server

• Access to native APIs

• Distributed through a

Store

Packaged Web App

• Content inside app

package

• Can use Cordova or

WebView

• Distributed through a

Store

Project Westminster „Hosted Web App“Bring Web Apps to the Windows Store

App Store (iOS, Android, Windows…)

Native app container

WebView

Web Site

custom bridgeNative Code

Hosted Web App architecture today

App Store

Native app container

WebView

Web Site

Native Code

Hosted Web App in Windows 10

Windows APIs

Hosted Web Apps Manifest

<uap:ApplicationContentUriRules>

<uap:Rule Type="include" WindowsRuntimeAccess="all" Match="https://rjs.azurewebsites.net/" />

<uap:Rule Type="include" WindowsRuntimeAccess="allowForWebOnly" Match="https://*.facebook.com/" />

<uap:Rule Type="include" WindowsRuntimeAccess="none" Match="http://bing.com/" />

<uap:Rule Type="include" Match="https://*.microsoft.com/" />

</uap:ApplicationContentUriRules>

DEMO

Hosted Web App

http://windows.Microsoft.com

Project Astoria

Bring Android Apps to the Windows Store for Phones

+

Your Android Code(Project Astoria SDK & App analysis)

+

Your app in the

Windows Store

Your IDE(Project Astoria Plugins)

Your dev

machine

+

Windows

Magic

Live tiles

IntelliJ

Android

Studio

Eclipse

Windows

Mac

http://windows.Microsoft.com

Project Islandwood

Bring iOS Apps to the Windows Store

Compile Objective-C for Windows in Visual Studio

Xcode projects imported to Visual Studio

Integrated language support: syntax highlighting, autocomplete

Full debugging: breakpoints, stack traces, …

Universal API Interop

Write Universal Windows Apps in Objective-C

Objective-C language support

• Compiler and Runtime

Useful and usable APIs

• iOS API compat

Tools

• Editor / Workflow

• Project import

http://windows.Microsoft.com

Project Centennial

Bring Classic Windows Applications to the Windows Store

Test

UpdateConvert

AppXMSI

IoTHoloLens

Surface Hub

Windows Desktop

Windows Mobile

Xbox

ONE CORE OS

ONE APP PLATFORM

ONE STOREWindows 10

Store Ecosystem

Westminster- Web apps

(HTML/CSS/JS)

Astoria - Android apps

(Java/C++)

Existing store apps/games

(C++/C#/JS)

Universal windows apps

(C++/C#/JS)

Music Movies & TV

Centennial - Classic

windows apps

(C/C++/.NET/Win32 API)

Islandwoods - IOS apps

(Objective-C/C++)

Preview available now!DEV.WINDOWS.COM

NET