building mobile cross-platform apps forios, android & windows in c# with xamarin
TRANSCRIPT
![Page 1: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/1.jpg)
![Page 2: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/2.jpg)
Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin
Nick LandrySenior Technical Evangelist, MicrosoftAgeofMobility.com@ActiveNick – github.com/activenick
![Page 3: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/3.jpg)
Session Agenda
![Page 4: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/4.jpg)
Audience poll…
![Page 5: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/5.jpg)
![Page 6: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/6.jpg)
Silo Approach:
Build the Same Apps Multiple Times
![Page 7: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/7.jpg)
The Siloed approach: Build native apps multiple timesMultiple teams and multiple code bases are expensive and slow
+
+
-
✗
![Page 8: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/8.jpg)
Write Once,Run AnywhereApproach
Lowest Common Denominator
Browser Fragmentation
• App Generation.
• Web Browser in a
Native Wrapper +
Platform APIs.
![Page 9: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/9.jpg)
The write-once-run-anywhere approachHTML Hybrid scenarios (Semi-native apps) like Cordova (i.e. PhoneGap)
✗
![Page 10: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/10.jpg)
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/Mono
CoreCLRAzure
Shared C# Client/Server
![Page 11: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/11.jpg)
C# and Xamarin’s unique approachThe best of all worlds
![Page 12: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/12.jpg)
![Page 13: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/13.jpg)
How Does Xamarin Run C# on iOS or Android?
![Page 14: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/14.jpg)
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
C#
![Page 15: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/15.jpg)
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
C#
![Page 16: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/16.jpg)
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
C#
![Page 17: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/17.jpg)
![Page 18: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/18.jpg)
All 3 characteristics are required for a truly native app
Xamarin is native in all 3 ways
Native User Interface
Apps are built with standard, native
user interface controls for easy and
familiar interactions
Apps have access to the full spectrum of
functionality exposed by the underlying
platform and device
Apps leverage platform-specific hardware
acceleration, and are compiled as native
binaries, not interpreted at runtime.
High-fidelity API Access
Native Performance
![Page 19: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/19.jpg)
Xamarin exposes 100% of the native APIs
for iOS, Android and Windows
![Page 20: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/20.jpg)
Anything you can do in Objective-C or Java
can be done in C# with Xamarin using Visual Studio
![Page 21: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/21.jpg)
Native Performance
Xamarin.iOS does full Ahead Of
Time (AOT) compilation to
produce an ARM binary for
Apple’s App Store.
Xamarin.Android takes advantage of
Just In Time (JIT) compilation on the
Android device.
![Page 22: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/22.jpg)
Always Up-to-Date
Full support for:Google Glass, Android Wear, Amazon Fire TV
![Page 23: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/23.jpg)
![Page 24: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/24.jpg)
•
•
•
•
•
Xamarin: How much?
Yes!
![Page 25: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/25.jpg)
Development Environment
Xamarin Studio
PC or Mac
Visual Studio Plugin
VS 2010/2012/2013/2015
![Page 26: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/26.jpg)
Xamarin Studio
![Page 27: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/27.jpg)
![Page 28: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/28.jpg)
![Page 29: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/29.jpg)
Xamarin + Xamarin.FormsWith Xamarin.Forms:
more code-sharing, native controlsTraditional/Classic Xamarin approach
Shared UI Code
![Page 30: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/30.jpg)
What’s included
✓ 40+ Pages, layouts, and controls
(Build from code behind or XAML)
✓ Two-way data binding
✓ Navigation
✓ Animation API
✓ Dependency Service
✓ Messaging Center
Shared C# App Backend
(non-UI code)
Shared UI Code
![Page 31: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/31.jpg)
<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"x:Class="MyApp.MainPage">
<TabbedPage.Children>
<ContentPage Title="Profile" Icon="Profile.png">
<StackLayout Spacing="20" Padding="20"
VerticalOptions="Center">
<Entry Placeholder="Username"
Text="{Binding Username}"/>
<Entry Placeholder="Password"
Text="{Binding Password}"
IsPassword="true"/>
<Button Text="Login" TextColor="White"
BackgroundColor="#77D065"
Command="{Binding LoginCommand}"/>
</StackLayout>
</ContentPage>
<ContentPage Title="Settings" Icon="Settings.png">
<!-- Settings -->
</ContentPage>
</TabbedPage.Children>
Native UI from shared code
At runtime, each Xamarin.Forms page and its
controls are mapped to platform-specific native
user interface elements
Use a single API to generate native, platform-specific user interfaces
![Page 32: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/32.jpg)
![Page 33: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/33.jpg)
Xamarin.Forms Pages
Content MasterDetail Navigation Tabbed Carousel
UIViewController Activity Page
![Page 34: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/34.jpg)
Xamarin.Forms Layouts
Stack Absolute Relative Grid ContentView ScrollView Frame
![Page 35: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/35.jpg)
40+ Xamarin.Forms Controls
ActivityIndicator BoxView Button DatePicker Editor
Entry Image Label ListView Map
OpenGLView Picker ProgressBar SearchBar Slider
Stepper TableView TimePicker WebView EntryCell
ImageCell SwitchCell TextCell ViewCell
![Page 36: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/36.jpg)
![Page 37: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/37.jpg)
![Page 38: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/38.jpg)
Shared Projects
![Page 39: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/39.jpg)
NuGet
![Page 40: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/40.jpg)
Portable Class Libraries
![Page 41: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/41.jpg)
Choosing a Code Sharing Option
![Page 42: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/42.jpg)
Native Dev: Platform Tools or Xamarin?
Platform Tools (Windows, iOS, Android)
• Default native method to build apps
• Free development tools & SDKs
• Requires learning at least one language &
SDK per platform (C#, Java, Objective-C)
• Design, develop & maintain completely
separate apps for each platform
• More learning resources available
• Books, web sites, blogs, training,
StackOverflow, videos, larger
community, etc.
• Yet, iOS developers are (kinda) starting all
over with Swift
Xamarin / Mono
• Reuse existing C# skills & source code (but
you have to know C#)
• Need to buy an additional tool: extra cost
• Need to learn new tools & techniques
• Still need to learn the specifics of each
platform SDK, app architecture & lifecycle
• Fewer third-party libraries available
• Built-in GUI designer for iOS and Android
• Xamarin.Forms provides native shared Uis,
but there is no XAML designer (yet)
• Vendor lock-in / dependency
![Page 43: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/43.jpg)
Mobile Strategy Considerations
Audience
• General Consumer
Market
• Niche Consumer
Market
• Enterprise Users
• BYOD
Objectives
• Marketing “Checklist”
Apps
• Brand “Reach” Apps
• Weekend Warrior Apps
• Apps for Profit
• Mobile Revolution
Apps
Other Considerations
• Mobile Population
Coverage Target &
Desired Reach
• Expertise
• Resources
• Timeframe
![Page 44: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/44.jpg)
Summary
![Page 45: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/45.jpg)
github.com/ActiveNick/MyWeatherNUI
github.com/ActiveNick/MyWeather
github.com/ActiveNick/BingTranslateDemo
github.com/ActiveNick/HelloWeather
github.com/ActiveNick/AzureChatrforWindows
github.com/jamesmontemagno/MyStocks.Forms
github.com/jamesmontemagno/MyExpenses-Sync
Session Demos
![Page 46: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/46.jpg)
http://channel9.msdn.com/events/Build/2015/3-770
http://aka.ms/ch9xam2015-1
http://aka.ms/ch9xam2015-2
http://aka.ms/ch9xam2015-3
http://aka.ms/ch9xam2015-4
http://channel9.msdn.com/Search?term=xamarin#ch9Search&lang-en=en
Xamarin Videos for Developers
![Page 47: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/47.jpg)
http://xamarin.com/download
http://docs.xamarin.com
http://evolve.xamarin.com
http://xamarin.com/university
http://blog.xamarin.com
http://motzcod.es
http://weblogs.asp.net/wallym
http://www.gregshackles.com
Xamarin Resources
![Page 48: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/48.jpg)
![Page 49: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/49.jpg)
Xamarin Developer Certifications:Be part of an Elite Developer Community
Students have the option to take a certification test and become Xamarin certified. Xamarin skills are increasingly in demand – certifications let the market know you represent top talent.
![Page 50: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/50.jpg)
Online Microsoft training delivered by experts to help technologists continually learn
Hundreds of courses for developers, IT Pros, students, entrepreneurs and enthusiasts
11 different languages
More than 3M students registered
Build your own Learning Plan
All free!
Cross-Platform Development withXamarin & Visual Studio
aka.ms/MVAxamarin
http://www.microsoftvirtualacademy.com
![Page 51: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/51.jpg)
• Universal Windows App Developmentwith Cortana and the Speech SDK
• Available for on-demand viewing now:
http://aka.ms/CortanaMVA
![Page 52: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/52.jpg)
Recommended Xamarin Books
http://aka.ms/Xs5v48
Xamarin Mobile Application Development for Android
(Mark Reynolds)
http://aka.ms/Ndl0jn
iOS Development with Xamarin Cookbook
(Dimitris Tavlikos)
http://aka.ms/S8akz1
Xamarin Cross-Platform Application Development
(Jonathan Peppers)
http://aka.ms/Sl5aj9
![Page 53: Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin](https://reader034.vdocuments.site/reader034/viewer/2022042515/5870805d1a28ab57368b639f/html5/thumbnails/53.jpg)
Thank You!
Slides are posted on SlideShare. Demos are on GitHub.
SlideShare: www.slideshare.net/ActiveNick
Blog: www.AgeofMobility.com
Twitter: @ActiveNick
Mobile Apps: www.bigbaldapps.com
LinkedIn: www.linkedin.com/in/activenick
GitHub: github.com/ActiveNick
Email: [email protected]