Globalcode – Open4education
Xamarin – Me interessei por Xamarin, e
agora?
Vinicius Quaiato | @vquaiato
Microsoft MVP | Xamarin Certified Mobile Developer | Veggie | Biker
Globalcode – Open4education
w w w . l a m b d a 3 . c o m . b r
Av. Angélica, 2318, Cj. 11 | Consolação - São Paulo - SP
11 2386.1886 | contato@lambda3.com.br
Globalcode – Open4education
Agenda
O que é Xamarin?
Conhecendo a suíte
Como iniciar com Xamarin?
O que eu preciso?
Globalcode – Open4education
SPOILER!
Globalcode – Open4education
Você vai precisar de um Mac!
Globalcode – Open4education
No final a dica é: use o Google
Globalcode – Open4education
Xamarin – Your Complete
Mobile Solution
Globalcode – Open4education
Develop
Globalcode – Open4education
Silo Approach
iOS WindowsAndroid
Objective-C
Xcode
C#
Visual Studio
Java
Android Studio
No shared code • Many languages & development environments • Multiple teams
Globalcode – Open4education
Xamarin’s Unique Approach
Shared C# codebase • 100% native API access • High performance
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Mobile
Globalcode – Open4education
iOS
MapKit UIKit iBeacon CoreGraphics CoreMotion
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
Globalcode – Open4education
Android
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
Globalcode – Open4education
Development Experience
Globalcode – Open4education
Visual Studio Integration
Globalcode – Open4education
Xamarin Studio – Mac
Globalcode – Open4education
Meet Xamarin.Forms
Globalcode – Open4education
Xamarin + Xamarin.Forms
Traditional Xamarin
Approach
With Xamarin.Forms:
More code-sharing, all native
iOS C# UI Windows C#
UI
Android C# UI
Shared C# Backend
Shared UI Code
Shared C# Backend
Globalcode – Open4education
Layouts
Pages
Stack Absolute Relative Grid ContentVie
w
ScrollVie
w
Frame
Content MasterDeta
il
Navigatio
n
Tabbed Carousel
Globalcode – Open4education
ActivityIndicator BoxView Button DatePicker Editor
Entry Image Label ListView Map
OpenGLView Picker ProgressBar SearchBar Slider
Stepper TableView TimePicker WebView EntryCell
ImageCell SwitchCell TextCell ViewCell
Controls
Globalcode – Open4education
Plugins for Xamarin
Globalcode – Open4education
Shared C# Backend
Globalcode – Open4education
Platform
Specific
Code
What if we didn’t have
to write this code?
What if we could
access it from shared
code?
UI+APIs UI + APIsUI + APIs
Battery
GPS
Lights
Notificatio
ns
Settings
Text To
Speech
Battery
GPS
Lights
Notificatio
ns
Settings
Text To
Speech
Battery
GPS
Lights
Notificatio
ns
Settings
Text To
Speech
Globalcode – Open4education
TextToSpeech
Speak(“Hello World”);
AVSpeechSynthesizer SpeechSynthesizer
Globalcode – Open4education
Plugins for Xamarin
Common API
Globalcode – Open4education
Test
Globalcode – Open4education
Globalcode – Open4education
On Mobile, Quality is Hard
5
2
0
2
0
3
5
OS
versions
Devices
Langua
ges
Locales
Screen
9
19
K+
39
57
27
15
OS versions
Distinct
devices
Languages
Locales
Screen sizes
Manufacturers
Globalcode – Open4education
Globalcode – Open4education
Globalcode – Open4education
Introducing
Xamarin.UITest
Globalcode – Open4education
xamarin.com/testcloud
Globalcode – Open4education
Device Remoting
Tests are performed one at the time,
which consumes more time and delays
bugs detection
Automated Testing
Test on thousands of devices simultaneously,
saving lots of time and detecting
bugs more quickly
Approaches to Mobile
Testing
Globalcode – Open4education
Build
Globalcode – Open4education
Visual Studio Team
Services
• Code
• Work
• Build
• Test
• Release
Globalcode – Open4education
Visual Studio Team
Services - Build
Globalcode – Open4education
Visual Studio Team
Services - Test
Globalcode – Open4education
Visual Studio Team
Services - Release
Globalcode – Open4education
Distribute & Monitor
Globalcode – Open4education
Globalcode – Open4education
HockeyApp
Globalcode – Open4education
Xamarin – Your Complete
Mobile Solution
Globalcode – Open4education
Comece hoje
xamarin.com
Globalcode – Open4education
Free 30 Day Trial - xamarin.com/university
Unrivaled Mobile
Development
Training
Live unlimited mobile development training from
mobile experts, in your time-zone, on your
schedule, and as often as you'd like.
Globalcode – Open4education
O Caminho das pedras…
Globalcode – Open4education
Xamarin
xamarin.com/download
developer.xamarin.com/guides/
developer.xamarin.com/guides/#ios
developer.xamarin.com/guides/#android
developer.xamarin.com/guider/#xamarin-forms
Globalcode – Open4education
Apple
developer.apple.com/
developer.apple.com/documentation/
developer.apple.com/support/developer-id/
developer.apple.com/library/content/documentation
/IDEs/Conceptual/AppDistributionGuide/Maintainin
gCertificates/MaintainingCertificates.html
Globalcode – Open4education
Android
developer.android.com/
developer.android.com/guide/
Globalcode – Open4education
Estudos
university.xamarin.com/
xamarin.com/resources
youtube.com/user/MicrosoftBrasil/search?query=xa
marin
meetup.com/Xamarin-Monkey-Hub-Sao-Paulo/
youtube.com/channel/UCFaQBRaoHrAxcGoeY8E5jvQ
Me interessei por Xamarin, e agora?

