When it comes to building cross platform applications, Xamarin is the best framework for cross platform apps and for all good reasons. However, if you’re new to the platform, it’s very common that you may get wound up in the question of whether to choose Xamarin.Forms or Xamarin.Platform for your application development without getting a straight answer.
In this post, we will be taking a brief look at what each platform is and what it has to offer in different situations.
What is Xamarin Native or Xamarin.Platform?
Xamarin is a cross platform app development platform that is based on the concept of MonoTouch and Mono for Android which are simply cross platform implementations of .Net. Programs are written in C# and wrapped with the APIs of different platforms that give them the native feel.
In short, Xamarin lets you create mobile apps for multiple platforms with a native interface.
What is Xamarin.Forms?
Xamarin.Forms is a platform that is based on Xamarin itself. In other words, it is a bit of an enhanced version of Xamarin Native that doesn’t replace its predecessor and has its own separate standing. It allows developers to use a single XAML UI code and target multiple platforms with it.
The overall function of Xamarin.Forms is similar to Xamarin Native and results in incredible cross platform apps with a native UI.
If you take a look at the descriptions above, you’ll notice that it’s quite hard to differentiate between the two which pushes your dilemma of choosing one a little further. Even though the result of using both is similar, there are key differences that lie in the process of development. Let’s take a look at these differences below.
What is the difference between Xamarin.forms and Xamarin.Platform?
Given below are 5 key differences between the two platforms that can help you in making a decision for the perfect platform for your project.
1. Application Development Time
One of the prime reasons why Xamarin Native is kept in such high regard is due to the amount of base code that is shared between the platforms. This reduces the development time significantly and makes the process much faster. However, the maximum limit to the code that can be shared is only 75%.
Now with Xamarin.Forms, things get a little more interesting. The rest of the code that can’t be shared in Xamarin.Platform is the native UI code for the platforms. Xamarin.Forms allows you to use a single XAML code for all the UI of all platforms thereby increasing the code sharing to almost a 100%.
Hence, Application development is a lot faster with Xamarin.Forms.
2. Development Costs
Apart from the time of engagement, the cost of developers has a serious effect on your overall budget. If you choose Xamarin.Forms, all you need is to hire a .Net developer with no other expertise to help you create a stunning application.
In case of Xamarin Native though, you will need a developer who has a good enough experience in the native platforms as well to be able to write a good code for the UI of each. This could add to some extra costs of developer resources.
Xamarin.Forms is a more cost efficient option and definitely a better one if you’re on a tight budget.
3. UI Complexity
The complexity of your application’s user interface and graphics are also a deciding factor. As mentioned earlier, with Xamarin.Forms, even the UI code is shared among multiple platforms. This can set some limits to the complexity of UI that can be easily implemented.
Since Xamarin.Platform allows you to create UI specific to each platform, it becomes easier to add more intense graphics and other such animations. Some things may work well for one platform in a way, it may not work equally well for another and may require some alterations. Xamarin.Platform gives you the flexibility to do this.
Hence, for more complex UIs with more intense graphics and applications, Xamarin Native is the go to option.
4. Update and Maintenance
Since Xamarin.Forms shares almost all of the code for all three platforms, it becomes pretty clear that maintaining and regularly updating the application is a lot easier. This is primarily because all the updates have to be performed on one single code.
With Xamarin.Platform, you have to take care of the base code and then the individual sets of code for each platform separately. There is no unified method to do all of them at once. This adds more time and costs to the maintenance and update process.
Xamarin.Forms is a more feasible option for apps that require incredibly frequent updates.
5. App Functionalities
Many times you might need an app to access a device’s native features. But sometimes, there are features that are present in some platforms and absent in the other. In such a case, if you wish to use these features in the platforms they are available in, a single Xamarin.Forms base code won’t be able to help you.
Xamarin Native, on the other hand, can provide you easy access to these specific native features in specific platforms while the others work in a different way.
Applications with different functionalities for different platforms will be better created with Xamarin.Platform.
So these were a few key differences between Xamarin.Platform and Xamarin.Forms. A direct answer to the question of which framework to choose will be specific to every situation. The differences we pointed out just make it a little easier for you to make that decision.