C# Everywhere: Cross-Platform Mobile Apps with Xamarin
-
Upload
sasha-goldshtein -
Category
Technology
-
view
345 -
download
3
description
Transcript of C# Everywhere: Cross-Platform Mobile Apps with Xamarin
![Page 1: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/1.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
C# EverywhereCross-Platform Apps with Xamarin
Sasha GoldshteinCTO, Sela Group
blog.sashag.net @goldshtn
![Page 2: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/2.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
everyone in this room is a
mobile developer
![Page 3: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/3.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
The Search for the Holy Grail
End-user experience
Developer productivity
Native
Web/hybrid
XamarinXamarin
![Page 4: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/4.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
The Xamarin Approach
• Fully native apps written entirely in C#
• Visual Studio designer, editor, debugger
• 100% of the native platform API available
• Sharing logic across platforms with PCLs
![Page 5: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/5.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
C# on 2.6 Billion Devices
![Page 6: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/6.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
How Xamarin Works
• C# bindings to 100% of the native API
• .NET runtime installed on the device as part of the application
• Native compilation– iOS: ahead-of-time compilation– Android: just-in-time compilation (like Java)
![Page 7: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/7.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Tools and Platforms
• Xamarin Studio stand-alone IDE– Cross-platform: OS X and Windows– Supports iOS, Android, OS X
• Visual Studio extension– Windows only– Requires OS X build host for OS X and iOS– Supports Windows Phone and Windows 8
targets
![Page 8: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/8.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Xamarin Successes
Rdio
Bosch-Siemens
Calca
![Page 9: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/9.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
DEMOBuilding an Android app in Visual Studio
![Page 10: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/10.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Code Sharing Philosophy
• The view layer usually requires duplication
• The rest of the app (up to 90% code) can be shared
Android UIAndroid UI iOS UIiOS UI Windows Phone UIWindows Phone UI
Shared PCL
![Page 11: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/11.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Platform-Specific Code
• Some platform-specific services are inevitable; hide them behind interfaces
Shared PCLdepends on ILocationProvider
Android layerLocationManager
Android layerLocationManager
iOS layerCLLocationManager
iOS layerCLLocationManager
DI DI
![Page 12: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/12.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
DEMOAdding an iOS app with shared components
![Page 13: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/13.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Even More Code Sharing
• Xamarin.Forms is a cross-platform XAML-based UI library for simple controls
• MvvmCross is an open source library that introduces XAML-like data binding and commands to iOS and Android
![Page 14: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/14.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
DEMOUsing Xamarin.Forms for 100% code sharing
![Page 15: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/15.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Decision Making
![Page 16: C# Everywhere: Cross-Platform Mobile Apps with Xamarin](https://reader031.fdocuments.in/reader031/viewer/2022031722/5562d7ead8b42a63498b50ca/html5/thumbnails/16.jpg)
Join the conversation on Twitter: @SoftArchConf #SA2014
This presentation: http://s.sashag.net/sa-xamarin
Thank You!
Sasha Goldshtein
blog.sashag.net
@goldshtn
s.sashag.net/sa-xamarin