Upload
joe-koletar
View
1.287
Download
2
Embed Size (px)
DESCRIPTION
Presented to the Minnesota Enterprise Mobile User Group on October 22, 2013
Citation preview
Joe Koletar – Mobile Solution Lead
Cross Platform Mobile Development with XamarinC# on iOS and Android
Minnesota Enterprise Mobile November 2013
2 RBA
Technical services across the full Microsoft stack
Microsoft National Systems Integrator
Gold Certified Microsoft Partner 7 Gold Competencies6 Silver Competencies
Named Best Places to Work in the Twin Cities 5 times
Joe KoletarMobile Solution [email protected]
Minnesota Enterprise Mobile November 2013
3 Agenda
Mobile Space
Cross Platform Tools
Xamarin Background
Xamarin Android Demo
Xamarin iOS Demo
Minnesota Enterprise Mobile November 2013
4 User Expectations
The Mobile Challenge
Consumers now have an expectation that any desired information or service is available, on any appropriate device at your moment of need
Forrester Research, The Mobile Mind Shift
Minnesota Enterprise Mobile November 2013
Comscore, Top Smartphone platforms, ending April 2013
5 Mobile OS Market Share
3%Windows
39%iOS
5%Blackberry
52%Android
Market share fracture and ongoing shift means there is no obvious,
single choice.
Comscore, Top Smartphone platforms, ending April 2013
Minnesota Enterprise Mobile November 2013
6 Mobile Wish List
Support multiple platforms - BYOD
Provide a rich, native experience
Get to market quickly
Have an easily maintained code base
Support future flexibility
Do it at a reasonable cost
Minnesota Enterprise Mobile November 2013
7 Mobile Objective
How to develop applications to reach the broadest range of users in the most effective manner for the least cost
Minnesota Enterprise Mobile November 2013
8 Understanding the Trade-OffsPerformance and familiarity increase the closer to platform specific your app gets but so does cost and complexity.
UI Familiarity
Performance
Mobile Web
Native Wrapper
Interpreted Cross Compile
d
Platform Specific
Value for Cost
Cross-Platform Options
Value
Minnesota Enterprise Mobile November 2013
9 Mobile Web
Web site with a mobile customized UI• Detect user device and customize display to
device form factor
• Responsive Design
Minnesota Enterprise Mobile November 2013
10 Mobile Web
Users access the site from device browser
Business/Data Code
iOS
Web Browser
Android
Web Browser
Windows Phone
Web Browser
HTML 5/CSS/JavaScript
Minnesota Enterprise Mobile November 2013
11 Mobile Web
Maintainability
Performance
User Experience
Offline Capability
Sensors
Toolset Choices
Cost
Minnesota Enterprise Mobile November 2013
12 Platform Specific
Native application is written for each platform using platform specific IDE
Minnesota Enterprise Mobile November 2013
13 Platform SpecificNative application is written for each platform
iOS
Native App
Android
Native App
Windows Phone
Native App
Java C#Objective C
Minnesota Enterprise Mobile November 2013
14 Platform Specific
Maintainability
Performance
User Experience
Offline Capability
Sensors
Toolset Choices
Cost
Minnesota Enterprise Mobile November 2013
15 Native Wrapper
Web App is wrapped in device specific code to run as a Native App
Web app is hosted in a chromeless browser window.
Minnesota Enterprise Mobile November 2013
16 Native WrapperWeb app is wrapped in device specific codeAccess to sensors is achieved through bridge
iOS Android Windows Phone
Web View
Bridge
Native API
Web View
Bridge
Native API
Web View
Bridge
Native API
HTML 5/CSS/JavaScript
Minnesota Enterprise Mobile November 2013
17 Native Wrapper
Maintainability
Performance
User Experience
Offline Capability
Sensors
Toolset Choices
Cost
Minnesota Enterprise Mobile November 2013
18 Interpreted
Interpreted applications map a common language to platform specific APIs
−Abstraction layer is provided on top of the native API
−Code is written to run on the abstraction layer
Minnesota Enterprise Mobile November 2013
19 InterpretedApplication is written in scripting language
Script proxies provide access to native widgets
iOS
Script
Interpreter
Native API
Android
Script
Interpreter
Native API
Windows Phone
Script
Interpreter
Native API
Script
Minnesota Enterprise Mobile November 2013
20 Interpreted
Maintainability
Performance
User Experience
Offline Capability
Sensors
Toolset Choices
Cost
Minnesota Enterprise Mobile November 2013
21 Cross Compiled
Cross compiled applications map a common language to platform specific SDK
Minnesota Enterprise Mobile November 2013
22 Cross Compiled
Common business logic is combined with platform specific UI code into native app
iOS
Native App
Android
Native App
Windows Phone
Native App
C# Android UI C# Win Phone UIC# iOS UI
C# Business/Data Code
Minnesota Enterprise Mobile November 2013
23 Cross Compiled
Maintainability
Performance
User Experience
Offline Capability
Sensors
Toolset Choices
Cost
Minnesota Enterprise Mobile November 2013
24 Xamarin – What do you get
Allows programming C# to iOS and Android
Access to .NET Base Libraries
Full featured C# 5.0 support includes:
−LINQ
−Generics
−Task Parallel Library
−Lambdas
−Async
Minnesota Enterprise Mobile November 2013
25 Xamarin – How does it work
Evolved from Mono project
−Open source version of the .NET Runtime
−Ported to various platforms
C# bindings for nearly the entire underlying platform SDKs
−UI code is platform specific
−Supports native User Experience
−Also imposes a learning curve
Minnesota Enterprise Mobile November 2013
26 Xamarin – How does it work
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
Minnesota Enterprise Mobile November 2013
27 Xamarin – Demo
Android
• Hello, World
• Tasky Pro
iOS
• Hello, World
• Field Service App
Minnesota Enterprise Mobile November 2013
28 Tasky Pro Architecture
Shared Code
Data Layer
TaskDatabase
SQLLite
Data Access Layer
TaskRepository
Business Layer
TaskManager
Task
System, System.Core, System.Xml
iOS App
Application Layer
UI Layer
Xamarin.iOS assemblies
Android App
Application Layer
UI Layer
Xamarin.Android assemblies
Minnesota Enterprise Mobile November 2013
29 Xamarin – Licenses
Licenses are per developer, per platform, per year
• Starter – Free, Limited App Size
• Indie - $299, Xamarin Studio Only
• Business - $999, Visual Studio, Email Support
• Enterprise- $1899, 1 day SLA
Minnesota Enterprise Mobile November 2013
30 Links
Xamarin Store
https://store.xamarin.com/
Xamarin Tutorials and Help
http://docs.xamarin.com/
http://forums.xamarin.com/
YouTube Xamarin Channel
http://www.youtube.com/user/xamarinhq
Minnesota Enterprise Mobile November 2013
31 More Links
Tasky Pro Source Code
https://github.com/xamarin/mobile-samples/tree/master/TaskyPro
Tasky Pro Case Study
http://docs.xamarin.com/Android/Guides/Application_Fundamentals/Building_Cross_Platform_Applications/Case_Study%3A_Tasky
Field Service App
http://xamarin.com/prebuilt/fieldservice
Minnesota Enterprise Mobile November 2013
32 Thanks!
Download Slides
http://tinyurl.com/MnEMOctober2013