By Emily Wang
There are many choices available for delivering a mobile solution across diverse platforms today. The right choice can depend on many factors: the required functionality, the target user, and the available budget.
Xamarin can be a good choice – this blog discusses why and when.
If you have not heard of it, Xamarin is a cross platform development tool for building native smartphone apps.
There are many other alternatives, so why would we single out this technology?
I’m a member of Datacom’s Mobile Innovation team, so by nature I’m eager to learn things that would help us to provide optimal mobile solutions. I have a love and hate relationship with Xamarin, but let’s start with the happy journey.
“Native, native, native…”
1) Xamarin builds natives apps, 2) it gives native API access and 3) it leverages native performance. You may have notice that the keyword here is native. In an over-simplified way, it gives better user experience than other forms of cross platform approaches.
In my opinion though, where Xamarin really shines is beyond the build process, in its support for testing and monitoring, the ever-expanding ecosystem, and the business’ awesome team.
Farewell (kind of) to manual testing and costly device procurement
One of the obvious problems for any mobile app project is device procurement, especially for the Mobile Innovation team. We are all gadgets fans and would love to have all the devices on earth. However, it is also a double-edged sword as nobody wants to test manually on all devices. Plus, it’s costly given how quickly new devices come to the market.
Xamarin offers Xamarin Test Cloud, which allows automated app testing and run the tests on hundreds of real devices in the cloud. You could even save the screenshot or replay the testing video if you want. However there are still things that are not really suitable for automated testing, such as user experience. Additionally, one device can only run one test at a time, meaning that your test result may not be returned when you want it.
Why do my apps crash and who’s using them?
Once the apps are on the market, the next thing businesses care about is how to support and monitor the application’s performance. Xamarin offers Xamarin Insights which provides reporting and app usage details. There are similar, mature monitoring offerings on the market, but it is always nice to have a built-in feature.
Backers and Partners
One of the main reasons that we decided to attend the Xamarin Evolve event is their coverage of enterprise, Mobile Backend as a Service (MBaaS) and platform tracks.
It all sounds too good
Yes and no. It is good, but it is not a silver bullet. When deciding if you should use it, consider the following (this is not an exhaustive list):
Existing skill sets and technology stack
Our team has a strong native development background, which means we are very comfortable and efficient in building with the default, native development approach. However, if your team uses .NET most of the time, Xamarin would come much more naturally.
Community and support
It is always easier to find support and libraries with native development. This is one of the things we miss when we work with Xamarin. Xamarin has offerings to bind libraries but it is never that straightforward.
Limit on user interface (UI) Sharing
This is both a pro and con of using Xamarin. The fact that it respects each platform’s own design principle and allow separate implementation of UI is the right approach. However, it also constrains the extent of code reusability.
It’s great that business logic can be reused on different apps. However, the app’s API should do all the heavy lifting, and therefore remove the unnecessary logic.
If your app requires a lot of logic computation when offline, then Xamarin would make much more sense. For example, if a client requires an app to be used on farms with limited signal, but needs to handle intensive logic on the fly.
I had the great opportunity to attend the Xamarin Evolve conference in Atlanta last month. There are lots of great sessions during the Xamarin Evolve event, if you are only going to watch one, make it the keynote. It is packed with fascinating technologies such as Xamarin Profiler, Sketches app and their own Android player.