DEV Community

Jethro Daniel
Jethro Daniel

Posted on • Updated on

Why Your Team Should Have Xamarin Amongst Their Mobile Dev Tools

Alt Text

Xamarin is a framework for developing native cross-platform mobile apps, owned by Microsoft.

But in 2019 with the tons of different options for developing cross-platform mobile applications, A Debate in which tool to use for the job always springs up, and i am not here to come and pick any side, while flutter, react native, ionic etc are great and can do the job in most cases, there are just some cases where some other tools shine and can do the job a lot easier than the others.

So, not to waste anytime, i'll share with you the general idea behind xamarin

Approach

Back in 012/013 when xamarin came out, there were other tools in the market, who offered cross platform development, but many of them came with the approach of "Sharing UI First", and not surprisingly, html and css were the first thought process on this which gave rise to the nightmare of using webviews and the framework exposing a set of paltform api's.

Xamarin came with the approach of "Sharing Code First", they looked at the two major platforms, came up with way to embed .Net(C#) into the native api's allowing C# to call platform api's directly.... So in essence we had a framework that can use Native UI(android xml, ios storyboards) and use C# to call native api's...they also went ahead to interop C# with platform native languages, basically allowing you to use java libraries and objective-c libraries directly in your xamarin apps, this was just brilliant, not only can your build apps accross platforms with one language, you could also use platform native language libraries and not have re-invent the wheel.

This greatly changed the cross-platform mobile industry and paved the way for most of the frameworks we have today.

Xamarin later came up with a cooler way to also share UI's which became Xamarin.Forms which is basically a set of controls with abstractions above native UI controls, for example, since android has a button view, and Ios also have a button UIView, why not just abstract the platform implementation and have a xamarin forms Button which at the end of the day is a Button view on android and Button UIView on ios... this approach allowed developers share ui and code without the overhead of complexity or performance.

so, in summary why should i use xamarin ?

  1. You can build mobile apps with native UI's, android xml, and ios storyboards, which would allow for more collaboration with core native developers

  2. You can use java/objective C libraries, xamarin can allow you create C# bindings for java and objective-c libraries, this can basically turn a .aar or .jar java library to a .Net dll πŸ™‚this is cool yeah?

  3. You get the additional benefit of the .Net Framework behind you, with tons of libraries out there like entityframework, this can really make your life as a dev waaay easier

  4. Code sharing, aside sharing your C# code with other mobile platforms, you can also share code with your .Net Core Api's, a desktop application, infact anything that runs .Net 😎

  5. You can decide to share UI's accross platforms with xamarin.forms, which uses xaml, for react-native devs, who struggle with giving up cool frameworks like Vue and react, xaml can also allow you do bindings (MVVM) out of the box with zero dependecies, you can also use CSS to style views πŸš€

In summary, xamarin is a very solid tool, packed with alot of features that can make you build apps in 10x time than any other framwework, it also allows you to build without restrictions. I would advice any mobile team to consider using xamarin amongst their arsenal of weapons.

Top comments (0)