Today we would like to dwell on the issue of choosing between native and cross-platform development for mobile applications. As practice has shown, this is a pressing dilemma for both customers and novice developers who want to gain the most useful experience for their future careers. So we share the experience of our department and some conclusions that we made for ourselves under the cut.

If you are faced with the task of developing some kind of mobile application, the choice of platform depends on two factors: “What programming languages ​​do you know?” and “What are your challenges?”

When it comes to a single developer, he will not be able to make an application for iOS and Android on anything other than React Native, if he is familiar only with Java Script. But on the other hand, using the cross-platform RN framework, a person can make a working application for two (or even more) operating systems.

Programming in the native environment requires knowledge of the respective languages. For Android, it’s Kotlin and / or Java, and for iOS it’s Swift and / or Objective-C. In principle, you can get by with one of two for each platform, especially since Google is actively developing Kotlin, and Apple is making great efforts to improve Swift. 

An interesting situation with Flutter, another popular cross-platform framework. To work with it, you need to know the typed programming language Dart. It is already quite popular among programmers, especially enthusiasts, so there are more and more people wishing to program on Flutter (including creators of mobile versions of eBay and Aliexpress.

Thus, if we are talking about a small team or a proud freelancer in general, the development arsenal will be limited to those competencies in programming languages ​​that already exist.

Tasks requiring native development

The second aspect is the challenges facing the development team. The advantage of cross-platform development is the speed (one application on two platforms) and the cost of the project. But sometimes other requirements are important to the customer: 

Performance. If you need to achieve maximum performance from the application, then only native development is suitable for you. Even though Flutter copes with animation perfectly, the maximum return on the computing subsystem of the device can be obtained only in the native environment, without using intermediate libraries. 

Application size.If you need to make the application as compact as possible, for example, if you are developing for specialized devices, or in the case of a really large volume of the application itself, native development will help to reduce it at times. 

Support for low level features. Sometimes, a developer needs to access the components of a smartphone directly. This may concern a gyroscope, compass, fingerprint recognition module, or any other iron. As a rule, this requires native programming. This also applies to the encryption functions necessary for the banking sector. 

The most advanced features.Finally, all platform innovations are reflected in native languages ​​on the day of release. They appear on the framework a little later – if these are very important updates, and much later if this is something of secondary importance. Take, for example, virtual reality VR – its support in RN and Flutter is implemented only at a basic level, and you can achieve all the effects only in native environments.

The nuances of complex projects

However, if the application is something more complex than displaying web content on a mobile device, you need to keep in mind that cross-platform frameworks are also associated with the native. 

Often you have to edit the code of some components or write your modules in native languages. That is, in practice, it turns out that native languages ​​in most cases are not required for cross-platform development, but you still need to know them!

Mix – mix but do not shake

Sometimes they ask us: “Why develop using RN or Flutter, if the team still has to recruit native developers?”. But this is only a superficial opinion, since when conducting projects, the same RN has its advantages. For example, on React Native it is much more convenient to describe the interface, but for many projects this is completely enough. 

Thus, often logic and low-level moments are encoded on the native, and the interface is created on Flutter or RN. For example, we recently needed to connect Yandex.Metrica to a project on React Native. But in RN there was no relevant metric – only the old version was supported, which did not work. It was necessary to make improvements on Java for Android and on Objective-C for iOS in order to implement full support for Yandex.Metrica.

When we developed the application for Internet radio, the Android version used a player that does not support metadata in the stream and does not show the artist and the name of the composition. We had to open the source code, add the processing of metadata and compile a full-fledged module in Java to connect it to the application on RN.

Appearance and different platforms

Another aspect is the appearance of the application. On the Internet, it is often said that the appearance and behavior of some elements may differ on different platforms during cross-platform development. However, this does not happen often, and even if a problem arises, it is easy to fix it if there are developers on the staff who are familiar with native languages. 

In addition to the minuses, the development of the interface on cross-platform frameworks has big pluses – there are additional bonuses. For example, thanks to the active support of Microsoft, today React Native Desktop exists, which allows you to write an application for Windows, again, relying on JS alone. By the way, up to a certain version, desktop Skype was implemented on React Native.

Flutter is actively developing a web direction that allows you to make a browser application. We have already tested in practice that this approach will work – both on the desktop system and on the mobile. But, of course, the appeal to low-level components will not be supported – this applies to the gyroscope, compass and other hardware. 

For example, applications of the British service Moneypex are built on this principle . To develop all their applications, including the web, they use Flutter.

Conclusion 

To summarize, we’ll say that in our team most of the development is carried out cross-platform, however, there are more native developers in the state. 
The fact is that quite a lot of libraries have already been created and cross-platform development takes less time than coding an application twice on two different languages.

In addition, most applications are client modules that display some part of the web and offer fairly simple functions. in this case, it simply does not make sense to use native development. 

In the meantime, coding small additions or fixing something in the frameworks themselves in native languages ​​is much faster and easier than initially doing all the work on the native. Therefore, in fact, today effective mobile development requires the use of frameworks to increase the speed and reduce the cost of projects, as well as knowledge of all native languages ​​to implement support for low-level functions and to file the frameworks themselves when you encounter another artifact or bug.