5 REASONS TO USE XAMARIN FOR CROSS PLATFORM DEVELOPMENT
Xamarin is currently the leading platform for creating cross platform .NET applications on Apple MacOS and iOS and Android, whilst still supporting Microsoft Phone and desktop
Xamarin is a product that brings full support for.NET/C# to both Android and iOS. Xamarin is so special because it's fully .NET while being able to produce Android and iOS apps at the same time from upto 90% of the same code base, and apps that are compliant with the distribution requirements of both Google Play and the iOS App Store.
Recently Microsoft purchased Xamarin outright. In addition, Xamarin now offers deeper integration with Visual Studio and produces fully compliant .NET Portable Class Libraries. Clearly Xamarin is a product to pay attention to; the transfer of technology was important to Microsoft as well as the previous Xamarin IDE was the base implementation of Visual Studio for Mac.
If all that doesn't spark your interest in Xamarin, here are five solid reasons you should be using Xamarin for your iOS and Android cross-platform development.
1. Less to learn
Becoming an effective mobile application developer always involves a learning curve. There are things like process lifecycle, UI norms, the platform SDK, etc. that one must learn. Why add one or more programming languages like Java, Objective-C or Swift to the already lengthy list of things you must learn?
If you're an experienced .NET/C# developer you will be immediately at home working with Xamarin. It provides a complete implementation of C# and incredibly thorough implementation of the .NET class libraries in the form of the Mono framework. It's not uncommon for well over 80 percent of one's existing desktop or server .NET/C# code to be compatible with Xamarin although this can vary from project to project as Mono is an open source framework and not everything has been added.
Even if you're not an existing .NET/C# developer, Xamarin will likely reduce the time you spend learning. Android and iOS normally require the use of two separate programming environments: Java and Objective-C/Swift respectively. Very few developers are highly skilled in both of these environments which means the overwhelming majority of developers will have to learn one or both of these environments before beginning a cross-platform project.
Learning the Java and Objective-C/Swift environments is not limited to just the programming languages. There's also the issue of the underlying core classes such as collections, etc. that will require you to understand two different ways of doing the same things, and you only have to try Xcode to yet again appreciate Microsoft's offering all over again!
Using Xamarin, you only need to learn one language, C#, and one core set of classes to be effective on both platforms.
2. No limits
One of the coolest aspects of Xamarin is that it doesn't try to force commonality where none exists. Both Android and iOS have UI and SDK features that are distinct to each platform's appearance and behavior. These features are central to iOS apps feeling like iOS and Android apps feeling like Android.
Some cross-platform application development tools attempt to hide platform uniqueness which results in apps feeling foreign to the platform on which they're run. Xamarin does just the opposite. Xamarin embraces the unique features of each platform.
In addition to the standard .NET classes, Xamarin includes iOS-specific .NET classes and Android-specific .NET classes, each of which expose the unique features of their respective platform. The combination of the core .NET classes with the platform-specific classes allows applications to share core logic across both iOS and Android while taking advantage of the each platform's unique features.
It's worth noting that all native platform features are available as Xamarin has the abilty to bind to the native platforms and call them; although some features may take some effort as they may not be fully documented by their original authors - extensive libraries have already been created using this method which are shared as open source.
3. Faster time-to-market
Xamarin allows us to code application logic once and then share it across both iOS and Android. Compare this to working in the native environments of the two platforms where the logic must be implemented once in Java for Android then the same logic implemented a second time in Objective-C/Swift for iOS.
Put simply, using each platform's native development environment requires that we write more code. Writing more code takes more time. With Xamarin we're able to focus our efforts on building app features once and then shipping the app. Compare this to the native platform environments where we build the app features once for one platform, then we build them again for the other platform, and then finally we ship.
It should be noted however on the issue of time-to-market. Xamarin definitely reduces development time but don't get the impression that it cuts development time in half. It's still necessary to write some code that is unique to each platform such as when creating the UI or interacting with platform-specific features; although using the Xamarin Forms library allows most of the heavy lifting to be done automatically in the UI layer at the expense of making it more difficult to use some specific native features.
4. Fewer bugs
The number one reason that Xamarin tends to result in fewer bugs is the same reason that it provides faster time-to-market: we write less code. As a general rule, the less code we write the fewer errors we're likely to commit.
Xamarin also reduces errors by providing the opportunity for greater test coverage. Any given project has a finite amount of time available for testing. Rather than spending that time writing two sets of largely duplicate tests, we can write a single, more comprehensive set of tests that validate the code for both platforms.
The tendency of mobile platforms especially Andriod but recently also Apple devices to produce multiple device in multiple sizes and capabilties and the inherient nature of the bring your own device deployment strategy has meant that testing for large numbers of platforms can be a complete nightmare - with Xamarin you also get access to the Test Plaform which is a cloud hosted collection of actual physical devices on which automated tests can be uploaded and run - now at the click of button potentially hundreds of platforms can be tested simulatenously and only the exceptions - for example a button that can't be seen in horizonal orientation on a specific platform are identifed and returned to the development team for bug fixing.
Finally there's the issue of skills concentration. Working in the native development environments requires that one of two things happen. In one case, each developer on a team must split their time between the two environments providing less opportunity to become proficient in either environment. The alternative is to split the team so that each developer focuses on one platform or the other. The problem here is the team becomes artificially divided with each team member being limited to supporting and checking only those team members who work on the same platform.
With Xamarin, the whole team is able to focus entirely on working with .NET/C#. This allows each team member's skills to develop more fully and enables the team as a whole to better support and check one another.
5. Readiness for the future
Xamarin is gaining more attention everyday and with good reason. In a world where a variety of mobile platforms coexist, we need a toolset that allows us to support multiple platforms with minimal duplication of work. This just what we get with Xamarin and this should be expected to accelerate after its purchase by Microsoft - let the fun continue .
