📜 ⬆️ ⬇️

Native development, React Native and Flutter: selection criteria

Already at the stage of designing a mobile application, it is important to understand which language is more profitable to use for a particular project. Along with native development (for example, for iOS - Swift or Objective-C, for Android - Java or Kotlin), cross-platform frameworks such as React Native and Flutter are used. We at SimbirSoft offer several criteria that will help in choosing both a business and a mobile developer.



Problem of choice


There are already about five billion smartphones in the world, according to various estimates, up to 80% of them use the Android operating system, and less than 20% use iOS. And yet, each country has its own characteristics, for example, in the US, more than 65% of smartphones work on iOS. When creating mobile applications, it is often necessary to release versions on both iOS and Android. To do this, you can refer to the native or cross-platform ("hybrid") development.
')

Map of popularity of iOS and Android according to the version of DeviceAtlas

Native development is a classic solution that requires writing applications for each platform separately, using different languages ​​and taking into account the characteristics of each platform. When creating multiple versions of a project, several teams work simultaneously.

Thanks to cross-platform frameworks, it became possible to “kill two birds with one stone” at once and prepare versions for iOS and Android using one tool. Among the frameworks especially widespread are:

- React Native from Facebook
for iOS, Android and Windows applications
uses the JavaScript language and the React.js library as the main development tool.

- Flutter from Google
for Android, IOS and Fuchsia applications (for more, see our article on Habré )
uses the Dart language, which is also used for web programming.


The popularity of React Native and Flutter is growing, albeit at different speeds, according to Google Trends statistics .

Native development


Both native and cross-platform development have their own characteristics. We used both approaches in the practice of mobile.SimbirSoft mobile division. Among the advantages of native development are the following:


Hybrid development


Cross-platform frameworks “customize” the application for several operating systems, so there is no need to create unique elements for each platform. As a result:


If the application logic is the same on all platforms and the interface is simple, hybrid development helps to bring the product to market faster. We recommend frameworks such as React Native and Flutter under the following conditions:


Criteria for selection of Native, React Native and Flutter


For business


1. Availability


Some companies, when they contact us for developing mobile applications, mark the cost as one of the most weighty criteria for them. At the same time, the cost and the need for specialists depend on the method of development.

Native

As a rule, a mobile studio has sufficient resources for the native development of an application of any complexity.

React Native and Flutter

There are fewer specialists in these areas in the market. There may be difficulties in developing large applications.

We recommend native technologies to business when the application is designed for long-term work (in other words, “lifetime”). It is also beneficial if there is a need for high performance, complex interface and animation, low power consumption, integration with third-party resources (API, etc.). Native applications are more profitable in the future by reducing the cost of technical support.

Cross-platform technologies are recommended for quick hypothesis testing, development of prototypes and applications with a clear limitation of the useful life, for example, developed for certain events.

Memo for business:

for complex applications, we recommend native development;
for simple applications - hybrid.

2. Speed ​​+ compliance to the task


Time to market (time-to-market) is determined, first of all, by the size of the available team and the features of the mobile application.

Working with cross-platform frameworks can be more profitable and faster if the application is simple, with the same UI, without platform-specific details, such as access to the camera, work with the file system and fingerprints, runtime permissons. Here, hybrid development saves time by reusing almost all of the code and the UI for two platforms. However, if it is necessary to create complex custom views, cross-platform development slows down.

Speaking about the development time of a mobile application, it is important to understand that there is no “median term for a hospital”. For example, in our practice we released a banking mobile application in 100 days, now we are participating in the further development of this product. At the same time, there were simple applications (the launch period is about two weeks), and large-scale projects with a development period of more than a year.

3. Security and Perspective


For businesses, when choosing a language, it is important to assess its reliability and safety today from a technical point of view, as well as prospects for further development, risks of obsolescence.

In the matter of reliability, native development is ahead of all its competitors. The development of the main libraries has been going on for more than one year, most of the bugs have already been fixed in them, native languages ​​such as Java, Objective-C, Swift, Kotlin are constantly evolving. Among mobile developers, you can hear opinions that in 2020 the native development on Android will be partially supplanted by Flutter, but for now this is just a guess.

React Native provides all the tools for creating secure mobile applications, an example of which is Skype, Instagram, Facebook and other famous products. Security concerns are only possible when using third-party modules during development. At the same time, JavaScript is actively developing, new features are being released, in the foreseeable future, the risk of obsolescence is minimal.

