To work less and earn more is an aspiration that determines progress in all spheres of human life. This trend has not spared the world of cross-platform mobile application development.
As the popularity of smart technology – smartphones, e-books and laptops – grew, so did mobile platforms.
Let’s take a look at what cross-platform development options exist and what they offer us as creators. Business will knock with its “Wishlist”, and the choice of what to write on, often has to be done by the developer.
One of the first cross-platform frameworks was Cordova (formerly PhoneGap). The first release took place in 2009. Originally developed by Nitobi, acquired by Adobe. As a result of the takeover, the source code for PhoneGap was handed over to the Apache Foundation.
From the official architectural diagram, it can be seen that the basis for rendering is a regular WebView – that is, a regular browser. Despite the fact that this is the oldest framework, it offers only a gentleman’s set of plugins and a bunch of APIs to ensure their interaction. It does not have any specific set of tools. There is a list of services and libraries that are offered on the main page, for example Onsen UI – UI library.
The developer experience is rather ambiguous: in fact, how you organize it for yourself, so be it. You can write everything in jQuery and update the page with F5, or you can put a cozy and familiar set of libraries together and use existing solutions for hot reload.
The debug takes place in the browser console. Debug on device – via a connection from Safari to a WebView running on iOS.
There is also a convenient template mechanism that allows you to generate a project from ready-made third-party boiler plates.
Based on Cordova, Ionic was released in 2013. Over time, Cordova replaced Capacitor while maintaining API compatibility so that the entire existing component base remained functional.
It has its own base of UI components and allows you to implement business logic on any framework from the mighty three (before version 4, it was possible to use only Angular). It is possible to pay for enterprise support. Otherwise, everything said about Cordova applies to Ionic as well. The debug in the browser console, the hot-reload from the framework, works inside the WebView.
Next, we will consider semi-native frameworks, which offer to write in a mixture of CSS + JS (React Native, NativeScript, Appcelerator) or .NET (Xamarin), and at the output get an application that is practically indistinguishable from the native one.
Appcelerator is the least known (0 job postings on DOU), uses its own Alloy framework. There is also a version with Angular support, but it is still in beta, and the movement in the repository stopped in 2108. You can know about it, but there is no practical point in studying.
A quite new cross-platform framework, Hybrid-Native, is based on the principles of Microsoft foundations. It is compatible with absolutely any OS. Xamarin makes possible to create applications that are almost indistinguishable from their native counterparts.
The framework consists of several main parts:
- IOS – class library for C # with access to iOS SDK);
- Android – a class library for C # with access to the Android SDK;
- compilers for iOS and Android;
- development environments: Xamarin Studio IDE (native) or Visual Studio.
In this case, the user interface is created on both platforms independently , while the business logic remains the same for them. Those who strive to make a program interface that will be intuitive to the user, should definitely take a closer look at the capabilities of Xamarin. The platform allows you to save on duplicating business logic significantly and use the same development several times freely. However, it should be borne in mind that to write interfaces for two platforms, you will need to assemble a universal development team.
Developed by Flutter Company does not take over the source code. In fact, it draws a window on the phone screen and displays all the elements by itself.
- Bulk transition to Flutter. It took Flutter just a year to surpass React Native in popularity (although React Native was the most requested platform at the time). Today with Flutter you have a powerful source of learning resources, and the need to hire app developers with a higher skill level.
- Ease of learning. There doesn’t seem to be a language or set of development tools that are easy to learn. However, there is a big difference between when there is clear documentation and standard design patterns, and when you can only find dissimilar documentation and conflicting solutions to seemingly simple problems. Flutter is the first time!
- High speed. Flutter apps are compiled to machine code using graphics and rendering engines built into C / C ++. This is why such apps are fast and reliable. In the cross-platform technology space, this gives Flutter a clear advantage over the competition.
- Cool development. Flutter is built with a great language and fast rendering engine (Skia).
Google invests huge amounts of money in the development of the platform, which is the reason for its rapid growth.
What to choose?
You can give preference to a specific solution only based on the goals of your own project. Focusing on the strengths and weaknesses of the Xamarin vs React Native or another one in this matter is a losing strategy. You need to understand that a cross-platform is, in a sense, a “golden mean” between forming a separate team for development and getting an impeccably high-quality result. This format is ideal for start-up projects. But in any case, the choice must be made based on the assets available. There is no need to think about how promising an ephemeral finished product is, it is much more important to soberly assess the available resources. In this case, the speech is about the existing product, the level of professionalism of the performers, the popularity of the chosen framework, etc.