Xamarin cross platform
-
Upload
guada-casuso -
Category
Technology
-
view
692 -
download
2
description
Transcript of Xamarin cross platform
![Page 2: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/2.jpg)
Topics we will cover:
Mobile Cross Platform Development Mobile Landscape: Web, Hybrid and Native Cross-Platform Architectures
Xamarin Overview and Architecture MVVMCross General Android client and iOS client
Architectures
![Page 3: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/3.jpg)
CrossPlatform Mobile App Development
![Page 4: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/4.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
• Performance • APIs Support• Tools• Monetization
CrossPlatform Mobile App DevelopmentQuality is Hard
![Page 5: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/5.jpg)
device
browser
app
Web App
device
Hybrid App
wrapper
app
wrapper API
Native App
device
app
Web App Hybrid App Native App
Use of device specific features and sensors
Portability across platforms
Performance & Native Experience
Updatability
5 OS Versions x 8 Manufacters x 20 Languages x 27
screen sizes3 OS Versions x 8
Devices x 20 Languages
2 OS Versions x 17 Devices x 20 Languages
Mobile Applications Development
![Page 6: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/6.jpg)
Input Distribution Channels Output Key Players
Mobile Browser HTML, CSS, JavaScript
WWW Web Document Safari – Chrome – Mozila
Web Wrapper HTML, CSS, JavaScript
App Store Hybrid Package PhoneGap
Web-to-native converter
Javascript App Store Native Package Titanium
Native JavaScript API
HTML, CSS, JavaScript
App Store Native Package BB , w8
Native C# App Store Native Package Xamarin
CrossPlatform Mobile App Development
Implementation Approaches
![Page 7: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/7.jpg)
CrossPlatform Mobile App Development
Adoption Factors
Mobile Browser
Web Wrapper
Web-to-native converter
Native JavaScript API
![Page 8: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/8.jpg)
Web Mobile Apps
Top 5 supported featuresGeolocationAPI, offline web application support, WebStorage, CSS3 Selectors and 2D animations are the top five supported features.
A responsive web application developed using HTML5, CSS3, and JavaScript could be viewed on phone browser,To support a variety of device sizes while keeping a single code base, a website should use responsive web development technologies like CSS3 or frameworks like Bootstrap or Foundation.
![Page 9: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/9.jpg)
Hybrid Mobile AppsFor run-of-the-mill business applications, hybrid app provides necessary functionality and performance most of the time.
A hybrid mobile app is build using HTML5, CSS3, JavaScript, PhoneGap and it runs on iOS, Android, Windows Phone and Black Berry.Hybrid app is 'hybrid' because it uses HTML 5 & CSS3 for mobile UI and JavaScript to communicate with device SDK.
Hybrid app = Single Page ApplicationHybrid mobile app is basically a single page application (or SPA). SPA is a web application that lives within a single HTML page.
![Page 10: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/10.jpg)
NATIVE Apps Performance
APIs Support Tools Monetization
![Page 11: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/11.jpg)
Languages, Skills, Versions Maintenance – evolution&
Performance
Native Support, Leverage C# Skills, familiar IDE …
![Page 12: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/12.jpg)
Fully native apps written entirely in C#
Xamarin exposes 100% of iOS and Android APIs in C#
Mobilize existing code, skills, and tools including Visual Studio
Share app logic code across
device platforms
C# unique approachpowered by Xamarin and Microsoft .NET
C# + XIB C# + XML C# + XAML
Native UI Native UI Native UI
Optional Remote Services(ASP.NET Web API
or any server technology)
Shared client app C# logic
![Page 13: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/13.jpg)
What is Xamarin?Extension to Visual Studio• iOS, Android apps
entirely within Visual Studio
• Compiles .NET/C# code to native platforms
• Visual Studio ALM and IDE capabilities fully available
Build apps faster• Leverage skills• Reuse code and binaries
with flexibility• Fully native user
interfaces
![Page 14: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/14.jpg)
Microsoft and Xamarin Partner Globally
With Xamarin, developers combine all of the productivity benefits of C#, Visual
Studio 2013 and Windows Azure with the flexibility to quickly build for multiple
device targets.” S. Somasegar, Corporate Vice President,
Microsoft
Technical collaboration for superior developer
experience
Exclusive MSDN offers that accelerate the
transition to mobile development
![Page 15: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/15.jpg)
![Page 16: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/16.jpg)
Create UI with drag and drop simplicity
Target multiple screen sizes, resolutions, and OS versions
Layouts saved in native resource formats
Worlds best Android designer available in Visual Studio
iOS coming soon
UI design inVisual Studio
![Page 17: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/17.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
Xamarin - Architecture
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
![Page 18: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/18.jpg)
DEMO Xamarin integrated to
Visual Studio
![Page 19: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/19.jpg)
MVVMCross
![Page 20: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/20.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
Separate Reusable Code into a Code library
![Page 21: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/21.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
MVVMCross
![Page 22: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/22.jpg)
MVVMCross: What is?
MVVM Implementation for multiple platforms
Native, Cross-Platform, Portable, Reusable C#
![Page 23: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/23.jpg)
Code Evolution 1
• Single Mono for Android• Simple – it Works• Good separation of UI from “Model”
code
But• No testing• Portability by cut/paste
![Page 24: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/24.jpg)
Code Evolution 2
• PCL code• Data binding in UI• XML got bigger• Code overall increased in size
![Page 25: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/25.jpg)
Code Evolution 3
• Cross Platform• 100% shared application logic• 100% shared test harness
![Page 26: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/26.jpg)
General Android client and iOS client
Architectures
![Page 27: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/27.jpg)
Architecture of a Mobile App• Xamarin Mobile Apps
share the same architecture across all platforms
• Up to 95% shared code, depending on the Patterns you use
• UI is platform-specific, utilizes the Platform SDK projections
• App Code is in C#• Can reuse existing .NET
Library
UI
App code(C#)
Components
.NET Lib Code
Platform SDK Binding
Shared
Platform specific
Platform specific
![Page 28: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/28.jpg)
Platform Comparison
Package .app .apk .xap
Typeof(Screen) Controller Activity Page
Typeof(Control) View Widget Control
UI Files (xml) .xib .axml .xaml
Default UI Pattern MVC MVC MVVM
![Page 29: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/29.jpg)
Basic Android Architecture
Linux Kernel
Android Framework
Application
Dalvik VM
Activity
Service
Content ProviderBroadcas
t Receiver
Mono VMXamarin .apk
• Mono VM + Dalvik Run Side by Side using a bridge
• Mono VM is Faster than Dalvik
• Interop Directly with Android OS + Dalvik
![Page 30: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/30.jpg)
Basic iOS Architecture
iOS SDK
Mono
Xamarin.iOS
C# Code
MonoTouch.dll
Mono Compiler
Native ARM
Assembly
![Page 31: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/31.jpg)
Is not just a Mobile App, is a Modern App
![Page 32: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/32.jpg)
CrossPlatform Mobile App Development
Tools
![Page 33: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/33.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
Xamarin
![Page 34: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/34.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
Pair Xamarin.iOS build Host
![Page 35: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/35.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
References
Mobile CrossPlatform Developer Economicshttp://www.visionmobile.com/blog/2014/02/developer-economics-q1-2014/
MVVMCrosshttp://www.slideshare.net/slideshow/embed_code/15621659 https://github.com/MvvmCross/MvvmCrosshttps://github.com/MvvmCross/MvvmCross/wiki/MvvmCross-Tutorialshttp://xamarin.com/evolve/2013#session-dnoeeoarfj
Xamarinhttp://xamarin.com/msdn-exclusive
Channel 9 Video Series: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Cross-Platform-Development-With-Xamarin
![Page 36: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/36.jpg)
MICROSOFT CONFIDENTIAL – INTERNAL ONLY
References
Mobile WorkForce Technical Overview: http://infopedia/docstore/pages/kcdoc.aspx?k=KC02-23-21345
Mobile Workforce Code and Scripts https://microsoft.sharepoint.com/teams/modernapps/Offerings/_layouts/15/start.aspx#/MobileWorkforce/Forms/AllItems.aspx?RootFolder=%2fteams%2fmodernapps%2fOfferings%2fMobileWorkforce%2fDemo&FolderCTID=0x012000390A00701058EB4EB572AC108FED089C
![Page 37: Xamarin cross platform](https://reader036.fdocuments.in/reader036/viewer/2022081507/554a4a3eb4c905863d8b577a/html5/thumbnails/37.jpg)
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.