Me interessei por Xamarin, e agora?

Editor's Notes

  • #8 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #9 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #10 Multiple Teams Multiple Code Bases Expensive & Slow Positive = Great apps delivered to user’s platform Negative = Development hampered by multiple code bases & fragmentation
  • #11 UI build natively per platform, leveraging C# C# + XAML C# + XML C# + XIB One shared app logic code base, iOS, Android, Mac, Windows Phone, Windows Store, Windows
  • #12 You can think of iOS and Android development the same with Xamarin. You can see we have all of our .NET namespaces and libraries, but Xamarin give us 100% api coverage of each iOS API in it’s SDK that we access view C#.
  • #13 The same is true for Android as well.
  • #15 Single Solution for iOS, Android, and Windows Leverage Entire Microsoft Ecosystem: ReSharper Team Foundation Server Azure ASP.NET Favorite Code Coverage and Profiling Tools Starter Compatible Visual Studio 2012, 2013, and 2015 including Community Edition
  • #16 Xamarin Studio on Mac offers: Android, iOS and Mac development World Class IDE with great features: Code Analysis Upload to Test Flight Git & Subversion Integration Code Completion Code Navigation Easy transition from Visual Studio The same Solution & Projects open in BOTH Xamarin Studio and Visual Studio!
  • #17 Xamarin Forms is a new set of APIs allowing you to quickly and easily write shared User Interface code that is still rendered natively on each platform, while still providing direct access to the underlying SDKs if you need it.
  • #18 We see here the Xamarin approach we talked about earlier This enables you to be highly productive, share code, but build out UI on each platform and access platform APIs With Xamarin.Forms you now have a nice Shared UI Code layer, but still access to platform APIs You can start from native, pick a few screens, or start with forms, and replace with native later
  • #19 First you have a set of pages for each screen of your application There are things like Content, and MasterDetail which gives you a nice flyout With a tabbed view you get the correct look on each platform iOS on bottom, Android on top, and on WP you have a Pivot control Inside of a page are layouts A lot of options from something simple like a stack panel to complex and powerful grids
  • #20 You have more than 40 controls, layouts, and pages to mix and match from. These are all of the controls you have out of the box, you can of course create your own. What is unique is you get the native control and have access to it. Consider an Entry Field On iOS it is mapped to UITextField Android it is EditText Windows Phone it is a TextBox
  • #21 A unique aspect of Xamarin.Forms is an abstraction over the user interface, but what about the platform specific functionality that makes these devices so special? That is where plugins for Xamarin come in.
  • #22 What is this stuff that we talk about up here?
  • #23 This is the platform specific code no matter how you are developing traditional Xamarin or with Xamarin.Forms. However, many platform APIs are the same bit of functionality, but with different APIs. What if we had 1 API?
  • #24 For instance text to speech, what if we could just say “Speak” and it would speak text with the underlying API.
  • #25 This is what Plugins for Xamarin are for! 1 API for all common APIs: Camera GPS Settings Notifications Battery And so much more!
  • #26 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #27 Well there are several challenges that we must overcome as mobile developers including….
  • #28 First let’s take a look at the shear number of configurations there are between iOS and Android. As iOS progresses this number is only set to increase, and on Android it is already a HUGE number of configurations to even think about testing. iOS: 7, 7.1, 8, 8.1, 8.2
  • #29 OpenSignal is a global app that publishes an annual report on Android device fragmentation based on the distinct Android device types that download their app. This is their August 2015 data, with an astonishing 24,000 device types using their app, up by 60% from just last year. Different device operating systems, form factors, screen sizes, resolutions, chip sets, and manufacturer modifications make it difficult to know that your app will work well on all devices
  • #30 Looking at just a few of the screen sizes of Samsung devices you couldn’t even fit all of them on the screen, so how do you handle this problem?
  • #31 This is where Xamarin.UITest comes in to help with this shift. Xamarin.UITest is a framework that ties in directly to the Nunit testing framework to write the UI tests. You can even run them directly against a simulator for free to do regression tests on your applications. Freely available for testing on a Simulator*
  • #32 Take test scripts and test again thousands of physical devices! All Xamarin subscribers get free device time! Check store.xamarin.com for details.
  • #33 Approaches to Mobile Testing
  • #34 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #39 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #40 Anything Else! App Insights Google Analytics Flurry
  • #42 Xamarin is your complete mobile solution. Xamarin Platform is usually what you hear about which is building native iOS, Android, Mac, and Windows Apps all in C# However Xamarin offers a wide range of products for developers to go mobile including Test Cloud, Hockey App, and a way to learn all of mobile with University.
  • #43 Get started today with free 30 day trial of Xamarin at xamarin.com