Introduction to Cross Platform Natitve Mobile Development with C# and Xamarin
Introduction to xamarin
-
date post
15-Sep-2014 -
Category
Education
-
view
848 -
download
2
description
Transcript of Introduction to xamarin
![Page 1: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/1.jpg)
Enabling Developers to Create NativeiOS, Android, Mac, & Windows apps in
C#Presenter’s Name
Presenter’s Contact
Presenter’s Website
Presenter’s Twitter Handle
![Page 2: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/2.jpg)
What is Xamarin?• Xamarin enables developers to reach all major mobile
platforms!
Native User Interface
Native Performance
Shared Code Across Platforms
C# & .NET Framework
![Page 3: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/3.jpg)
Mobile Development Approaches
![Page 4: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/4.jpg)
Silo’d ApproachBuild Apps Multiple
Times
•Multiple Teams
•Multiple Code Bases
•Different toolsets
![Page 5: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/5.jpg)
Write Once, Run Anywhere Approach
Black Box
• Lowest common denominator
• Browser fragmentation
•Developing & designing for 1
platform, happen to get other
platforms
![Page 6: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/6.jpg)
Xamarin’s Unique Approach
•Native User Interface
•Native Performance
• Shared code across
platforms
•C# & .NET Framework
• Full API Coverage
![Page 7: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/7.jpg)
Why C#?
![Page 8: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/8.jpg)
C# Is Awesome
• LINQ Support
• Work With XML Easily XDocument
• Event Handling & Delegates
![Page 9: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/9.jpg)
C# Is Awesome – JSON Made Easy
Json.NET offers simple conversions to and from JSON strings and .NET objects, with SerializeObject and DeserializeObject methods.
![Page 10: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/10.jpg)
See the Difference – Attributed Strings C# with XamarinObjective-C
![Page 11: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/11.jpg)
Probing for properties on an AudioFileC# with XamarinObjective-C
![Page 12: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/12.jpg)
See the Different – Android ItemClickC# with XamarinJava
C# & Async with Xamarin
![Page 13: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/13.jpg)
Async/Await
Write Beautiful & Maintainable Code
![Page 14: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/14.jpg)
Why Xamarin?
![Page 15: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/15.jpg)
Write Everything in C#
iOS, Android, Windows, Windows Phone, Mac
2.5+ Billion Devices!
![Page 16: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/16.jpg)
Xamarin HistoryOver a Decade of Enterprise Production Use
2000
Ximian Founded
2001
MonoStarted
2003
Ximian Acquired by Novell
2009
First iOS product (now Xamarin.iOS) launches
2011
Xamarin Founded
First Release of Xamarin.Android
2012
First release of Xamarin.Mac
LaunchPartnerProgram
2013
Xamarin 2.0
Component Store
Evolve 2013
Xamarin TestCloud
Microsoft Partnership
Reach 200,000Developer
Mark
500,000+ Developers
100+ Partners100+ Components
![Page 17: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/17.jpg)
Anything you can do in Objective-C or Java can be done in C# and Visual Studio with
Xamarin!
100% API Coverage
![Page 18: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/18.jpg)
Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.
Native Performance
Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.
![Page 19: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/19.jpg)
Always Up to Date
Always up-to-date with the latest APIs
from Apple and Google.
Same-day support:
• iOS 5
• iOS 6
• iOS 6.1
• iOS 7
![Page 20: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/20.jpg)
Code Sharing: Accelerate Development
Code-sharing stats from iCircuit, built with Xamarin and featured on the App Store.
Source: http://praeclarum.org/post/42378027611/icircuit-code-reuse-part-cinq
•Up to 90% Code Reuse
• Leverage existing libraries
NuGet Support
![Page 21: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/21.jpg)
Portable Class Libraries
• 1 Assembly• Multiple Platforms• Including:• Xamarin.Android• Xamarin.iOS
![Page 22: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/22.jpg)
Portable Class Libraries Features
• Centralized Code Sharing• How you expect it to work• Debug seamlessly into and out of PCL
• Project/Assembly Sharing • NuGet
![Page 23: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/23.jpg)
PCLs – Well Documented
![Page 24: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/24.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
![Page 25: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/25.jpg)
Distribute EverywhereA Xamarin app is an app, distribute it
everywhere
![Page 26: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/26.jpg)
Products
![Page 27: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/27.jpg)
Xamarin.Mac
Xamarin Studio
Xamarin Test Cloud
Component Store
Xamarin.iOS
Xamarin.Android
Xamarin for Visual Studio
.NET Mobility Scanner
![Page 28: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/28.jpg)
Development Environment
Xamarin StudioPC or Mac
Visual Studio Plugin
VS 2010/2012/2013
![Page 29: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/29.jpg)
Visual Studio IntegrationA single solution:• iOS• Android• Windows Phone• Windows Store
Leverage the entire Microsoft ecosystem:• ReSharper• Team Foundation Server• Your favorite code
coverage and profiling tools
![Page 30: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/30.jpg)
Visual Studio Integration
Debug to:• Emulators• Devices
Integrated into toolbar• Status• Logs• List of devices
Just Click Start Debugging!
![Page 31: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/31.jpg)
Xamarin Studio• Optimized for cross-
platform mobile development
• Explore native APIs with code completion
• World class Android and iOS designers
• Powerful debugging on simulator or device
![Page 32: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/32.jpg)
Android Designer
• Worlds best Android designer
• Available in:• Xamarin Studio • Visual Studio
• Create UI with drag & drop simplicity
• Target multiple screen sizes, resolutions and Android versions
• Layouts saved in standard Android XML files
![Page 33: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/33.jpg)
iOS Designer • World’s first iOS Designer
available in Xamarin Studio (and soon Visual Studio)
• Follows familiar Visual Studio designer idioms
• Supports all UIKit elements
• Edit custom and 3rd party components
• Live preview of changes to properties
![Page 34: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/34.jpg)
Xamarin Component Store
Build Apps Faster
• Add high quality pre-built app components directly from Visual Studio and Xamarin Studio
• Beautiful cross-platform UI controls, cloud services and enterprise backend integrations are just a few clicks away
![Page 35: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/35.jpg)
.NET Mobility Scanner
How mobile is your .NET?• Scan .exe or .dll to determine
compatibility• Generates full report:
![Page 36: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/36.jpg)
Prebuilt Field Service AppApp Features:
• Location-based assignments / routing
• Time recording
• Camera capture of work
• Signature capture
Cross-Platform Techniques
• MVVM pattern
• Xamarin.Mobile
• Signature control from Component Store
• SQLite for storage on all 3 platforms
![Page 37: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/37.jpg)
Prebuilt Employee Directory
App Features:• LDAP-ready: easy integration
into your corporate directory• Multiple search options• The ability to favorite
contacts for easy future access
• The ability to call or email right from contact’s listing
• Gravatar integration
![Page 38: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/38.jpg)
DEMO
![Page 39: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/39.jpg)
Additional Material
Remove Slide
![Page 40: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/40.jpg)
Xamarin Evolve 2013Sold
Out!!
650Conference Attendees
8,400
Live stream hours viewed
#1Trending on Twitter
during keynote
Watch Sessions & Highlights: http://xamarin.com/evolve/2013
![Page 41: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/41.jpg)
www.xamarin.com/evolve
![Page 42: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/42.jpg)
• Test app at UI level
• Takes minutes, not days to get
started
• Test on hundreds of real devices
• Is resilient to visual changes in UI
• Has a delightful user interface
• App Explorer & Custom Tests
![Page 43: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/43.jpg)
Rdio Case Study
![Page 44: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/44.jpg)
About Rdio• Rdio is the leading music
streaming and sharing service started by the founders of Skype
• Rdio is already in 30 countries with over 20 million songs.
• Available in 31 countries
Sharing 50,000 lines of code
“Rdio’s mobile app is also the best looking and best implemented of the three [music streaming apps reviewed].” Wired Magazine
![Page 45: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/45.jpg)
Challenge• Unable to deliver features
on all platforms simultaneously because of multiple, platform-specific code bases
• High costs to development and maintain apps
Sharing 50,000 lines of code
Results• Using Xamarin, Rdio now shares over 50,000 lines of C#
across iOS, Android, and Windows, enabling them to focus on feature-parity and user experience.
![Page 46: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/46.jpg)
“Xamarin offers the best of all worlds. We deliver high performance, native apps that, until Xamarin, were only possible with Objective-C and Java. Sharing over 50,000 lines of code across platforms gives us more time to spend on great user experiences.” Matt Crocker
Director of Client Engineering
Sharing 50,000 lines of code
![Page 47: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/47.jpg)
MarketWatchCase Study
![Page 48: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/48.jpg)
From No Mobile Experience to Quick Success
About Dow Jones MarketWatch• A Dow Jones property with over
16 million visitors per month
• Leading innovator in businessnews, personal finance, and investment tools and data
• Part of the Wall Street DigitalNetwork, which includes WSJ.com, Barrons.com amongothers
![Page 49: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/49.jpg)
Challenge: Meet Skyrocketing Mobile Traffic with a Great App• MarketWatch’s high-end users making
critical financial decisions demand a fast, easy-to-use app
• Web team tasked with buildingmobile app on tight deadlines, but with no mobile experience
• App is very data-intensive - initial attempts with HTML5 couldn’t handle
From No Mobile Experience to Quick Success
![Page 50: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/50.jpg)
Results: • With no mobile experience, team
leveraged Visual Studio to create native iOS app in 6 months.
• Xamarin app replaced existing HTML5 app for better user experience and performance.
• Estimated 90% code-sharing with an Android app that is currently in development.
From No Mobile Experience to Quick Success
![Page 51: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/51.jpg)
Xamarin University•Go Mobile
ProgramLive online training
from Xamarin experts
Lectures and labs
2 coaching sessions
where you meet one-
on-one with expert
Xamarin mobile
developers
•What You’ll Learn• iOS and Android
Fundamentals• Mobile App Lifecycle• Native UI and Controls
• Cross-platform Architecture• Mobile Best Practices• Secure Backend Integration
![Page 52: Introduction to xamarin](https://reader038.fdocuments.in/reader038/viewer/2022102603/54162c2c7bef0ac1768b5dfa/html5/thumbnails/52.jpg)
Xamarin Developer CertificationsXamarin skills are increasingly in demand –
certifications let the market know you represent top talent