5. Op de agenda…
5
1 Wat is Xamarin? Hoe onderscheidt Xamarin
zich van de rest?
Xamarin
2 Wat is Xamarin.Forms? Hoe werkt het? Wat
zijn de mogelijkheden?
Xamarin.Forms
3 DependencyService, Custom Renderers
Deep dive
4 Niet te missen NuGet packages voor het
ontwikkelen met Xamarin
NuGet Nuggets
5 Samenvatting, lessons learned, applaus en
borrelen!
It’s a wrap
8. Verschillende manieren van ontwikkelen
8
Bouw dezelfde app meerdere keren
• Meerdere teams
• Meerdere code bases
• Verschillende tools en talen
silo/vendor
9. Verschillende manieren van ontwikkelen
9
Bouw één app voor alle platformen
• Grootste gemene deler
• Browser fragmentatie
• Cordova, PhoneGap
• Updates niet altijd via de App Store
hybride
10. Verschillende manieren van ontwikkelen
10
Bouw één app voor alle platformen
• Native User Interface
• Native Performance
• Gedeelde code over alle platformen
• C# & .NET Framework (inclusief C# 6.0!)
• Full API Coverage
Xamarin way
12. “
Waarom Xamarin?
12
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.
“
Native performance
16. Hoe gebruik je Xamarin?
16
Xamarin Studio
Windows of Mac
Visual Studio 2010+
Windows
17. Hoe gebruik je Xamarin?
17
Visual Studio
Alles werkt zoals je gewend bent
• Alle platformen in een solution
• Solution te openen in VS & XS
• Alle Visual Studio plug-ins te gebruiken
• iOS & Android designer
18. Hoe gebruik je Xamarin?
18
Xamarin Studio
Geoptimaliseerd voor cross-platform development
• Visual Studio kloon inclusief meeste belangrijke features
• iOS & Android designer
• Snelheid!
24. Wat is Xamarin.Forms?
24
Cross-platform UI framework
te gebruiken op:
• Android 4.0+
• iOS 6.1+
• Windows Phone 8.x
(Silverlight)
• Windows Phone 8.1 (RT)
• Windows 10 (UWP)
25. Traditionele Xamarin vs. Xamarin.Forms
25
Shared UI Code
Up to 99% code sharing,
always some specific
(initialisation) code.
60-80% code sharing
26. What’s included?
26
• 40+ Pages, Layouts en Controls
• Te gebruiken vanuit code of XAML
• Two-way Data Binding
• Navigation
• Animation API
• Dependency Service
• Messaging Center
“If you are used to MVVM
development you should feel
right at home
30. Xamarin.Forms in actie
30
Use a single API to generate native,
platform-specific user interfaces
At runtime, each Xamarin.Forms
page and its controls are mapped to
platform-specific native user
interface elements
“
“
32. To Forms or not to Forms?
32
Xamarin.Forms best geschikt voor:
• Weinig platform specifieke
functionaliteit
• Code sharing over custom UI
• Ontwikkelaars met XAML kennis
Xamarin.iOS/Android best geschikt
voor:
• Veel platform specifieke
functionaliteit
• Custom UI over code sharing
• Veel gebruik van native APIs
35. Ingebouwde platform specifieke features
35
Device.OpenUri
Openen van een URL
Page.DisplayAlert
Toont een messagebox
Device.StartTimer
Acties uitvoeren op interval
Device.BeginInvoke
OnMainThread
UI thread marshalling
Xamarin.Forms.Maps
Toont kaarten en locatiediensten
42. NuGet packages die we allemaal zouden moeten gebruiken!
42
Xamarin.Plugins.Settings
Simple type (user) settings
Xamarin.Plugins.Connectivity
Network connectivity
ACR.UserDialogs
Alerts, loading, ActionSheets
FreshMvvm
Lightweight, easy to use MVVM framework
PropertyChanged.Fody
INotifyPropertyChanged made easy
FFImageLoading
Image caching, effects, etc.
Polly
Fluent exception handling
Refit
Type-safe REST library
Let op! Bij Forms vaak packages ook installeren
op platform project!