Mobile Application Development-Components and Layouts
Xamarin Platform
1. The future of apps
Rui Marinho
Software Engineer
The future of apps
2. The future of apps
Global Overview
MODULES
1 INTROTO XAMARIN
2 IOS DEVELOPMENT USING XAMARIN
3 ANDROID DEVELOPMENT
4 SHARING MORE CODE – XAMARINFORMS
5 UI TESTS
6 INSIGHTS
3. The future of apps
1 - Intro to Xamarin
• What’s is Xamarin
• Xamarin with Visual Studio
• What you require to get started
• Demo – Hello Xamarin iOS & Android
4. The future of apps
500+
partners
10,000+ 1.2M
customers downloads
5. The future of apps
10,000+ customers, 100+ of the Fortune 500
6. The future of apps
Businesses are rapidly appifying
The number of enterprise
applications optimized for mobility
will quadruple by 2016.”
“
7. The future of apps
Make it fast, easy, and fun to
create great mobile apps.
Our mission
8. The future of apps
Stay current
Your priorities when building apps
Works EverywhereNative 5-Star App Integration
9. The future of apps
Xamarin : the complete mobile lifecycle
BUILD TEST MONITOR ACCELERATE
10. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
11. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
12. The future of apps
Silo Approach
iOS WindowsAndroid
Objective-C
Xcode
C#
Visual Studio
Java
Android Studio
No shared code • Many languages & development environments • Multiple teams
13. The future of apps
Write Once, Run Anywhere
App Generator
Lua
Javascript
Actionscript
HTML+CSS
Limited native API access • Slow performance • Poor user experience
14. The future of apps
Xamarin Platform: native UX and shared code
Shared App Logic
BUILD TEST MONITOR
iOS C# UI Android C# UI Windows C# UI
Shared App Logic
ACCELERATE
Shared App Logic
Shared UI
15. The future of apps
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
16. The future of apps
Anything you can do in Objective-C, Swift, or Java
can be done in C# and Visual Studio with Xamarin.
17. The future of apps
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.
18. The future of apps
✓Always Up-to-
Date
Same-day
support:
• iOS 5
• iOS 6
• iOS 7
• iOS 7.1
• iOS 8
• iOS 9
Full support for:
• Apple Watch
• Google Glass
• Android Wear
• Amazon Fire TV
• and much more
19. The future of apps
Xamarin Platform: native apps across platforms
21. The future of apps
2 - IOS DEVELOPMENT USING XAMARIN
• How Xamarin.IOS works
• Demo – iOS simple app – UITableView and
MapKit
22. The future of apps
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
23. The future of apps
Xamarin.IOS Execution Model
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.
24. The future of appsBUILD TEST MONITOR ACCELERATE
Demo
25. The future of apps
2 – Recap
• How Xamarin.IOS works
• IOS App Lifecycle
• Using UITableView
• Using Storyboards
• Using MapKit
• Using Segues
26. The future of apps
3 – ANDROID DEVELOPMENT USING XAMARIN
• How Xamarin.Android works
• Demo – Android simple app – Listview and Maps
• Start with code sharing techniques
27. The future of apps
Xamarin.Android Execution Model
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.
28. The future of apps
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
29. The future of apps
#if Conditional Blocks
• Enable / Disable code based on the target platform
• Platform specific compilations constants :
• _IOS_
• _ANDROID_
• NETFX_CORE
• For subtle differences in the API’s
31. The future of apps
Partial Classes
• Shared Functionality in one code file
Ex: DataModel
• Platform specific code in another code file
Ex: DataModel.IOS
• Partial classes are compiled into a single class
33. The future of appsBUILD TEST MONITOR ACCELERATE
Demo
34. The future of apps
3 – Recap
• How Xamarin.Android works
• Android App Lifecycle
• Using Listview
• Using Intents
• Using Maps
35. The future of apps
4 – SHARE MORE CODE – XAMARIN FORMS
• What’s Xamarin.Forms
• Xamarin.Forms Controls
• Rebuild App using Xamarin Forms
• More code sharing
PCL
MVVM
DI
36. The future of apps
Build native UIs for iOS, Android, and Windows Phone from a single,
shared C# codebase.
Meet Xamarin.Forms
37. The future of apps
Xamarin + Xamarin.Forms
Traditional Xamarin
Approach
With Xamarin.Forms:
More code-sharing, all
native
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Backend
Shared UI Code
Shared C# Backend
38. The future of apps
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# Backend
Shared UI Code
42. Which Xamarin approach is
best for your app?
Xamarin.Forms is best for: Xamarin.iOS / Xamarin.Android is best for:
• Data entry apps
• Prototypes and proofs-of-concept
• Apps that require little platform-specific
functionality
• Apps where code sharing is more important
than custom UI
Learn more: xamarin.com/forms Learn more: xamarin.com/platform
• Apps that require specialized interaction
• Apps with highly polished design
• Apps that use many platform-specific APIs
• Apps where custom UI is more important than
code sharing
43. The future of appsBUILD TEST MONITOR ACCELERATE
Demo
45. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
46. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
47. The future of apps
Android fragmentation
Brand Fragmentation
2012
500
device brands
2015
1,294
device brands
48. The future of apps
iOS diversification
3D Touch
iPhone 6s
series only
Apple pencil
iPad Pro only
Multi Tasking
Only select iPads
iPads
iPod
touch
iPhones
Form factors iOS 9 features
49. The future of apps
Xamarin Test Cloud: automated testing on thousands of devices
50. The future of apps
What’s new in Xamarin Test Cloud?
Integrated
with Platform
UITest 1.0
BUILD TEST MONITOR
Test Recorder
ACCELERATE
51. The future of appsBUILD TEST MONITOR
Demo
ACCELERATE
55. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
56. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
57. The future of apps
Monitoring your app in real time
Is my app crashing? What features are popular?
Does it perform well?
How many people are using it?
What countries are users in?Do users stick with the app?
What devices are they using?
BUILD TEST MONITOR ACCELERATE
59. The future of apps
//Crash Report
Insights.Report(exception);
//Feature Usage
Insights.Track(“Splash Page”);
//Timed Events
Insights.TrackTime(“TimeToSync”);
//User Sessions
Insights.Identify(“Steve”, user_traits);
60. The future of appsBUILD TEST MONITOR
Demo
ACCELERATE
61. The future of apps
//Crash Report
Insights.Report(exception);
//Feature Usage
Insights.Track(“Splash Page”);
//Timed Events
Insights.TrackTime(“TimeToSync”);
//User Sessions
Insights.Identify(“Steve”, user_traits);
62. The future of apps
We wouldn’t have caught the bugs as early as
we did without Xamarin Insights. No other
suppliers offered the kinds of benefits we’ve
seen from Xamarin. The ability to trace a user
journey so we can see exactly what led up to an
issue and receive detailed information about
crashes has been tremendously helpful.”
“
Yos Noor
Head of Research and Innovation
reed.co.uk
63. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
64. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin 4: the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
BUILD TEST MONITOR ACCELERATE
65. The future of apps
What’s Xamarin University?
BUILD TEST MONITOR
Reduced renewal
pricing
Over 60 classes Guest Lectures
and office hours
Certification:
Be recognized for
being a mobile
and Xamarin
expert
ACCELERATE
66. The future of apps
Train developers for mobile
and keep skills current
Test any app on 2,000 real
devices in the cloud
Xamarin : the complete mobile lifecycle
Use C# to build native
apps for iOS and Android
Monitor performance and user
behavior in live apps
BUILD TEST MONITOR ACCELERATE
67. The future of apps
How to buy: a la carte
All Xamarin customers get
+Free Test Cloud time
+Free Insights crash reporting
68. The future of apps
Xamarin Ultimate
xamarin.com/ultimate
BUILD TEST MONITOR ACCELERATE
69. The future of apps
evolve.xamarin.com
April 24-28 Orlando, FL