Solutions to create cross-platform applications
2021-01-05
Introduction
In this review we are going to analyze the most popular solutions to create cross-platform applications. With the rapid increase in innovations in technology, developers are continuously looking for development tools that can ease their work and minimize application development time.
Today, in a highly competitive market, companies are also looking for the best ways to improve their businesses. From startups to multi-million dollar companies, applications are in an important place in facilitating business growth and helping them in many ways.
Application development technologies, both native and cross-platform, are in a state of constant evolution. This changing nature of technologies indicates that these topics should be reviewed from time to time to check which of these options is currently leading. Native app development avoids the complexity of creating a sustainable product that spans cross-platform app development and focuses on generating a competent design that stays close to the target platform: Android, iOS, etc. On the contrary, cross-platform frameworks seek to generate an application that reaches as many followers of your brand as possible, by covering a wide number of end devices during the programming and creation process.
3-5 years ago, cross-platform app development was limited to creating only simple mobile apps and games. Over time, new technologies have made cross-platform development more adaptable, powerful and flexible than before. However, cross-platform development still faces challenges such as: performance issues due to inconsistent communication between native and non-native components of devices, maintaining cross-platform applications can be quite complicated, etc. Performance-related crashes can lead to a poor user experience. But these challenges are minimal compared to the benefits it has.
We are going to analyze the most popular platforms (tools) to create cross-platform applications as of December 2020.
ReactNative
React Native is a platform that Facebook launched in 2015 and caused a wave in the market. Within a few years of its introduction, it was already one of the most popular.
# # Pros of React Native:
- Up to 80% of a code base can be shared between platforms, depending on the complexity of the application.
- In addition to code reuse, it allows you to preview the results immediately, in addition to offering ready-to-apply elements, which considerably shortens development time.
- The hot load feature allows developers to see changes made to the code in seconds, not minutes when using native technologies.
- React Native focuses heavily on the user interface and provides a highly responsive interface.
- It also gives you access to native features such as the accelerometer and camera. The result it generates is a high-quality native user interface.
# # Cons of React Native:
- React Native is not completely a cross-platform tool. To use some features like the camera or accelerometer, you have to use native components, so there will be separate code for Android and iOS.
- Since React Native is not built in conjunction with iOS or Android, it sometimes falls behind native platforms.
- React Native lacks consistency when it comes to releasing updates.
- React Native improves development speed, but also increases the duration of the debugging process, especially on Android.
Flutter
Flutter is another free and open source platform for creating native interfaces for both Android and iOS. It is a cross-platform application framework maintained by Google, the same organization that develops Android. Quite often, Flutter is among the most loved frameworks by developers, competing in popularity with React Native.
# # Pros of Flutter:
- The “hot reload” feature allows developers to see changes made to the code in seconds, not minutes, as when using native technologies.
- It is an ideal framework for the development of MVP (Minimum Viable Product). Instead of spending extra money and time on two separate apps, you can quickly create a Flutter mobile app that looks native on both Android and iOS.
- It is based on Dart, an object-oriented programming language that developers have found quite easy to acquire the skill for.
- Has a complete set of widgets in Google's Material Design and in Apple's style with the Cupertino package.
- Flutter has a complete set of widgets in Google's Material Design and in Apple's style with the Cupertino package.
# # Cons of Flutter:
- There is limited TV support with apps built on the Flutter framework, i.e. Flutter does not offer support for Android TV and Apple TV.
- Although by virtue of being developed by Google, there are several libraries with ready-to-implement functionalities, Flutter is still lacking compared to native development.
- Since Flutter-enabled apps use built-in widgets and not platform widgets, the app size is usually larger. Currently, the smallest possible application created with Flutter can weigh no less than 4 MB.
- Google's reputation for creating new projects and then abandoning them is quite famous. We don't know if Flutter will last long or Google will invent something else.
- You have to learn the new language (Dart) that is not very popular or famous at the moment. It is a logical and easy language to learn, but it is new and the popularity of Dart cannot be compared to that of Javascript or Kotlin/Swift.
Ionic
Ionic Framework is an open source UI toolkit for building high-quality, high-performance mobile and desktop applications using web technologies (HTML, CSS, and JavaScript) with integrations for popular frameworks like Angular, React, and Vue. It allows you to create hybrid apps for Android and iOS, as well as progressive web apps.
Ionic supports different frameworks for development, such as Angular, React or Vue.
# # Pros of Ionic:
- Ionic is based on a user interface framework designed specifically for mobile operating systems. It provides numerous user interface components to develop robust applications.
- The Ionic framework allows for continuous product deliveries. From automated native builds to live updates and CI/CD, Ionic Appflow addresses the entire mobile DevOps lifecycle.
- Ionic is supported by a vibrant community of over 5 million developers in over 200 countries.
# # Cons of Ionic:
- Knowledge of Angular becomes almost a necessity if you want to go beyond basic applications.
- The navigation design within the application is complex due to its UI-router which is not so easy to use.
- It is still a hybrid application where the entire graphical interface is displayed within the webview.
NativeScript
NativeScript, like React Native, is an open source framework that helps developers create applications for the Android and iOS platforms. NativeScript applications are built with JavaScript or TypeScript. NativeScript allows developers to build native apps for iOS or Android while sharing app code between platforms. When creating the application's user interface, developers use NativeScript libraries, which abstract the differences between native platforms. NS also supports the use of frameworks like Angular and Vue.js. NativeScript allows direct access to all native platform APIs on both iOS and Android. Thanks to this, you can create completely native applications like those developed with Xcode or Android Studio. Additionally, NativeScript developers can reuse third-party libraries from CocoaPods, Maven, and npm.js.
# # Pros of NativeScript:
- Runs very fast compared to other alternatives.
- Compiles to native code and runs as a native application
- Provides a way to split custom content, including CSS styles, into separate files per target platform
# # Cons of NativeScript:
- The frequency of updates can make it difficult to stay fixed on a common version. This adds additional development time. The benefit is worth it, but it's important to keep in mind that sometimes even an increased bug fix release will require some code changes.
- Sometimes it is also difficult to keep up with fractured dependencies. The nativesript-cli, tns-android, tns-ios, and nativescript-angular dependencies have their own release cycles that are close together, but not tied together, and that has disadvantages when prioritizing updates during a release cycle. Again, the benefit of the update is worth it, but staggered releases add additional complications.
- Documentation is good, but could be better. It is improving, but there is still a delay between adding or refactoring features and documentation updates.
- The plugin ecosystem is open source, which is good, but just like with your own project, the authors of these plugins also need to keep up to date with changes to the repositories, and that's not always done in a timely manner.
Xamarin
Xamarin was launched in 2011 as an independent cross-application development framework, but was later acquired by Microsoft in 2016, giving it more credibility than before. It is an open source framework that was released to solve the problem of mobile app development for more than just a platform. They were very different platforms and it took a lot of resources to create a mobile application.
# # Advantages of Xamarin:
- Xamarin app development uses C#, which means it works seamlessly on a variety of platforms (including Android and iOS).
- Xamarin has a strong community of more than 60,000 contributors from more than 3,700 companies.
- Share over 75% of your code across platforms, for “write once, run anywhere” ease.
- A single technology stack for faster development
# # Cons of Xamarin:
- It is expensive for companies. Xamarin is a framework that is free for individuals and startups. However, companies must purchase a Visual Studio license from Microsoft.
- Xamarin is not recommended for graphics-intensive applications because each platform has a different method of visually laying out screens. It is recommended to implement a complex application in UX/UI natively.
- It also offers limited access to certain important libraries that app developers need for mobile app development.
Conclusions
The pros and cons that I have mentioned in this review are subjective, but in some way they tend to the truth ;). Cross-platform solutions are effective, however, they did not gain enough popularity since their birth due to fragmentation across platforms and their rather complex use. Now that the world of mobile app development is largely divided into two major platforms, Android and iOS, cross-platform mobile app development is expected to see many more advancements in the coming years.