Lagash Systems Mariano Sánchez – Software
Universal Windows Platform Programando para todos y todas
Agenda Introducing the UWP Developer experience Adaptive design & code .NET Native Bridging technologies
Introducing the UWP
Easy for users to get & stay current Unified core and app platform The convergence journey… Windows 10 Converged OS kernel Converged app model
One Windows Desktop PC 2 in 1 Mobile Tablet Phablet Phone Xbox IoT Band Raspberry Pi Home Automation Surface Hub Holographic HoloLens One Windows Platform
Universal Windows Platform The refactored Windows common core One hardware platform Universal hardware driver Standard network and I/O Phone Device Xbox Device Desktop Device Windows Core
Universal Windows Platform A single API surface A guaranteed API surface The same on all devices Phone Device Xbox Device Desktop Device Windows Core Universal Windows Platform
Apps don't target Windows 10, apps target the platform: <TargetPlatform Name="Microsoft.Universal" minVersion=" " maxVersionTested=" "/>
Universal Windows Platform Windows App: A single binary Running on any device Testing for capabilities Adjusting to devices Phone Device Xbox Device Desktop Device Windows Core Universal Windows Platform Windows App
Universal Windows Platform Platform extensions for Device-specific API Family-specific capabilities Compatible across devices Unique update cadence Extensions don't invalidate binaries on other devices Phone Device Xbox Device Desktop Device Windows Core Universal Windows Platform Windows App Phone extension Xbox extension Desktop extension
Universal Windows Platform One Operating System One Windows core for all devices One App Platform Apps run across every family One Dev Center Single submission flow and dashboard One Store Global reach, local monetization Consumers, Business & Education
Developer experience
The developer story When writing for iOS, A developer writes for iPad & iPhone When writing for Android, A developer writes for all supported devices When writing for Windows 8, A developer writes for each devices When writing for Windows 10, A developer writes for every device
Visual Studio IDE Every project type Desktop, Windows, Phone, Service, Web, Game, More… Every developer task Code edit, Architecture design, UX design, Debug, Profile, Review, Test, More… Every development language C++/CX, C#, Visual Basic, JavaScript, XAML, HTML, More… Visual Studio Online Source repository, project management, bug tracking, More… Blend for Visual Studio The XAML Developer’s IDE
Developer unlock
Where can I develop? Windows 10 Requires Visual Studio 2015 Windows 8.1 & Windows Server 2012 R2 The Visual Studio designer does not function Debugging requires a Windows 10 device or Remote Debugging Tools
Supported Programming Languages Visual C# and XAML Visual Basic and XAML Visual C++ and DirectX, DirectX/XAML JavaScript and HTML5
Introducing “Template 10” A new blank template Includes a few files & empty folders to guide conventions Similar to the MVC template Add-on components to solve common problems Solving for the 90% The code will solve the 90% use case Delivering with Windows 10 The template is in GitHub and still under construction Contribute to Template10
Adaptive design & code
Adaptive design Responsive design Flexible layout responds to small changes Many controls handle basic responsiveness Adaptive design Smart layout adjusts to large changes Features like visual states aid in this design Tailored design A device-specific app can simplify design Some devices have unique design languages
Adaptive design Phone (portrait) Tablet (landscape) / Desktop
Tailored design Phone (portrait) Tablet (landscape) / Desktop
Adaptive code A compatible binary across devices Universal API with device-specific implementation Light up our app with capabilities Testing for capabilities and namespaces The device families you choose determines which APIs you can call freely
W 8.1 / WP 8.1 Shared Projects Windows Binary Phone Binary
Not all APIs were available everywhere
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
Testing for capabilities IsApiContractPresent IsEnumNamedValuePresent IsEventPresent IsMethodPresent IsPropertyPresent IsReadOnlyPropertyPresent IsTypePresent IsWriteablePropertyPresent Windows.Foundation.Metadata.ApiInformation.
Test capabilities at runtime Use Adaptive Code to light-up your app on specific devices var api = "Windows.Phone.UI.Input.HardwareButtons"; if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent(api)) { Windows.Phone.UI.Input.HardwareButtons.CameraPressed += CameraButtonPressed; }
demo Hello World!
.NET Native
Managed languages are more efficient than ever Next generation compiler in the cloud Every Windows apps, only Windows app (right now) Apps use the standard C++ optimizer As optimizer performance improves, so does.Net native Apps with.Net bootstrapper Includes garbage collection
.NET Native There is no runtime This is machine code Every Windows app will be compiled with.Net Native
Benefits with.NET Native Up to 60% performance improvement on cold startup times, 40% on warm startup times Less memory consumption No dependencies on the.NET Runtime on the system
Benefits with.NET Native Performance benefits associated with native code (think C++ performance) You can still take advantage of the.NET programming model using C# or VB and the existing tools
Bridging technologies
Windows 10 operating system Bridging technologies Win32 desktop Web hosted Java Android Obj.C iOS Universal Windows Platform WWA C++ & CX.Net languages HTML DirectX XAML C++.Net languages MFCWFWPF.Net runtime Traditional Microsoft technologies are not the only way to create Windows apps
Bridging technologies Objective-C iOS code can be reused in a Windows app Android Android code can be reused in a Windows app to run on Windows Phone Web Websites can be wrapped to run on Windows Win32 Classic Windows Apps (CWA) can be packaged as an Appx
Bridging technologies Project Islandwood – IOS Bridge Project Astoria – Android Bridge Project Westminster – Web Bridge Project Centennial – Win32 Bridge
Preguntas?
Muchas Gracias Mariano Sánchez – Software