Upload
eric-dixon
View
214
Download
0
Tags:
Embed Size (px)
Citation preview
Developing Cross-Platform Applications
with Visual Studio 2015Sergii BaidachnyiPrincipal Technical EvangelistMicrosoft [email protected]
App Development Strategies
Limited access to device capabilities Web performanceDevice-independentEasier management
Web technologies
Full access to device capabilitiesNative performanceHighly customized per device
Native platform technologies
Developer tools
HTMLBrowser-based applicationsVisual Studio tools forApache Cordova
Visual C++ for cross-platWin32C++
Desktop apps – WPFUniversal Windows Apps
.NET
Rich experiences Breadth of devices
Visual Studio 2015
Xamarin
.NET and XamarinShare app logic across platforms• Native apps for Windows, iOS and
Android devices using .NET
• Most productive and powerful platform for creating native applications
• Maximize code reuse with Universal Projects & Portable Class Libraries
100% APIs exposed• Everything you can do in xCode or ADT
you can do with Visual Studio
z
C# + XIB C# + AXML C# + XAML
Native UI Native UI Native UI
Shared client app C# logic
Windows APIs
Microsoft.Phone Microsoft.Networking Windows.Storage Windows.Foundation Microsoft.Devices
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
iOS – 100% API Coverage
MapKit UIKit iBeacon CoreGraphics CoreMotion
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
Android – 100% API Coverage
Text-to-speech ActionBar Printing Framework Renderscript NFC
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
Anything you can do in Objective-C, Swift, or Javacan be done in C# and Visual Studio with Xamarin.
Create UI with drag and drop simplicity
Target multiple screen sizes, resolutions, and OS platform and versions
Layouts saved in native resource formats
World’s best Android designer available in Visual Studio
UI design iOS app designer in Visual Studio
Android app designer in Visual Studio
Native compilation, native performance
Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary suitable for Apple’s App Store
Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device
Xamarin + Xamarin.Forms
Traditional Xamarin Approach With Xamarin.Forms:More code-sharing, all native
iOS C# UI
Windows C# UIAndroid C# UI
Shared C# Backend
Shared UI Code
Shared C# Backend
Apache Cordova
What is Cordova?Native Wrapper
<webview>Your JavaScript
App
• Open source framework• Hosted webview in iOS and Android
platforms, WWAHost in Windows platform• Single, shared HTML, JavaScript, and CSS
codebase deployed to all targets
What is Cordova?Native Wrapper
<webview>Your JavaScript
App
Cordova Plugin JS API
• Open source framework• Hosted webview in iOS and Android
platforms, WWAHost in Windows platform• Single, shared HTML, JavaScript, and CSS
codebase deployed to all targets• Plugins provide a common JavaScript API
to access device capabilities
How does Cordova work?
Cordova Project
• HTML, CSS, JS• Assets• Platform code• Plugin code• Configuration
Visual Studio Project• HTML, CSS, JS, assets• Windows-specific runtime• Windows-specific plugin code• Windows-specific configuration
XCode Project• HTML, CSS, JS, assets• iOS-specific runtime• iOS-specific plugin code• iOS-specific configuration
Android Project• HTML, CSS, JS, assets• Android-specific runtime• Android-specific plugin code• Android-specific configuration
Create Cordova Project
Build Cordova Project
Native Windows App
Native iOS App
Native Android App
• Productivity of Visual Studio for hybrid apps
• Scale to complex Enterprise apps through optional TypeScript support
• End-to-end development workflow included for Windows, iOS and Android
• Flexibility to use any JavaScript framework
Tools forApache Cordova
Hybrid-HTML apps
Cordova tooling in Visual Studio
• Natural path for web developers targeting devices Black Box
CSS | HTMLJavaScript | TypeScript
Cross-Platform in C++
Cross-platform mobile apps in C++
Easy installation
One C++ IDE for cross-platform
dev
Share and reuse cross-
platform code
State of the Art code-editing
features
Powerful debugging
experience
Fast emulation
iOS AndroidWindows
C++ the common denominator
C#, CX ObjC, Swift Java----------
C++----------
C++----------
C++
Benefits• Full native experience• Total access to the device as provided
by the SDK• Code Reuse• Performance• Security
C++ the common denominator
.ipa.apk.appx
.appx .apk .ipaC#, C++/Cx Java
Dex / ARTObjC Swift
Dynamic Link Library (.dll)Static Library (.lib)
Dynamic shared library (.so)Static library (.a)
Static library (.a)
Shared C++ backend is compiled as:
XAMLCxC#
PinvokeC++ Wrapper
Java/C++ JNI Wrappers
ObjC Wrapper
XMLJava
Cocoa Touch
Shared C++ BackendDropBox
Compilers Visual C++ Compiler GCCClang/LLVM Clang/LLVM
Build Engine MSBuild, Nmake NDK Build, Make files, Gradle, Ant Xcode Build
IDE(s) Visual Studio Eclipse CDT Xcode
Host Platform Windows 8/8.1/10 MacOS X, Linux, Windows Mac OS X
Development tools for C++ cross-platform
Challenges with C++ cross-platform mobile
• Multiple installation experiences
• Maintaining multiple build tools and build systems
• Debugging experience is not ideal
• Multiple C++ IDE(s)
• Easy installation
• One C++ IDE for your cross-platform needs
• Share and reuse cross-platform code
• State of the Art code-editing features
• Powerful debugging experience
• Fast emulation
Visual Studio 2015 Visual Studio 2015
Introducing!, Visual C++ 2015 (iOS)
• Develop iOS applications using Visual C++
• Easily edit, build and debug your iOS code
• Share and reuse your cross-platform code
• Productivity of Visual Studio now available for iOS
Xamarin and Visual C++ 2015
Xamarin Android native (C/C++) users will now be able to:
• Build Android native Libraries (.so and .a) using Visual Studio
• Debug their Android native using a powerful debugging experience
Unity
Its FreeUse Visual Studio to edit & debug codeIntegrates VS with UnityProvides
Shader syntax highlightingCode templatesIntellisenseFull debugging support
Visual Studio Tools for Unity
VSTU
Visual Studio Graphics DebuggerNow with full Unity supportSupports
Single or multi frame captureFrame level debuggingMemory profiling
Visual Studio 2013 CTP5 and above
Diagnostics