The document discusses developing cross-platform applications with Xamarin. Xamarin allows sharing C# code across iOS, Android, and Windows platforms while using native user interfaces and APIs. Developers can write shared business logic in C# and build separate but optimized user interfaces for each platform. This avoids the need to write code for each platform separately and allows easy updates to shared code.
16. Visual Studio
for Mac (Preview)
iOS, Android, & macOS
.NET development
.NET Core & ASP.NET Core
Tools for Azure
17.
18.
19. Talks to a web service
Parses a data format
Works with a database
Performs processing / business logic
20. UseHttpClient forRESTservices,
can then process with
System.Xml/ System.Json
LINQ to XML
Newtonsoft JSON.net component
UseWCFor .asmx forSOAP
21. SQLiteincluded in iOS+ Android for
local data storage
can be added to WinPhone
Can also store in the cloud – Azure
Mobile Services, Amazon, Dropbox,
etc.
23. 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
Notifications
Settings
Text To Speech
Battery
GPS
Lights
Notifications
Settings
Text To Speech
Battery
GPS
Lights
Notifications
Settings
Text To Speech
26. NuGet isapackage manager for
.NETthat allows you to locate, install,
update and remove shared
components from your projects
right in your IDE
www.nuget.org
27. Several well-known patterns can be
used tobreak dependencies and loosely-
couple components together
referred to as “Inversion of Control”
(IoC)
allow reusable components to call into
platform-specific code (vs. the other
way around)
Locating Services – Inversion of Control
Factory
Servic
e
Pattern
Locato
r Dependenc
y
Injection
28.
29. A/B Testing
Live Update Storage
Push Notifications
Crash Reporting Remote Config. Identity
Tables
Visual Studio Mobile Center
mobile.azure.com
So we know what we want how do we get there? Let’s talk about the state of mobile development.
Multiple Teams
Multiple Code Bases
Expensive & Slow
Positive = Great apps delivered to user’s platform
Negative = Development hampered by multiple code bases & fragmentation
Unhappy Users
Unhappy Developers
Increase in Abandoned Apps
Limited to what is implemented
With C#, used on over 2.6 billion devices, along core classes and access to platform UI, we can find a path to building for all platforms using the right tooling.
CLICK – Windows
For UWP, code is compiled in the cloud and made available for different CPU architectures through the Windows Store as .APPX packages.
CLICK – iOS
On iOS, C# code in compiled Ahead of Time, distributed as a .APP package and runs natively on Apple’s ARM-based devices.
CLICK – Android
With Android, C# compilation and linking results in a .APK file whereby intermediate language code is compiled just in time to run natively on the device.
Here’s a base set of libraries made available as .NET classes through Xamarin on all platforms.
Nuget Packages
If all platforms have a common minimum service available then libraries written by others can be leveraged across all platform and sourced as Nuget packages
Future
This model isn’t perfect because the iteration of C# and the .NET classes provided are not up to date. .NET Standard 2.0 represents a possible future where an increased surface area may become available across a large number of devices.
On top of this we add access to platform-specific APIs.
CLICK – Windows
Here’s a set of clearly Microsoft-centric APIs which are available.
CLICK – iOS
Equally, there are iOS features available. Specifically there is 100% coverage.
CLICK – Android
Also with Android, you’ll get 100% access.
CLICK – All
Anything you can do in Objective-C, Swift, or Java can be done from C# through Xamarin.
Tizen OS
Samsung has announced a preview of its tools using this approach which will open up C#/.NET development of 10s millions of additional devices.
So we know what we want how do we get there? Let’s talk about the state of mobile development.
Coming up next is bubbles
The biggest surprise was the brand new Visual Studio for Mac!
In preview today and is the next evolution of Xamarin Studio.
Includes Azure Tools and .NET Core work loads. More in the future.