Editorials

Xamarin

We’ve been looking at ways to keep from writing code multiple times for different mobile platforms. Today I’m looking at a tool based on C# called Xamarin. Xamarin uses C# as the base code generation tool for all the code that is not platform specific and may be reusable. Code that is transportable could be features such as database access or utilizing web services.

Xamarin development is done using one of three different methods. You can develop using Visual Studio on a Windows machine, but you cannot test or compile for an IOs environment. You can use Xamarin Studio on Windows. This method also cannot compile for IOs. You can also use Visual Studio on a Macintosh allowing you to compile and test IOs applications easily rather than having to send the app over the network from a Windows machine to a Mac.

Xamarin requires you to develop the user interface specific to each platform, using the native code for each. However, since much of an applications code is not user facing it can then be shared across the different operating systems. It provides the necessary hooks in the form of C# libraries translating from Java or Objective C allowing your business logic to be written only once.

If you like writing code in C# you may want to take a look at Xamarin. The neat part is that Xamarin also now supports the Windows phone (no big surprise) allowing you to write code for all three platforms simultaneously.

What’s your favorite tool for writing cross platform software? Share it with us here or drop an Email to btaylor@sswug.org.

Cheers,

Ben