Mobile app development: Xamarin.Forms — a cross-platform solution that responds to modern challenges

Iryna Hnatiuk

Author

date icon

March 3, 2024

Date

time icon 5 minutes read

Content

It’s been a while since the very first smartphone was introduced to the world, but now hardly anyone can imagine their lives without it. Such popularity gave rise to thousands of mobile apps capable of performing any business task like handling thousands of grocery store orders or hotel room bookings. Mobile devices nowadays aren’t just about calls and messages, they have enormous potential, and many companies are making a lot of efforts to tap into it.

When it comes to mobile development, there is a wide variety of solutions. Today we will focus on one of them — a cross-platform approach.

It is not new, and you must have heard at least something about it. Almost all big companies like Google, Facebook, and Microsoft, offer their cross-platform development solutions and tools. What does “cross-platform” mean, why is there so much hype about it today, and most importantly, how can it help your business? Let’s answer these questions through the example of Xamarin.Forms — an open-source UI framework.

The modern world is accelerating. Companies must keep up to stand a chance of being among the business race winners. And this is where cross-platform development comes to the rescue! We all know about the quality triangle. But do we have to compromise quality for the sake of speed and cost? Sometimes it might be a struggle to achieve all three goals in mobile development, but in my opinion, it’s entirely possible.

Flexibility supports speed

There are at least two reasons why cross-platform tools, and in particular, Xamarin.Forms, can give you high development speed. Firstly, you only need a few software engineers — just one team to create a mobile app working both on Android and iOS. Consequently, it is easier to track progress, and the process is faster and cheaper. The native approach requires at least two teams. Secondly, it is one codebase instead of two — iOS and Android native, which makes it more convenient to add a new feature quickly. Thanks to this flexibility, making any change to an existing app has never been easier.

Xamarin allows reusing approximately 70% of your code — that’s what I can see from my experience, yours might be different. Overall, it is a beautiful idea — to have one place where all UI is declared, and all business logic is written. No worries if you need customization — you always have a possibility and appropriate tools with Xamarin.Forms, and this is where the rest 30% of code usually goes.

Speed results in savings

The perfect business model is the one that gives you maximum income with minimum resources. How about cutting your expenses by 50%? Ok, maybe I am exaggerating a little, but it’s close to reality. This is especially so when you are not 100% sure which of the product’s features should be included initially and which are unnecessary. In this very first iteration of the development process, you will probably start with the Proof of Concept (POC) to minimize risks.

Imagine you are working on the Login screen for your app. It shouldn’t be a complex view — just a few text fields to enter the username and password, maybe some logo above and, of course, the “forgot your password” button. Even with the loosey-goosey estimation, this task may take up to 4 hours to do it separately for each platform. You can spend half that time with Xamarin.Forms with similar results.

The power of tools and community

With all the speed and reusable codebase, is it possible to have a quality product? The engineering team can achieve it in case the tools also meet high standards, and there is a great community to ask about anything. These two things are equally crucial for success. It will not be an overstatement to say that Microsoft’s developer tools are amazing! There is excellent documentation, including a comprehensive description of ways to combine different tools, from writing the first line of code to the delivery of a complete application.

Another aspect to consider is app support. How fast can you adapt it to the new UI design guidelines on the market or update the codebase due to the latest changes in iOS/Android APIs? Xamarin.Forms provide a way to get it all done nicely and efficiently. With C#, it is always possible to figure out how to use even unknown methods, classes, etc., thanks to IntelliSense that works perfectly.

All the program code is separated according to the separation of concerns principle. The UI is done in XAML, and the business logic is in another place, at least this is how it should be. You can update both of them parallelly without harming the code structure and, as a result, the whole application.

Still not sure about cross-platform development and Xamarin.Forms as one of its solutions? The considerable pro argument is the continuous improvement of the technology. Almost every week, there is something new to play with — visual components, features, and possibilities to take the development process to a new level!

Summary: cross-platform vs. native mobile development

Should we forget about native if the cross-platform does such an excellent job for us? Of course, no. A professional approach is to know how everything works on native and understand how to use it on Xamarin.Forms or any other cross-platform solution. The native mobile app development is best suitable for enterprises. In other cases, when you need a POC, and the app might have a lot of rapid major updates in UI or business logic to test the user needs — choose a cross-platform solution.

You may also like