3. Open Source (MIT License)
• Xamarin.iOS
• Xamarin.Mac
• Xamarin.Android
• Xamarin.Forms
• Bindings & Plugins
Free and included With Visual Studio
(including free Community Edition)
10. Anything you can do in Objective-C, Swift, or Java
can be done in C# and Visual Studio with Xamarin.
11. ✓Always Up-to-Date
Same-day support:
• iOS 5
• iOS 6
• iOS 7
• iOS 7.1
• iOS 8
• iOS 9
• iOS 10
Full support for:
• Apple Watch
• Apple TV
• Google Glass
• Android Wear
• Amazon Fire TV
• and much more
12. 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.
14. Model – View – View Model
View View Model
Model +
Services
Commands
Binding +
Value Converters
Native UI projects
Xamarin.iOS
Xamarin.Android
Windows Apps
Core Portable Class Library
Shared between all platforms
15. MvvmCross
MVVM Framework for Xamarin.iOS, Xamarin.Android, Windows Store, UWP,
Mac and WPF
Open Source (www.github.com/MvvmCross)
Install from Nuget
Lots of plugins (official and 3rd party) on GitHub and Nuget
Most contributors are active on Xamarin Chat (https://xamarinchat.slack.com
invite from http://xamarinchat.herokuapp.com)
17. Where should you go from here?
Our GitHub to see the sample code http://bit.ly/SVCCTasks
The meetup page to join us and learn more http://bit.ly/SVMobileNet
Home – It’s the last session of the day (but come back tomorrow…)
Hinweis der Redaktion
We’ll learn a little about Xamarin and MVVM but most of the session is a live coding session where we’ll build a cross platform ToDo app.
The goal is to make you aware and curious about Xamarin cross-platform app development.
Has anyone heard about Xamarin?
Xamarin is now owned by Microsoft.
You no longer need an expensive subscription to create decent apps with it.
Only some advanced tools require the enterprise license (which is included with Visual Studio Pro/BizSpark)
Xamarin is also open source
Xamarin Studio is free on Mac and PC
So… why use Xamarin…
Let’s look at the traditional silo approach:
For Individuals: Difficult/Impossible to master multiple platforms.
Time is spent on each platform, implementing the same thing.
Multiple Teams and multiple Code Bases
Expensive and Slow
Positive = Great apps delivered to user’s platform
Negative = Development hampered by multiple code bases & fragmentation
Now, for the Xamarin approach:
UI built natively per platform, leveraging C#
C# + XAML for Windows
C# + XML for Android
C# + XIB or Storyboards for iOS
One shared app logic code base for iOS, Android, Mac, Windows Phone, Windows Store, Windows
It means one team for all platforms
You only need to master one language, one framework, and one dev environment
With Xamarin it isn’t just your front end in C# - it is your full backend server as well.
With Azure, or even on Linux running Mono or the CoreCLR, your app is fully C# end to end!
Examples:
Sharing the Model classes between a Web API server and the mobile clients.
Sharing helper methods and support libraries.
Using the same libraries from nuget everywhere (same code for encryption for example)
C# and .NET have been around for 15 years.
They are mature language and framework, but still under active development with new features added every year.
It’s a mature and proven platform.
It’s also moving towards open source cross platform with .NET Core.
You can think of iOS and Android developments the same with Xamarin.
We have all of our .NET namespaces and libraries, and Xamarin give us 100% API coverage of each iOS API in it’s SDK that we access with C#.
If you wanted to use the new SiriKit for example, you can with Xamarin.iOS
The same is true for Android as well.
Yes, anything you can do in Objective-C, Swift, or Java can be done in C# and Visual Studio with Xamarin.
Updates are usually available on day 1 of the final Apple OS release.
iOS 10 is already on 43% of devices.
Android 6.0 (last year’s release) is only on 19% of devices. Android same-day support isn’t as important as it is with iOS
Xamarin realizes how important having iOS ready is, because within 24 hours a large portion of iOS users upgrade
Apple has a developer preview, where Xamarin has alphas ready. Google does not offer this.
Android versions are usually 4 to 8 weeks out for a stable release, but alphas and betas are usually earlier.
Android on the other hand is much different. After 4 months on the market Android 4.4 only had 1% adoption
Independent performance testing found Xamarin almost on par with Swift, about the same as Java, and much faster than Objective-C.
The differences between Swift/Java on each platform and Xamarin are not noticeable.
The compromise with Xamarin isn’t performance, it’s native 3rd party libraries which are harder to integrate (requires binding to C#)
However, open source projects written in Java, Swift or Objective-C are very easy to convert to C#
How many of you already know MVVM architecture?
Basically, you have:
Data binding controls in the Views, to properties and commands in the View Models
Properties that raise a notification changed event when a value is set
Commands to react to events in the UI layer
Pros:
Separation of concerns
Decoupling the UI code from the logic
Code reuse and testability
Cons:
Overkill for small UI oriented projects
As with every framework, the more you use it the better you become
Unlike other MVVM platforms that support Xamarin, MvvmCross wasn’t built for WPF or for Windows Phone and adapted to Xamarin; it was cross platform from day 1
Plugins are used to make platform specific code easy to use from the shared Core project (for example using GPS, local file storage or taking a picture)
Open source with active participants
In version 4.3, and soon 5
Lots of plugins available and growing