In the case of development on Flutter, the risks are higher, since the framework is young, the release was released only in December 2018. So far, there are problems, for example, at one time or another, building libraries is available only for one platform, crashes in Android Studio, there are bugs in some plugins and libraries. On the other hand, all this is being finalized and corrected. There is a risk that Google will stop supporting Flutter, as it has with other company projects. However, the Flutter is written in Fuchsia OS, in which some developers see a replacement for Android.

For the developer


Above, we described factors that take into account both the business and the performer. There are also technological criteria, which, in the first place, the project manager takes care of. For example:

- Level of knowledge of native languages ​​and team preferences

Each mobile studio has its own preferences in the choice of technologies. Native development requires the most complete knowledge of the relevant languages. However, due to the use of native tools of the systems, there are fewer limitations and difficulties in customizing or accessing platform-specific tools (unlike React Native and Flutter). If you have experience in JavaScript, a mobile developer can quite easily switch to React Native (no further study of the Dart language, as is the case with Flutter) or Dart (a great advantage of TypeScript will be a big advantage).

React Native uses native modules under the hood. As a result, if there is a need for customization (and this is not supported out of the “box”), it is necessary to work with native modules. For example, in our practice there was a case when it was necessary to customize the Yandex.Map library to display custom visual components on the map.

Flutter, unlike React Native, is distinguished by its own graphics engine. On the one hand, this allows for the development of simple applications not to touch native at all. On the other hand, if you need to access the native, this means additional difficulties (for example, messaging with elementary data types and JSON) and the inability to use native graphic components.

- Threshold of entry

If the developer decides to master a new language, the availability of a community, as well as background information and documentation, becomes an important issue.

Flutter and React Native are constantly developing, they have an active professional community and good documentation. At the same time, native development is ahead of frameworks, thanks to a larger community and more training materials and forums, which describe the processes of developing complex components.

“Cheat Sheet” for selection


The following comparative table will help simplify the selection and answer the question of when this or that implementation method is suitable (or not suitable) for creating a mobile application.



Recommendations


If the choice is made in favor of frameworks, we advise you to pay attention to the following aspects of the work:

Evaluation

You need to test all involved platforms (iOS, Android). It is important to objectively assess the level of knowledge and experience of all project participants so that the estimate in hours does not turn out to be too low. Consider the risk of bugs in the React Native and Flutter frameworks themselves during development.

Design

Some elements are difficult (or even impossible) to render in Flutter or React Native. For this reason, the design must be coordinated with the developers - and before the customer falls in love with the beautifully drawn picture.

CI / CD

React Native does not exclude specific problems with auto-assembly (for example, due to the installation of libraries on different platforms). Need to lay more risk reserve.

Splash screen

The implementation of the splash screen on Flutter is faster than on React Native, where this element can only be drawn natively, with a high probability of bugs. When using React Native on a splash screen with all the draws and bugfixes, it is advisable to save more time.

Layout

When using React Native, the layout on iOS and Android should be carried out simultaneously in order to avoid problems when adapting the layout to one of the systems.

Parallel web and mobile development

If the web version of the application is written in React, less time is spent on developing a mobile application for React Native - due to the same logic of the components.

Debug

If the application is large, on React Native it is easier to test and unit tests. On Flutter, you need to put more time on the bugfix, since the logs are not informative.

Application work with system files

You need to request permission to the sd-card, and it’s not possible with each file to get the name and path. To send a file, you must use ContentResolver. In order to minimize the risks, put in time for all operations related to the file system.

Delivery of assemblies to the client

There are no significant differences from the native development, you can choose any convenient service: Crashlytics, TestFairy, TestFlight.

React Native vs Flutter


We at SimbirSoft use both React Native and Flutter, depending on the nature of the application. We share several observations from our practice that help to foresee the peculiarities of working with this or that framework.



Summing up


The development of native and hybrid mobile applications has its own advantages and disadvantages, which are taken into account by the business and the executor when choosing a technology. Among the most significant criteria are the timeframe and cost of development and maintenance, compliance with the task, safety and prospects, the level of development of the community. Based on his experience, a mobile developer helps to choose the optimal solution for each specific application. We hope that our criteria and comparative table were useful to you. Thanks for attention!

Source: https://habr.com/ru/post/460030/


All Articles