Upload
stefano-ottaviani
View
159
Download
4
Tags:
Embed Size (px)
Citation preview
Stefano Ottaviani@[email protected]
Novità per gli sviluppatori iOS, Android e Cross-Platform
Disclaimer
Mobile Dev since
LOB (Line of Business) apps
• Xamarin (ex MonoTouch / Mono for Android)
• Principalmente iOS
• Un po’ di Android
More Platforms = More Opportunities1°tema
More Platforms = More Opportunities
• Mobile users want to use same applicationacross devices
• Developers want to target many platforms
The Windows 10 opportunity
Growing Reach with Universal Windows Apps
Windows Developer Platform
Improving User Engagement
Integrazione2°tema
Developer tools
HTMLBrowser-based applicationsVisual Studio tools forApache Cordova
Visual C++ for cross-platWin32C++
ObjC/Swift, Java, .NET/UWANative
Rich experiences Breadth of devices
• Visual Studio installs and uses the third party tools you need for multi-device development
• As you use Visual Studio, each time it opens, it runs dependency checks and keeps up-to-date a verified stack of open source tools from the community
All the stuff you need
Visual Studio Emulator for Android
Fast, x86 image built from AOSP
Runs on Hyper-V
Comes with Visual Studio
Speaks Android Debugging
Native capabilities and sensors
Zoom, Rotation, Network, Location, Accelerometer, Battery, OpenGLSD Card, Camera, Audio playback, Keyboard Input, Screenshots,Version and Screen Size Configurations, Drag&Drop APKs
Polita PaulusPrincipal PM Manager
Getting Started with Cross-Platform Mobile Development with
Apache Cordova
2-706
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• Configuratio
n
Visual Studio Project• HTML, CSS, JS, assets• Windows-specific runtime• Windows-specific plugin
code• Windows-specific
configurationXCode 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 Cordov
a Project
Build Cordova Project
Native Windows App
Native iOS App
Native Android App
Visual Studio Tools for Apache Cordova
• Extension to Visual Studio 2013 and in-box in Visual Studio 2015• Create, code, build, debug, package, and publish Cordova applications for iOS, Android, and Windows from within Visual Studio
+
:)
Visual Studio Tools for Apache Cordova
Black Box
CSS | HTMLJavaScript | TypeScript
Microsoft OSS contributions to Cordova:
• Cordova Browser Platform + Browser
Support for Top 30 Plugins
• Ripple, v2
• Cordova Windows Platform
• Cordova Test Infrastructure (MEDIC)
• Cordova CLI (--list, --save, --restore, --
arch)
• Filling out the Plugin support matrix
• Hosted app support for File, Media
Capture, and Camera plugins
Template per:
Create a single Hybrid App for iOS, Android, and Windows with your skillset in Web Standards: HTML, JavaScript, CSS
Demo: Visual Studio Tools for Apache Cordova™
Run on Android and iOS
Demo
DOM ExplorerDemo
Ryan Salva
Getting Great Performance Out of Cordova Apps
Approfondimenti
There is a general perception that apps built using HTML, CSS, and JavaScript are
slow.
(Hint: We are going to change that in this session)
We have identified SIX areas where developers commonly encounter performance issues
1. The Webview Tax
2. Document Object Model (DOM)
3. Images
4. Animation
5. Garbage Collection
6. UI Controls
Compared #perfmatters on three nice, but aging devices with similar hardware profiles:
• Nexus 7 2013 (Android)• iPad Mini 3 (iOS)• Lumia 928 (WP)
Methodology
Yes!• Visual Studio has had support for Cordova for a year• VS2015’s Cordova investments include:
• Improved CLI and project system interop with 3rd party CLIs• Updated Cordova, plugins, emulators, and OSS components• An improved build path for iOS• Additional app services support for mobile services, auth, O365, and analytics
• Windows is committed to building and growing a first class Cordova platform
• Major Windows investment for Cordova included:• Hosted app content support with WinRT access• Embedded webview support with WinRT access• Security model redesign• Contribution of all Cordova code to the Apache Cordova OSS project
Are you guys really serious about Cordova?
Miguel de IcazaCTO and Co-founder, Xamarin
James MontemagnoDeveloper Evangelist, Xamarin
Go Mobile with C#, Visual Studio and
Xamarin
3-770
Anything you can do in Objective-C, Swift, or Javacan be done in C# and Visual Studio with Xamarin.
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’s Unique Approach
Shared C# codebase • 100% native API access • High performance
iOS C# UI
Windows C# UIAndroid C# UI
Shared C# Mobile
C# Server
Linux/MonoCoreCLR
Azure
Shared C# Client/Server
Non solo C#: anche F#
Shared C# or F# codebase • 100% native API access • High performance
iOS F# UI
Windows F# UIAndroid F# UI
Shared F# Mobile
F# Server
Linux/MonoCoreCLR
Azure
Shared F# Client/Server
Using Xamarin.Forms things are simpler!
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
Xamarin.iOS e Xamarin.Android
vs
Xamarin Forms
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
Xamarin – Your Complete Mobile Solution
DESIGN – DEVELOP - INTEGRATE
TEST MONITOR
LEARN
Xamarin InspectorDemo
Use Cordova if you want to…• Use your web skills & assets• Maintain one codebase• Use the JS libraries you love
You might be better off writing native apps if…• Performance is of utmost concern• You want different apps on different devices• You <3 Java, ObjC, or DirectX (If you love XAML/C#, consider Xamarin)• Your apps have deep integration with devices, such as the DirectX
rendering pipeline
Should I build a Cordova app or Native apps?
Salmaan Ahmed - PM WindowsJim Radigan - Compiler Technologies
Compiling Objective-C Using the Visual Studio 2015 C++ Code Generation that Builds Windows, SQL, .Net, and Office
3-610
More Platforms = More Opportunities
• Mobile users want to use same applicationacross devices
• Developers want to target many platforms
The Windows 10 opportunity
Growing Reach with Universal Windows Apps
Windows Developer Platform
Improving User Engagement
Universal Windows PlatformWherever your code was born, you can bring it to Windows
Middleware Platforms
Middleware Partners (e.g., Xamarin)
Game Engine Partners (e.g., Unity)
Other Mobile Platforms
‘Project A’ (Java/C++)
‘Project I’ (Objective C/C++)
Windows Platform
Universal Windows 8 Apps (C++/C#/JS)
Universal Windows 10 Apps (C++/C#/JS)
‘Project Centennial’ (Classic Apps)
Web Platform‘Project Spartan’ Rendering Engine
Cordova Tooling (HTML/JS)
‘Project Westminster’ (Web Apps)
Universal Windows Platform
DesktopMobile
XboxIoT
Holographic Surface Hub
Universal Windows Platform
Project Islandwood
Candy Crush Saga Sviluppato originariamente per iOS, in Objective-C
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
Tooling
Xcode projects imported to Visual Studio
Shared project settings, imported from Xcode
Tooling
Integrated Visual Studio Development
Xcode projects imported to Visual Studio
Integrated language support: syntax highlighting, autocomplete
Full debugging: breakpoints, stack traces, …
Universal API Interop
Project IslandwoodDemo
• You are writing a Windows App• With ObjC as a supported
lang• Interop with Universal API
surface• And reuse code that uses
some iOS APIs
Quindi
Works across Win10 devices
Deploy to more devices
Across multiple form-factors
Running ARM and x86/64 CPUs
API Compatibility
Supports a subset of iOS APIs
Does not track a particular version of iOS
Most used APIs are implemented first
• Games: OpenGL (ANGLE, CAEAGLLayer, EAGLContext), OpenAL, Sensors
• UI: UIKit, CoreAnimation, CoreGraphics, CoreText, Touch
• Objective-C: ARC, blocks• Foundation /
CoreFoundation• Services: StoreKit, Social,
Notifications, …
Windows does the heavy lifting for youWe translate and redirect iOS concepts to Windows concepts
User experience Monetization services Platform
Notifications
SharingFile
systemCameraIn-App
Purchase
Windows 10
Proven compatibility
Candy Crush Saga: Brought to Windows Phone with very few code changes
Interop used for native integration• In-App Purchase• Local Notifications
Next Steps
Rolling out the SDK over the summer
http://aka.ms/islandwood
John Justice, Director of Program Management, OSGRajesh Sundaram, Director of Software Engineering, OSG
“PROJECT ASTORIA“: Build great Windows apps with your Android code
2-702
Desktop
Mobile
XboxIoT
Holographic
Surface Hub
Universal 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++)
Other Mobile Platforms
Project Islandwood
Project AstoriaUse your Java / C++ code
Use Android IDE
High code reuse
Use your Objective C code
Use Visual Studio
Medium-high code reuse
Universal Windows PlatformWherever your code was born, you can bring it to Windows
Windows app built from Android codeDemo 1
User experienceApps built with Project Astoria are Windows apps
Contoso
Users acquire apps built with Project Astoria through the Windows Store
User experience
Cloud services
Platform
User experience (cont’d)Apps built with Project Astoria are Windows apps
v/sv/sv/s
User experience
Cloud services
Platform
Building a Windows app with "Project Astoria”Demo 2
Windows does the heavy lifting for youWe translate and redirect Android concepts to Windows concepts
User experience Cloud services Platform
Notifications
SharingFile
systemCamera
• Acquisition• Input and interaction• App-to-app interactions• Windowing &
navigation• Notifications and live
tiles• …
• In-App Purchases• Ads• Maps• Game Services• Analytics• Notification service• …
• File system• Contacts, photos,
…• Sensors• Camera• Hardware
accelerated graphics & Direct X
• …
Microsoft Services
AppInsights
MS Ads
In-app Purchases
Windows Notification Service
Xbox Live Services
Bing Maps
Windows Location services
…
• Project Astoria SDK in Java
• Use Microsoft services with minimal code change
• Get Started in Dev Center
Cloud servicesWindows apps built with Project Astoria use Microsoft cloud services
User experience
Cloud services
Platform
Platform redirectionAndroid platform capabilities are redirected to Windows
APPX
APK
“PROJECT ASTORIA” SUBSYSTEM
WINDOWS
• File system• Contacts, photos,…• Sensors• Camera• Hardware accelerated graphics
& Direct X• Networking/sockets• Application lifecycle• Resource management• Background execution model• Security model
User experience
Cloud services
Platform
• API Level: KitKat (Android 4.4)
• Porting da iOS o Android?• iOS: + lavoro, ma + integrazione con API Windows
• Supporto per Windows “Mobile” (Phone / Tablet)
• Background Service, Layout, Intent, Bluetooth, …
Visual Studio 2015 FAQ
Windows 10 Mobile Only
+
Your Android Code(Project Astoria SDK & App analysis)
+
Your app in the Windows
Store
Your IDE(Project Astoria Plugins)
Your dev machine
Project Astoria RecapBuild a Windows app with your Android code
+
WindowsMagic
Live tiles
…
IntelliJ
AndroidStudio
Eclipse
Windows
Mac
Learn more about Project Astoria at http://aka.ms/projectastoria
What’s next?
3-714
Building Cross-Platform Mobile Apps in
C++ with Visual Studio 2015
Ankit AsthanaSenior Program Manager
iOS AndroidWindows
The Silo Approach
C#, C++/CX ObjC, Swift Java
Benefits• Full native experience• Total access to the device as provided
by the SDK
Negatives• Minimal code reuse• Higher development cost• One platform becomes the dominant
platform
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:
XAML
CxC#
PinvokeC++ Wrapper
Java/C++ JNI Wrappers
ObjC Wrapper
XML
Java Cocoa Touch
Shared C++ BackendDropBox
Trivia!
Android
Java
How many of the top 50 applications on the Android Playstore (U.S.)leverage C++ code?
• None• 10%• 40%• 80%
Trivia!
Android
Java--------------
C++
How many of the top 50 applications on the Android Playstore (U.S.)leverage C++ code?
• None• 10%• 40%• 80%
Top 50 Android Playstore applications (U.S.)
Android
Java--------------
C++
• Facebook Messenger
• Pandora
• Clean Master
• Go Keyboard
• SnapChat
• Super-Bright LED
• Candy Crush Soda
• Spotify
• CrossRoads
• Netflix
• Subway Surfers
• Kik
• WhatsApp Messenger
• Skype
• Clash of Clans
• Jelly Jump
• DubsMash
• Temple Run 2
• Surgery Simulator
• Candy Crush Saga
• CM Security Antivirus
• Trivia Crack
• Zedge Ringtones
• Apus Launcher
• Bingo Crush
• Amazon Shipping
• Texas Holdem
• ZigZag
• 8 ball pool
• Yahoo Mail
• Game of War
• Despicable Me
• Fast and Furious Legacy
• Five Nights at Freddy’s
• Sound Cloud – Music and Audio
• iHeart Radio
• Fruit Ninja Free
• The Weather Channel
• Flow Free 2
• Minicraft
• Magic Piano
• ooVoo video call
• Solitare
• Wish Shopping Made Fun
• Google Earth
• Angry Birds
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)
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
Office su mobile
• 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 RC
Demo 1: Developing for the Android Platform
DescriptionMore TeaPots Native-Activity Android application. Mostly ‘C++’ code with a little Java wrapper
Feature Capabilities• Building Android Native-Activity application• Clang – GCC toolchain• Android Code Editing (Refactoring, Intellisense)• Android Native Debugger• Logcat Viewer• Fast Emulation
Demo 2: Building a C++ cross-platform mobile application
DescriptionAn OpenCV based Image Manipulation cross-platform applicationtargeting the Android and Windows platform
Feature Capabilities• Cross-Platform Mobile Application• Easily share code easily across mobile-platforms• Cross-Platform productivity features (Intellisense, refactoring)• Powerful debugging (NATVIS)• Build Simultaneously
Demo 3: Debugging an existing Android Application
DescriptionDebug a pre-existing Android Application in Visual Studio. The Application is large:- BingMaps Android Application.
Feature Capabilities• Debug pre-existing Android Application
For more information: refer to this blog
Create shared C++ componentsacross iOS, Android, & Windows and complement with apresentation tier in Xamarin or Cordova
Demo: Visual C++ for Cross Platform Mobile Development
• VS Tools for Apache Cordova
• Xamarin
• Project Islandwood: • Objective-C => UWA • Esempio: Candy Crush su WP• Editor: Visual Studio
• Project Astoria: • Java => UWA• Editor: Eclipse, Android Studio,
…
• C++ Crossplatform • Esempio: Office su iOS e Android• Editor: Visual Studio
Recap
Donna MalayeriProgram Manager, Azure Mobile@lindydonna
Go Mobile! Login, sync data, and connect to enterprise APIs with
Azure App Service
2-713
REST A
PI
Offline sync
Push Notifications
Data connections
User Authentication
Twitter Microsoft Google
Azure Active
Directory
Azure Mobile Apps
Windows
iOS
Android
HTML 5/JS
Xamarin
PhoneGap
Sencha
WindowsAndroid
Chrome
iOS OSX
In-AppKindle
Mobile SDKs
Backend code
SQL MongoTables O365 API Apps
Offline Sync
Azure MobileOffline Data Sync
• Windows Runtime e Windows Phone
• Xamarin iOS e Android
• iOS (Objective-C)
Visual Studio 2015 Supporto per
• Access data from Mobile Services tables even when app is offline
• Keep a local queue of Create, Update, Delete operations and synchronize with server when app is back online
• Detect conflicts when same item is changed both locally and on server
• Use soft delete to remove deleted records from client data stores
• Can use push notifications to trigger client sync
How it works
Richard diZerega (@richdizz)http://www.richdizz.comPrincipal Software Engineer - Microsoft
Overview of Cross-Platform Mobile Development with
Office 365
2-655
• Written in Objective-C, Java, and JavaScript.
• Work with Xcode, Android Studio, and Atom/Sublime and Visual Studio.
• Distributed with CocoaPods, Maven, and npm.
• Open source on GitHub.
What?
Idiomatic and native libraries for iOS, Android and Cordova.
• Launch Services• MyFiles (OneDrive for Business)• Sites (SharePoint Online)• Calendar (Exchange Online)• Contacts (Exchange Online)• Mail (Exchange Online)• Users/Groups (Azure AD)
• NEW Services• OneNote with Office 365• User Profiles (SharePoint Online)• Managed Metadata (SharePoint Online)• Videos (SharePoint Online)• Modern Groups• Office Graph
Office 365 APIs (continued)• Not limited to Office
365• Power BI• Dynamics CRM Online• 3rd Party Applications/Services• Your Own Applications/Services
2-84
Cross-platform localization with the Multilingual App Toolkit
Cameron LerumSr. Program ManagerOperating Systems Group
• .NET (.resx)
• Xamarin Forms (.resx)
• Xamarin iOS (Localizable.strings)
• Xamarin Android (Strings.xml)
Visual Studio 2015 Supporto per
Generazione file XLIFF (.xlf)
Editor di file XLIFF
Thank you