The power of Xamarin and Xamarin.Forms

The power of Xamarin and Xamarin.Forms

Have you ever gotten tired of having to develop the same thing multiple times? This is a common issue when working with mobile applications, this issue is caused due to the variety of different operating systems that exist and contain a large user base. The top 3 operating systems currently in the market are Android which finished with 86.8% of the market share in the 3rd quarter of 2016, followed by iOS at 12.5%, Windows Phone at 0.3% and other devices at 0.4%. Now imagine in order to get your app working for each of these operating system it requires you to develop the same app in 3 different programming languages (excluding other devices)!

Grafica1

Well here’s the good news, everyday technology keeps advancing and we have more tools available. One of those tools is Xamarin. Xamarin has been around for a while now providing a growing set of components and capabilities that allow developers to create and ensemble new and better apps with less effort and it less time. Xamarin proposes “Write Once, Run Anywhere” Now wouldn’t that be great? But wait what’s the catch? Well nothing really, since Microsoft purchased Xamarin early 2016 guarantying that this product will be around for a while and be continuously growing. To top it off Microsoft officially made Xamarin free for developers to use!

One of the best things about Xamarin is that the applications are compiled natively and therefore run just as fast as native apps! This is the big difference between other frameworks that allow you to write once, run anywhere. Another great thing about Xamarin is that apps are written in a very familiar language to most developers, C#. This makes it much faster and easier to learn to create apps using Xamarin since you won’t have to learn multiple programming languages!

So whats the difference between Xamarin and Xamarin.Forms?

Xamarin.Forms was originally developed for simple applications that are form based. While Xamarin has more capabilities due to the fact that you have native access to each OS. Now don’t get me wrong you can also tap into each native OS using Xamarin.Forms but there are more restrictions and once you start dipping into this world it quickly becomes more complicated than developing the app in native Xamarin.

One of the main benefits of developing in Xamarin.Forms is that the views are also shared between platforms making your code approximately 85% shareable while in native Xamarin you share roughly 70% of your code (Percentage may vary depending on the app your developing and its need to access native OS functionalities). Views in Xamarin.Forms are developed using Xaml, the disadvantage to this is that not all controls are available therefore in order to get some controls you need to render them natively on each platform. However the advantage of using Xaml is that you can now share your views between each platform. With Xamarin.Forms constantly improving in the majority of cases all the controls you’ll require are readily available (and if it isn’t most likely there is a nuget already made). While in previous versions of Xamarin.Forms, Xaml was interpreted, giving Xamarin a slight edge over performance. Now it is compiled with the rest of the app improving its load time.

Imagen1

Conclusion

Xamarin allows developers to develop in a common language between the three most widely used operating systems minimizing the learning curve. Aside from lowering the learning phase developers aren’t required to replicate a large portion of the code for each operating system, now their code can be shared between these different platforms. For the developer there’s many benefits and while other tools for cross platform development also offer shareable code the normally lower the quality of loading times for their applications. This is where Xamarin excels most other frameworks since it is known for being just as fast as native apps.

When your projects require development under one operating system, tapping into many native features or require many custom controls, Xamarin may be the option for you. When these requirements don’t exist, Xamarin.Forms is the better option. Reaping you the benefits of code sharing to its fullest.

References

Xamarin Native vs Xamarin.Forms:

https://tim.klingeleers.be/2016/01/22/xamarin-native-vs-xamarin-forms/

Smartphone OS Market Share, 2016 Q3:

http://www.idc.com/promo/smartphone-market-share

Share This