article-spots
article-carousel-spots
programs
Hard skills

Native or cross-platform development? What should a novice mobile developer choose?

14 Oct 2020

What does a mobile developer need: native or cross-platform development? Evgenii Kamyshanov, a leading iOS developer from EPAM office, shared his opinion on the nuances of both approaches to mobile application development.

 If you want to become a mobile developer, then the answer is obvious: you need to choose any of the native development environments and throw yourself into Objective-C/Swift for iOS or Java/Kotlin for Android. In this case, all the capabilities of the system are at your service, you can control almost everything. 

If you have a desire to create a program that will work on phones as well, then you can choose something that you like or in what you have noticeable experience: C ++, React Native, Xamarin, or a large number of JS frameworks for cross-platform development. Also, you can keep creating your own [responsive] websites. 

I am skeptical about the very idea of ​​cross-platform development on such different (and diverging) platforms as Android and iOS. None of the vendors like “unreliable” developers trying to sit on two chairs at the same time. Everyone is trying to bind programmers to tools and environments, and no trend towards convergence can be expected in the foreseeable future. What can I say, Apple in this race even abandoned OpenGL, the most cross-platform of all libraries after Curl, but now they have their own Metal, which seems to do the same thing, only better and in a different language. 

On the other hand, very often mobile development is about creating two applications that look the same for some network service. Customers are not always willing to pay for two products that look completely different, so the demand for cross-platform development technologies exists and, admittedly, is quite high. Programmers are also willing to save money, especially if they want to sell the mobile application, they do not want to learn Swift/Kotlin, but they know a bit of JS/C#. 

Cross-platform development brings with it a lot of non-obvious nuances. All universal solutions are forced to build sandcastles: either relying on complex and fragile technological solutions (like Xamarin), or mobile JavaScript engines such as React Native. At the same time, platform vendors do not even think to support any of the solutions, and each update to the native SDK is a big headache for any cross-platform framework. Not to mention such system-specific features as access to a camera, keychain, or even a photo gallery, which everyone tries to bypass with varying level of success. Developers who have chosen the universal path are held as hostage by their framework, and often the development that promised significant savings turns into a serious battle. 

It is also common in cross-platform solutions to sacrifice user experience (UX): many frameworks try to use controls that are as general as possible for both systems, and this solution is almost always equally inconvenient for everyone: it slows down, or it is out of style, or it consumes a battery. You can continue the list yourself. 

Cross-platform applications, which cores are written at a low level, the most common for all operating systems, stand apart: in languages ​​such as C/C ++. In this case, the use of code serving business logic is generalized, and the interface is written for each platform separately. Ideally, you could avoid duplicating a critical part of your application while maintaining the user experience specific to each platform. However, in real life, everything is more complicated. For example, Dropbox tried to live with a low-level core for several years, but in the end, they gave up for many reasons, and they are now happy with native platform applications. For those who are interested in their story, welcome to read the article on this topic. 

In my opinion, the savings on cross-platform frameworks are always illusory. Perhaps, in some trivial projects, where the application is just a version of the main website, super-optimized for mobile phones, the generalized approach works. Otherwise, you risk repeating the scenario of Dropbox. If you want to be a mobile developer, I advise you to invest in learning the platform. This knowledge will always pay off, even if you have to participate in a cross-platform project.