Pros and cons of development on Xamarin

    When embarking on the development of applications for iOS and Android, most of them primarily consider recognized native technology stacks as Objective-C, Swift, and Java as development tools. However, there are many other ways to create effective and easy to use mobile applications. The Xamarin application development platform is one of them. In this article, we will conduct an in-depth review of the Xamarin platform in comparison with native and cross-platform solutions for mobile development in the market.

    What is Xamarin?

    When it comes to key mobile application development tools, Xamarin is impossible to ignore. Xamarin is a relatively new tool based on the principles of Microsoft technology. But today, his community has over 1.4 million developers.

    The Xamarin platform was created by the developers of the open platform Mono, which was in the free .NET implementation, which was first introduced in 2001. However, unlike its predecessor, Xamarin existed solely as a commercial project until the company was acquired by Microsoft.

    Xamarin is a special tool, because it uses a single C # language to create applications for all mobile platforms.

    Unlike language-insensitive development solutions, such as Appcelerator Titanium, the Xamarin platform allows you to make native assemblies for target platforms and create high-performance applications with a natural look. From a technical point of view, for cross-platform development, Xamarin uses a single C # language and libraries wrapped in a .NET layer. From the point of view of work and user experience, such applications can be attributed to native ones, that is, specially designed for iOS and Android.

    Despite the fact that the code related to business logic, database access and network communications can be used on all platforms, Xamarin allows you to create a layer of UI code for a specific platform. Thus, Xamarin cross-platform applications look 100% native on any device, providing the best user experience compared to standard hybrid applications.

    The platform has two main forms: Xamarin.iOS and Xamarin.Android. In the case of iOS, the source code is compiled directly into ARM native assembler code (AOT compilation), while Android Xamarin applications are first compiled into intermediate universal code, and then into their native code at run time (JIT compilation). Nevertheless, this approach is not a solution to all problems. Like any other technology, Xamarin has its advantages and disadvantages, which have recently become the subject of heated debate.

    Pros of using Xamarin for mobile app development

    There are several good reasons why Xamarin is used by many companies, including Trello, Slack, and GitHub.

    + One technology stack for development on all platforms

    Xamarin uses the C # language and the .NET Framework to create applications for any mobile platform. Thus, you can reuse up to 30% of the source code, speeding up the development process. Xamarin also does not require switching between development environments: all Xamarin applications can be created using Visual Studio. Cross-platform development tools are provided as part of the IDE at no additional cost.

    + Performance is close to native

    A cross-platform application created using Xamarin can be classified as native, in contrast to traditional hybrid solutions based on web technologies. Performance indicators are comparable to Java indicators for Android and Objective-C or Swift for developing applications for iOS. Moreover, Xamarin's performance indicators are constantly being improved and improved to fully comply with the standards of domestic development. The Xamarin platform offers a comprehensive solution for testing and tracking application performance: The Xamarin Test Cloud, combined with the Xamarin Test Recorder tool, allows you to run automated user interface tests and find performance problems before the application is released. However, this service is available at an additional cost.

    + Native UI

    Using platform-specific UI elements, Xamarin allows you to create an interface. For the convenience of developing the user interface of the application, it is recommended to use Xamarin.iOS and Xamarin.Android separately. This provides the best result.

    + Hardware Compatibility

    Xamarin fixes all hardware compatibility issues using plugins and various APIs to work with the features of common devices on all platforms. Along with access to specific API platforms, Xamarin can also be bundled with native libraries for a particular platform. This allows you to fine-tune and maintain the functionality of the native layer for the platform with low overhead.

    + Open Source Technologies with Corporate Support

    After Microsoft acquired the company in February 2016, Xamarin's licensing policy has undergone a radical change. The Xamarin SDK, including libraries and command line tools, has become open and accessible to everyone under the MIT license, as part of Visual Studio. By eliminating the main obstacle in the form of license costs, Microsoft provided the best conditions for the further development of the platform. In addition, led by Microsoft and supported by Unity, JetBrains, Red Hat, .NET Foundation, Xamarin has become a reliable and powerful technology stack for developing mobile applications.

    + Simple support

    Thanks to cross-platform, Xamarin simplifies support and software updates. You can simply make changes to a single source file, and they will apply to both iOS and Android applications. But this only applies to applications that use common business logic, as well as common code for Xamarin.iOS and Xamarin.Android applications. Thus, this will save you time and money while keeping your applications operational.

    + A complete package of development tools

    Xamarin comes in one set with a full package of development tools: its own IDE system (Visual Studio), Xamarin SDK, testing (Xamarin Test Cloud), distribution and analytics (Hockeyapp and Xamarin.Insights). This way you don’t have to invest in additional tools or integrate other applications to create, test and deploy your Xamarin applications.

    Xamarin Features

    Cons when developing on Xamarin

    - Delays with platform updates

    This is entirely up to the Xamarin development team. It is impossible for third-party tools to provide immediate support for the release of the latest iOS and Android updates: it takes some time to introduce new changes, new plugins, etc. Although Xamarin claims to provide support on the same day, it can still be delays of one to two days.

    - Limited access to open-source libraries

    Native development makes extensive use of open source technology. Xamarin will have to use the components provided by the platform and some .NET resources that are used by developers and consumers. The choice, of course, is not as great as when developing mobile applications for iOS and Android, however, Xamarin components provide thousands of different interface elements: charts and graphs, themes and other convenient and useful functions that can be added to any application with just a few clicks . This platform includes built-in payment processing features (such as Stripe), support for beacons and wearable devices, push notification services, cloud storage solutions, multimedia, streaming and much more.

    - limited ecosystem

    Although the Xamarin platform is growing and developing, and is also supported by Microsoft, it’s obvious that the community of specialists who are familiar with the specifics of Xamarin is much smaller than that of iOS or Android, so finding an experienced developer can be difficult. Judging by information from various sources, the Xamarin community makes up 10% of the total number of mobile developers. Despite the fact that the number of Xamarin engineers cannot be compared with the number of iOS or Android professionals, the creators of the platform support their specialists. For example, there is a special educational institution Xamarin University, which provides a variety of resources and opportunities for practical training of specialists in this industry. Thanks to this support, the learning curve is minimal for experienced C # programmers.

    - Requirement for basic knowledge of a programming language

    When using Xamarin.iOS and Xamarin.Android to create mobile applications with a native interface, you have to write a platform-specific layer of code. Therefore, at least basic knowledge of native technologies (Java / Kotlin for Android and Objective-C / Swift for iOS) is required. However, they do not apply to Xamarin.Forms.

    - Xamarin is not suitable for high-performance graphics applications

    The main advantage of Xamarin is the ability to use code on different platforms. However, this is only about logic, the UI code will be mostly unique to the platform. This will allow you to create games on Xamarin, but a rich user interface or complex animations with a bit of common code make Xamarin unusable.

    - Larger application size

    Depending on the type and complexity, Xamarin applications are usually larger than native ones, sometimes even twice. On Android, the simple “Hello, World” can take up to 16 MB, with most of it being used by linked libraries, the Mono environment, and the Base Class Library (BCL). Thus, an application usually needs additional optimization so that its file size is not too large.

    Features of application development on Xamarin

    - Difficulties with integration

    There is a chance that some problems may arise with the integration of third-party resources with Xamarin. Although most tools and libraries offer full native technology support, compatibility with Xamarin cannot be guaranteed by the manufacturer. Although Xamarin has its own arsenal of components, there is always the possibility that you may need a specific feature or integration in your application that is not provided by the platform.

    Recently, many application developers tend to agree that Xamarin can be considered a native development tool. In fact, there is an opinion that "everything that can be done in an iOS application using Objective-C or Swift, and everything that can be done in an Android application using Java can also be done in C # using Xamarin."

    A source

    Also popular now: