Hardware and software setup

Native or not? Four myths about cross-platform development. Native or cross-platform - what should a novice mobile developer choose? Experts answer Cross-platform programs android ios

Cross-platform development allows you to make a mobile application that will simultaneously function in the iOS and Android environments. This is a budget alternative to creating an application for each operating system separately.

Features of cross-platform development

Developing one application for different platforms is good and bad at the same time. Well, because it can be done faster and cheaper than several applications for each operating system. And this is bad, because the compromise is reflected in the operation of the application.

These features must be taken into account before the start of the project:

  • In a cross-platform environment, the code is written once. To make the application work on a different operating system, the code is translated into another programming language. The time and money spent on development is 1.5 times less.
  • Applications may not work correctly. In cross-platform development, it is impossible to take into account all the nuances of working with the architecture of each operating system, so applications can run slower than those designed specifically for iOS or Android.
  • The interface and design requirements for elements vary from operating system to operating system.. For example, on iOS there is no back button, like on Android. When developing a unified design, this point must be taken into account: in iOS, the button will either remain, but will not work, or it will have to be cut manually, and this additional work with code.

Most transition errors from one platform to another are fixed manually, but it is impossible to completely solve the problems of adaptation to a "non-native" operating system.

So cross-platform development is bad?

No, cross-platform development is fine as long as you don't demand more from it than it can give.

This option can be selected in the following cases:

  • Cover all operating systems on a limited budget. If a the target audience more actively using iOS or Android, you can start with a native application for one operating system. If maximum coverage is important right away, it is better to choose the cross-platform option.
  • Check niche. If there is a promising idea, but there is no certainty that it will work, it is risky to immediately invest a large budget in development. It makes sense to start with cross-platform development, study user reactions and make strategic decisions based on this.
  • The application does not use complex animation and does not perform calculations. These operations seriously load the device, and the cross-platform application is not optimized for the full use of the resources of a particular platform.
  • The application uses only the basic functions of the device. Show information, upload files, use geolocation, place an order - a cross-platform application can handle all this. Deeper integration of device capabilities is required - you will have to choose native development.
  • Corporate application for employees. If the application is developed for narrow internal tasks and people will work with it through personal gadgets, a cross-platform application will be the best option.

There is no universal answer to the question of whether it is possible to use cross-platform solutions for your project. Fill out the form below: we will study your project and select the best option for its implementation.

Mobile applications have become an indispensable companion of our lives. With their help, we can not only have fun and simplify our lives, make purchases or order certain services online, but also promote our business, increase our customer base, and, consequently, multiply profits. And if no one can doubt the need to create an application for their business, then with the choice of the mobile-app type, some difficulties may arise.

All modern applications for mobile devices can be divided into native and cross-platform, and each of these two groups has both its own strengths as well as its shortcomings.

Native applications are applications developed specifically for a specific platform in the appropriate programming language. So, when creating an application for Android, Java is used, and for IOS applications, Objective-c or Swift. When creating such projects, specialists take into account all the features of platforms, paying special attention to UI / UX design, requirements / recommendations of operating system developers, as well as the latest trends in the mobile industry. One specialist will not be able to fully master all of the above languages, therefore, to develop one native product for different platforms, it is necessary to connect different developers, and this is an additional cost, and the development time will be impressive. But at the same time, applications will be "sharpened" for a specific platform, get access to the internal resources and functions of the device and will work as efficiently as possible.

Despite the considerable list of advantages of native development, customers do not always want to spend time and money on their development, connecting several masters to the creation process. The best option in such cases is cross-platform development, which allows you to create applications for any platform using standard web technologies. At the same time, development can be carried out by one person with the necessary knowledge and experience with HTML5, JavaScript and CSS3. Cross-platform developments can be compiled into an .apk file for Android and an .ipa file for IOS. Thus, on the basis of one development, you can get two applications for popular operating systems, spending less time and money on it. However, such developments also have their drawbacks, so it is highly desirable to approach each specific case individually and choose the most appropriate option - native or cross-platform development.

Client and server parts of the application

Most serious applications have their own client side, which is often called the frontend, and a server side, the backend. The frontend is responsible for what you see on the screen of your mobile device, that is, the entire visual representation of the application, including the design, size and location of windows, menus, buttons, arrows, and any other elements. Also, the frontend is responsible for the reaction of the application to certain user actions aimed at moving to different sections of the app, calling up new menus, and so on.

The backend is server part application and located on a remote server that can be located anywhere and managed using a wide variety of software tools. The relationship between the client and server parts is carried out through the API (application programming interface). In other words, the API is a kind of intermediary between the frontend and backend, which transmits requests from the client side to the server, returning the data necessary for the user.

Frontend development

The client part of the application is extremely important, since the user himself will deal with it and the user will depend on the convenience of the frontend general idea about the app. It can be developed both manually, but for this you need to be well versed in HTML5, CSS3 and java-script, and with the help of so-called frameworks. In the first case, the Apache Cordova development environment, which is also commonly known as PhoneGap, is often used. Using this framework, you can create applications for any platform using web technologies that Cordova converts into code that is understandable for a specific platform. Cordova opens up virtually unlimited possibilities for web developers who do not need to learn Objective-C or Swift, Java or Kotlin to create applications for specific operating systems.

While Cordova has no limits in UI and logic, frameworks offer ready-made template solutions. On the one hand, this significantly speeds up and simplifies the development process, since a specialist can use ready-made buttons, lists, input fields, cards, and other UI elements. On the other hand, a specialist can use for development only those tools and elements that are available in the selected framework. The most popular of them is Ionic, which allows you to create cross-platform applications for every taste. This framework has a large built-in collection of standard elements that visually mimic native applications, but their design can be changed if necessary. At the same time, the developer can connect many additional plugins that expand the capabilities of the ionic framework, and the project created on this framework can be launched directly in the browser window and evaluate how it will look and work. application being created without the need for an emulator or installation on a smartphone.

Backend development

While designers and developers with knowledge of HTML, CSS, JS and frameworks are engaged in the client side, programmers of a different profile are engaged in the backend. To configure servers, different programming languages ​​and tools can be used, the main thing is to properly configure their work and interaction with the client part. Here it is necessary to use suitable database management systems (databases). This can be traditional MySQL, Redis, PostgreSQL, or any other database (for example, MongoDB) that is suitable for the implementation of a particular project and in which the back-end developer is well versed. Developers can use PHP, NodeJS, C#, Ruby, Python, Java and other programming languages ​​to create the server side of the application.

Specialists of mobile-studio KitApp approach the issue front end development and backend parts in a comprehensive and maximally responsible way. Our developers will create for you a cross-platform application of any complexity and direction as quickly and efficiently as possible! Contact us and our specialists will promptly advise you on all your questions!

Smartphones continue to win more and more space under the sun, not only as a tool for consuming cat photos and xxx videos, but also as a working tool. Therefore, the demand for mobile development is growing. It is generally accepted that true and cool are Objective-C/Swift for iOS and Java/Kotlin for Android. No doubt, true and cool, but it exists a large number of real-world scenarios where cross-platform frameworks are preferred over native tools.

Some developers expect cross-platform frameworks to solve all their life problems, while others perceive them with hostility. Both "warring camps" have their own misconceptions caused by a misunderstanding of how and what works. This adds fuel to the fire, as emotions are used instead of technical arguments.

Also among developers, especially beginners, there are many myths about cross-platform mobile frameworks. In our article we will analyze the most popular of them. But first, let's look at mobile development through the eyes of a business that gives money for all the IT blackjack.

Why do we need cross-platform tools?

Historically, there has always been competition in the computer market, and each manufacturer provided the optimal set of so-called native (native) tools for developing applications for their operating systems and devices.

Native tools = provided by the owner of the ecosystem.

All other signs of "nativity" are SECONDARY - the behavior and interface of applications, access to OS features, performance, and so on.

In addition, it almost always turned out that native tools are incompatible with each other, not only at the level of development languages, accepted conventions and architectures, but also at the level of mechanisms for working with operating system and libraries. As a result, to implement the same algorithms and interfaces, it was necessary to write an application for several environments in different programming languages, and then maintain it on a “one command per platform” basis. At the same time, the possibilities appearance applications on different platforms are almost always 90% identical. For the sake of interest, compare the implementation of your favorite programs for iOS and Android.

Second important point- Availability necessary knowledge and experience within the team: if they are not, then it will take time to learn.

In order to solve both of these problems, cross-platform development tools (not only mobile) have long appeared on the market, offering:

  • maximize the common code base in a single programming language so that the product is easier to develop and maintain;
  • use existing competencies and specialists to implement applications on new platforms.

Since there are a lot of programming languages ​​(and environments) now (and specialists who know these languages), there are a fair amount of tools for cross-platform development. As an example, we will focus on popular in our area PhoneGap, Xamarin, React Native and Qt.


Now we can talk about myths.

Myth 1. Magic

The most common myth that haunts the minds of budding developers is the belief in super-algorithms (and the super-programmers who created them) that magically turn cross-platform applications into native ones. Something along the lines of "converting JavaScript code to Swift and then compiling a Swift application." This myth is fueled by the developers of cross-platform tools themselves, promising the creation of “native applications” as a result. And it's not that someone is being cunning here, but a rich imagination and a lack of understanding of the basic mechanisms sometimes lead developers to think about shamanistic tricks.

The main principle underlying cross-platform solutions is the division of code into two parts:

  • cross-platform living in virtual environment and having limited access to the capabilities of the target platform through a special bridge;
  • native, which provides application initialization, life cycle management of key objects, and has full access to system APIs.


In order to connect the "native" world and the "cross-platform" world, it is necessary to use a special bridge, it is he who determines the possibilities and limitations of cross-platform frameworks.

When using a bridge, performance is always reduced by converting data between "worlds", as well as converting API calls and libraries.

So, all cross-platform applications must have a native part, otherwise the operating system simply won't be able to run them. So let's take a closer look at what system APIs and mechanisms are provided by iOS, Android, and Windows themselves. Let's move on to the next myth.

Myth 2. Not native!

So, we have a cross-platform part of the application that lives in a virtual environment and interacts with the operating system through the framework infrastructure and the bridge.

All operating systems: iOS, Android and Windows UWP - provide access to the following subsystems (sets of system APIs):

  • The WebView (web browser embedded in the application) is used in PhoneGap-based hybrid applications and acts as a de facto local website runtime;
  • JavaScript engines are used in React Native and its counterparts to quickly execute JS code and exchange data between Native and JS;
  • OpenGL ES (or DirectX) is used in game engines and applications on Qt / QML or analogs for drawing the interface;
  • The UI subsystem is responsible for the native user interface of the application, which is relevant for React Native and Xamarin.


Cross-platform applications have a native part and the same full access to system APIs as "native" applications. The difference is that the system method call goes through the bridge and framework infrastructure:

webview- the application lives in its web browser, similar to a one-page website. No access to native controls (buttons, lists, etc.), everything is based on HTML/CSS/JavaScript. On the other hand, a web developer will feel like a duck to water.

JavaScript engines became popular relatively recently, since a similar mechanism was added to iOS only in version 7.0. Of the features, it is worth considering the need to serialize complex data structures transferred between JavaScript and Native environments into JSON. If we briefly describe such a class of solutions, then in the JavaScript environment, the JS code that controls the native application is executed.

OpenGL ES and DirectX are low-level subsystems and are used for rendering user interface in games and, for example, Qt/QML. That is, when using OpenGL / DirectX, developers themselves draw controls and animations, which can only be similar to native ones. On the other hand, it is a low-level subsystem with very high performance, which is why it is used in cross-platform game engines as well.

All cross-platform applications have a native part, and therefore, potentially the same full access to system APIs as "native" ones. Also, cross-platform applications are assembled and packaged by "native" tools in "native" installation packages. The key question is how the interaction between the cross-platform part and the native part is organized. For example, inside a WebView or using Open GL ES / DirectX, there is no way to create a user interface with a completely native look'n'feel, but there is full access to GPS, Push notifications and other functionality. And JavaScript or C# code can quite freely control the native application and its behavior, providing a completely native look’n’feel.

To summarize - yes, "non-native" in terms of the development tools used (not from Apple, Google). But an application can be completely native in terms of accessing system APIs and provide a completely native look and feel. And we're moving on to the next myth.

Myth 3. Crutch on a crutch

It should be understood here that native APIs are not considered crutches by default (although there are different opinions here), so all the indignation is directed at the cross-platform part. It is obvious that the execution environment (for example, WebView, JavaScript engine or Mono) is also difficult to call a crutch - mature mature solutions with a long history.

It seems that the crutch is how the cross-platform part integrates with the native one. To better understand how different frameworks work, we will use the example of PhoneGap, Xamarin, Qt and React Native to look at those operating system mechanisms that are used to link the cross-platform and native parts.

We'll start with PhoneGap. Below is the top-level architecture of an application based on this framework.



The PhoneGap application is in fact a native application that displays a WebView as the only UI control. It is through him that the interaction with the native part takes place. All standard WebViews in iOS, Android and Windows UWP support the ability to add native handlers for JS properties and methods. At the same time, the JS code lives in its isolated environment and does not know anything about the native part - it simply pulls the necessary JS methods or changes the necessary JS properties. Everything is inside the standard web DOM, which simply adds new elements related to the native implementation.



When creating applications on React Native, the developer will almost always need to implement the native part in Objective-C, Java or C #, and the management of the native application itself will come from JavaScript. In fact, the JavaScript engine is a WebView element that is available separately. The interaction goes through the same JS bridge as in the case of PhoneGap. However, in React Native, the JS code does not manage the web DOM tree, but the native application.

Please note that due to iOS limitations (there is no way to implement JIT), JavaScript code is interpreted on the fly and not compiled. In general, this does not really affect performance in real applications, but it's worth remembering.

Now consider the classic Xamarin.iOS and Xamarin.Android, since Xamarin.Forms (supporting Windows UWP) is an add-on to them.



Xamarin uses the Mono library to interact with the target operating system, which allows native code to be invoked using the P/Invoke mechanism. It is also used to communicate with native APIs in iOS/Android. That is, wrappers in C# are created for all public native API methods, which, in turn, call system APIs. Thus, all system APIs can be accessed from a Xamarin application.

And finally, let's look at Qt, as there are many questions about it from experienced developers.



Qt is a "thing in itself", this has both pluses and limitations. The Qt libraries simply hook into the C++ system APIs found on all operating systems. To draw the user interface, low-level mechanisms are used, but its own graphics engine that supports native styling. At the same time, on Android, you have to access the Java API through a special bridge (JNI bridge), and for Windows UWP, use the Open GL ES to DirectX call converter, since Open GL is not available for UWP.

To summarize: all cross-platform frameworks use the standard native capabilities of operating systems, are mature, created by experienced teams and the open source community with the support of IT industry giants. And finally, it's time for the most "strong" argument.

Myth 4. Slowly

An important trump card that people like to use in disputes about cross-platform frameworks is low performance. Again, depending on what to compare with and in which parrots to count.

Recall that a feature of cross-platform applications is the parallel existence of two worlds connected by a bridge:

  • PhoneGap: HTML/JS and Native Java / Objective-C / C#;
  • React Native: JS and Native Java / Objective-C / C#;
  • Xamarin: Mono and Native Java / Objective-C;
  • Qt: C++ and Native Java/Objective-C.

Thus, when comparing performance, it is necessary to take into account the speed of work:

  • cross-platform part;
  • native part;
  • bridge.

If you type in a search engine, for example, react native vs swift performance, you can see many different tests, and many of them note that performance drops sharply when using the bridge actively, including actively manipulating the UI from cross-platform code. For Xamarin, the situation looks the same - the cross-platform part is very fast and comparable to the native one in data processing, however, when using a bridge, performance may decrease. Qt generally works at the C++ level, which is fast in itself. If we consider solutions based on PhoneGap, then here the performance will be highly dependent on the WebView, but still you should not actively change the UI in the JavaScript code or perform scientific calculations.

Slowly? Yes, performance drops are possible due to inept interaction with the operating system through the bridge. However, the cross-platform worlds themselves are just as fast as the native ones.

Market mobile applications for more than ten years, but it is still rapidly developing. Demand from companies is constantly growing and it still significantly exceeds supply, which leads to a constant rise in the cost of development. One of the solutions to reduce the cost of this process is cross-platform development, when the same code is used on all platforms.

Last time we touched on cross-platform mobile app development and a lot has changed since then. It's time to talk about methods and tools again.

Let's go over the terminology again first.

Native

If developers in the process of writing an application use a programming language accepted for a particular platform, be it Objective-C and Swift for iOS or, such an application will be called native (from English native - native, natural).

Benefits of native apps:

  • interface speed and response. The application responds to clicks instantly, there are practically no delays in animation, scrolling, receiving and outputting data;
  • clear and easy access to the functions and sensors of the device. It is not a problem for a developer to work with geolocation, push notifications, taking photos and videos through the camera, sound, accelerometer and other sensors;
  • the possibility of in-depth work with smartphone functions. As in the previous paragraph, such things as animations, the creation of complex interfaces and the operation of neural networks directly on devices are implemented, perhaps not simply, but predictably;
  • . Native applications usually operate with "platform" interface elements: menus, navigation, forms and all other design elements are taken from the operating system and therefore are familiar and understandable to the user.

There is only one drawback - the high cost of development and support, including because you need to write your own code for each platform.

With the growth of the mobile application market, developers have become not just expensive, but very expensive, and native development is not something that every business owner can afford. But not developing a mobile app could cost you more in the future. Live Typing can help you save money - describe your idea and indicate the approximate budget that you want to meet in.

And not relatives

Cross-platform applications are written for several platforms at once in one language other than native. How can such code work? different devices? There are also two approaches here.

The first is that at the stage of preparing the application for publication, it is turned into a native one for a certain platform using a transpiler. In fact, one cross-platform programming language is "translated" into another.

The second is that a certain wrapper is added to the resulting code, which, already working on the device, translates calls from non-native code to native system functions on the fly.

It is assumed that most of this code can be transferred between platforms - it is obvious that, for example, the logic of making purchases, saving goods to the basket, calculating the route for a taxi, writing a message to the messenger does not change depending on whether the client has Android or iOS. We only need to refine the UI and UX for the platforms, but now, within certain limits, even this can be combined - for example, the hamburger menu is actively used on both Android and iOS. So even making corrections to the interface so that the application meets the spirit and letter of the desired platform is a matter of desire, the necessary speed and quality of development.

Advantages:

  • cost and speed of development. Since the code needs to be written noticeably less, the cost of the work is reduced;
  • the ability to use the internal resources of the company. As we'll show next, cross-platform application development can often be done with the help of existing programmers.

Disadvantages:

  • non-native interface, or at least the need to work with the interface of each platform separately. Each system has its own element design requirements and sometimes they are mutually exclusive. This needs to be taken into account when designing;
  • problems in the implementation of complex functions or possible problems work even with simple procedures due to the errors of the development frameworks themselves. The cross-platform environment only translates requests to system calls and interfaces in a format understood by it, the system, and therefore at this stage both difficulties with understanding and the occurrence of errors within the framework itself are possible;
  • work speed. Since the cross-platform environment is a “superstructure” over the code (not always, but in certain situations), it has its own delays and pauses in processing user actions and displaying results on the screen. This was especially noticeable a few years ago on smartphones, which are more low-powered compared to today, but now, with the growth in the performance of mobile devices, this can already be neglected.

As you can see, these two methods are practically mirror image each other - that the advantages of native application development, the disadvantages of cross-platform, and vice versa.

Popular platforms and tools for cross-platform mobile development

As we wrote above, there are two approaches - turning the code into native at the build stage or adding a specific wrapper that translates calls to and from the system.

Cordova and PWA are two tools that work exactly in the wrapper ideology.


Cordova and HTML5

One of the most popular areas in cross-platform programming, which is often popularly called PhoneGap. In fact, a mobile site is created, which “turns around” with a small platform code that translates calls from the system to the application and vice versa.

All the shortcomings and advantages are expressed here as clearly as nowhere else. You can use web developers (HTML, CSS and JavaScript as the core technologies) and in a month or even a couple of weeks make the first version of the application for relatively little money. Yes, it will slow down in work, it may not have very accurate geolocation, but it will work on all devices and will allow you to at least test the demand from customers on mobile devices.

A huge number of frameworks have been created for this approach, but they all do essentially the same thing. The difference between them is that Cordova (PhoneGap) does not set restrictions and templates for logic and UI for your HTML5 project, while frameworks operate with their own ready-made UI elements that mimic mobile platforms, and its development logic. As an example of this approach, you can specify: Ionic Framework - a wrapper; Framework7, Mobile Angular UI, Sencha Touch, Kendo UI are interface frameworks.

PWA

Fashionable technology from Google is the same web applications, but due to the use of certain technologies (first of all, these are the so-called Service Workers - working in background scripts, and Web App Manifest - a description of the web application in a way that is understandable for mobile system form) they can work as native ones without a wrapper from PhoneGap. They can be installed on home screen bypassing the app store, working offline, working with push notifications, with native functions.

The problem is that not all platforms even now support these "certain technologies". First of all, this concerns Apple, which, apparently, does not like the ability to distribute applications bypassing the App Store.

Taking into account all the shortcomings of HTML5 solutions, many companies have created tools that allow you to write code in one, non-native language, and then it is translated into native. This is how two birds with one stone are killed at the same time: the code base is one, and the applications are as close as possible to the native one.


Xamarin

Microsoft platform. The standard C# programming language for Enterprise development is used, the cross-platform development environment is visual studio. The output is native applications for iOS, Android and Windows. True, relatively large.

React Native

Platform From - Applications are written in JavaScript and using CSS-like styles. The interface is native, and the code is already interpreted on the platform, which gives it the necessary flexibility.

Being a relatively young platform, React Native is obviously (though not catastrophically) suffering from a lack of development tools and documentation.

Flutter

Naturally, such a giant as Google could not get around the topic of cross-platform development of Android and iOS applications. Flutter, while, however, existing only in beta version, professes a different approach from React Native and Xamarin. He does not convert source into the native one, which is executed by the platform, but actually draws a window on the smartphone screen and draws all the elements itself. The language used is the "proprietary" Dart, which Google created as an improved version of JavaScript.

This has both advantages (for example, externally identical interfaces) and disadvantages (for example, redrawing an interface requires a certain amount of memory and CPU time).

The platform is developing rapidly and Google is putting a lot of effort and money into it. But compared to Flutter, even React Native seems like a pretty established and impressive ecosystem.

What to choose

Your head is probably already spinning, but there is still no understanding of what to choose. Let's present a simple list of questions to help you:

  • should somehow work on any device? choose HTML as a basis;
  • Do you have enough funds, are you in no rush and want the highest quality application? You have a direct path to native development;
  • Do you have a "built-in" web developer or just want to quickly and easily try out a mobile app in action? Here you can recommend Cordova/HTML or PWA;
  • Do you have your own CRM system and a C# developer supporting it? take Xamarin;
  • you “want to try”, but you need to make everything beautiful and fashionable? Look to the side React Native or Flutter.

You can also enter from the other side. Look at the functionality you need in the application and go from there:

  • a simple business card application? Take React Native or HTML5 and you will get two platforms for the minimum price;
  • Do you have a high traffic website and need to test the mobile presence hypothesis? HTML5;
  • complex applications with access to desired functions devices? Native Development, Xamarin, React Native.

Cross-platform development is not a panacea

When choosing, you need to proceed from the tasks and existing resources. Cross-platform development is a good and understandable direction, but with its own advantages and disadvantages that you need to keep in mind even before launching a project. A made cross-platform application is obviously better than an unmade native one. You can develop it quickly and cheaply, upload it to the store, and simply check the demand from users - whether someone is looking for an application from you, whether it installs, what functions it uses. Based on the results of such an experiment, it will be possible to decide the fate of the mobile direction in your company and investments in it.

Do you still have doubts and questions about cross-platform applications? Read about how we created an application for quickly getting a subscription to one of the city's sports facilities and try the application for paying for all kinds of services - from utilities to orders in online stores. Better yet, sign up for a free consultation, indicating the approximate budget and brief description ideas or contact our manager Katya by phone

It would seem that here we have cross-platform development, which makes it possible to create universal applications for different platforms. I wrote the application faster, immediately released it everywhere - profit! And no native development is needed. Or is it still needed? We asked our experts about the nuances of both approaches to mobile app development.

"Mobile developer" is a broad term. A developer who implements parts of a mobile operating system is also a mobile developer. And if the goal is to become just such a developer, then you need to start in general with learning C ++, a mobile operating system and the hardware of mobile devices.

If you mean a developer who implements custom mobile applications, then you need to start with native development.

Why is that? Native development allows you to better and deeper explore the capabilities of specific operating systems (and applications for them) and mobile hardware.

From the user's point of view, native development definitely wins. Native applications work faster, their interface is more responsive and familiar to users of a particular mobile operating system, they better use the hardware capabilities of devices, work better offline, and are less “buggy”.

The original idea of ​​cross-platform development is to reduce the developer's labor costs. Briefly, it can be expressed as follows: “I did it once, it works on anything.” The idea is good and correct (from the point of view of the developer), but there are questions about the quality. Any versatility comes with a compromise from the start, and mobile development is no exception.

When choosing the type of development for a particular task, the developer needs to evaluate whether this compromise is acceptable. There are a number of tasks where the use of cross-platform development would be quite justified, for example, in test projects, mobile versions of sites, games using frameworks such as Unity 3D.

At the same time, for projects that solve mobile business problems (with a high load, the need to support offline mode, aimed at long-term development), native development is seen as the only optimal (and for some tasks, the only possible) option.

At the same time, the main disadvantages of native development are the development time (it takes more) and the need for diverse resources (developers in different native programming languages). There are ways to mitigate these shortcomings - for example, to use some kind of mobile application platform (MEAP class) for development, which allows you to create native applications.

Upgrade Downgrade

, Director for Technological Development of the IT company "ID - Management Technologies"

Any cross-platform library or framework is based on the same native mechanisms that directly implement native development. It’s just that in the case of cross-platform solutions, workflows are built in such a way as to “smooth the corners” in terms of bringing the interface of the final solution to a certain common denominator.

As a rule, universalism is not always the answer to the task of creating a working mobile solution: the developer works the better, the deeper he understands the mechanisms of the device various processes from the inside, as they say, "under the hood."

Also, a completely working model would be the simultaneous development basic elements two approaches, there is nothing impossible in such a task of learning on initial stage no. For example, such a scenario may turn out to be quite feasible and promising: start working in a cross-platform paradigm, and in parallel, independently or with the help of colleagues, study what native opportunities exist for developing current solutions and how they can be applied in practice.

In this case, it is easier to achieve a comprehensive understanding of how the mobile development process works in principle, which is called in an end-to-end manner. This is also useful because any, even the most advanced, universal platform lags behind native in its capabilities: hardware and mobile OS manufacturers often work together and constantly increase the capabilities of final solutions - the capabilities of mobile development platforms, especially cross-platform solutions, inevitably lag behind .

New products in the mobile segment appear on the market all the time, some of them are far ahead of their time - take Samsung and its development of a device with a foldable screen: it is obvious that, due to a radically different front-end, existing development platforms are not ready for such things.

This is where deep knowledge of native platforms will help out: only a developer with a deep, systemic knowledge of mobile development, that is, native platforms, can compensate for the natural lag behind hardware and OS. Only such a specialist will be able to increase the functionality of his solution for the latest mobile devices based on not quite advanced development platforms available at the moment.

Cross-platform development is great for prototyping, quickly testing an idea, etc. As soon as it comes to creating truly fundamental products, the developer inevitably comes to the need to deeply study the basic elements of the process, that is, native development.

Upgrade Downgrade

, Dean of the Faculty of iOS Development GeekUniversity, educational portal GeekBrains

Short answer: if there is no experience in programming, then, of course, you need to choose native development. Cross-platform development is good for professionals who are moving from related fields to mobile development. For example, if you are a front-end developer with a good knowledge of JavaScript, using the React Native framework (based on the React framework) you can quickly and painlessly try to master mobile development. Similar to the .NET developer, it will be easier to master the Xamarin framework.

Cross-platform development is also beneficial for the customer - it is easier to find one team of developers who, following a common pattern, will develop an application for two platforms at once.

The advantages are obvious, but what are the disadvantages of multiplatform development?! It is believed that the more complex and subtle the functionality in a mobile application, the more difficult, if not impossible, to implement it with cross-platform tools - this often outweighs all the advantages of universal tools. In my experience, there are several large companies that, with the growth of their application, were forced to abandon cross-platform in favor of native development. Thus, for small projects and, possibly, freelance tasks, it is enough common solutions, and for big projects native ones are better.

The demand for both areas is quite high, but for native development is somewhat higher: at the request of Swift on hh.ru in Russia - 369 vacant, Kotlin - 397, React Native - 111, Flutter - 13 Xamarin - 18. But rest assured, a good specialist in There will be no work in any field.

Upgrade Downgrade

To begin with, it is important to note that any mobile application consists of several layers:

  • UI - what the user sees;
  • business logic - what the application is written for;
  • other platform components - work with the network, databases and other system components that are used by business logic.

Depending on the specific application, the size of the components on these layers can vary greatly. For example, a website's news reader application will be very different from a VPN client.

The development itself can be divided into three types: native, fully cross-platform and hybrid.

native development

In native development, all three layers are written using the same set of tools. Therefore, they can interact with each other without any additional complexity.

Benefits of native development:

Hybrid Development

This type of development combines both of the previous approaches. The business logic layer is built as a "portable" component, and the UI and platform integration is created using standard tools. There are several languages ​​for writing general logic: C/C++ (mature and powerful), KotlinNative (very actively developed), and JavaScript (least common).

Advantages:

  • the most suitable components for this remain native;
  • common logic is created once.

Disadvantages:

  • if a common component will be created by a mobile team, then it is necessary to obtain expertise in another language;
  • there is an overhead for integrating cross-platform components.

What type of development is best to start with?

In order to answer this question, you need to understand what kind of projects you want to create. Small projects can be purely cross-platform and this will be fully justified. Here I would advise you to take a closer look at Flutter.

But today I would start with native development. Firstly, most projects today are created natively. This means that you will have more opportunity to change projects/companies. Secondly, over time it will be possible to move to hybrid cross-platform development. This will allow you to grow in technical matters.

Upgrade Downgrade

In my opinion, it is best to start with native, and then, if you really want to, master one or more cross-platform tools. An exception may be the development of games, since they are mainly written in Unity, and this is a cross-platform engine.

If we talk about the advantages of native development, then for the programmer it means fewer obstacles and large quantity various tools for the job. He will also have more sources of information to solve complex issues that arise in the process of creating an application - it's no secret that there are many more tips and tricks for native development on the Internet than for cross-platform development.

For the end user, native development means that the application will have familiar, predictable interfaces and behavior patterns - provided that the application is written according to all the guides.

A cross-platform application does not always manage to fully comply with the guides of both platforms, and this can create additional difficulties for the developer and user. The simplest example- the situation with the "Back" button: in Android it is present on almost all screens, while in iOS it is not. If you make a cross-platform application without this button, some Android users may experience discomfort.

It is also worth mentioning the differences in development costs. If the project is simple, then the choice of cross-platform development allows you to save the budget, since, in fact, you are not developing separate products for different platforms, but one for all. But if the project grows, then the scales begin to tilt in the other direction, and native development may be more profitable.

As for the speed of applications, cross-platform products are slower. For example, those that are based on web technologies have a browser as a layer, which significantly slows down the application.

Upgrade Downgrade

The choice of a cross-platform or native approach actually depends on two factors: the nature of mobile development that you personally want to do, or the request of employers with whom you are interested in working. So, for example, if we look at Upwork (a platform for finding remote specialists for projects and tasks), we can see a clear preponderance of offers in the direction of Xamarin and React Native. The advantages here are obvious: it is cheap, fast and will allow you to implement projects on all platforms at once. However, if we consider large IT companies with the search for employees in house, then there is a significant emphasis on native development, despite the fact that this type requires more time and is more expensive.

At our company, we prioritize and choose native development because it allows designers and developers to create a smoother, more intuitive UX/UI. In addition, native development gives more flexible control over system functions.

Upgrade Downgrade

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

If you just want to write a program that will also work on phones, then you can not think much and choose what your soul is more in or what you have some notable experience in: C ++, React Native, Xamarin or five hundred thousand JS frameworks for cross-platform development. Or even continue to make your own [responsive] websites.

To be honest, I am rather skeptical about the very idea of ​​cross-platform development on such different (and divergent) platforms as Android and iOS. None of the vendors likes "wrong" developers who are trying to sit on two chairs at the same time. Everyone is trying to tie programmers to tools and environments, and there is no tendency to converge 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 the creation of two applications that look the same for some network service. Customers are not always ready to pay for two products that look completely indistinguishable, so the demand for cross-platform development technologies exists and, admittedly, is quite high. Programmers are also not averse to saving money, especially if they want to sell a mobile application, there is no desire to learn Swift / Kotlin, but JS / C # is already at their fingertips.

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

Also often in cross-platform solutions it is customary to sacrifice what is denoted by the term user experience (UX): many frameworks try to use controls that are as general as possible for both systems, and almost always this solution is equally inconvenient for everyone. Or slow down. Or out of style. Or drains the battery. Continue the list yourself.

Cross-platform applications stand apart, the kernels of which are written at a low level, the most common for all operating systems: in languages ​​like C/C++. In this case, it is customary to generalize the use of code serving the business logic, and the interface is written for each platform separately. Ideally, duplication of a critical part of the application could be avoided, while maintaining the user experience that is specific to each platform. However, in real life everything is more difficult. For example, Dropbox tried to live with a low-level core for several years in a row, but eventually gave up for many reasons, and are now happy with native platform applications. I refer those who are interested to their curious article on this topic.

In my opinion, saving on cross-platform frameworks is always illusory. Probably, in some trivial projects, where the application is just a version of the main site, super-optimized for mobile, the generalized approach works. In other cases, you risk repeating the fate of Dropbox. My advice is if you want to be a mobile developer, invest in learning the platform. They will always pay off, even if you have to participate in a cross-platform project.

Upgrade Downgrade

, Senior Software Developer, Accenture Tver Technology Center

The market for mobile applications is actively developing, and the set of technologies for their development is growing accordingly. There are quite a few tools that you can use.

For native development on Android platform there is Java or a wrapper over the JVM - Kotlin. For iOS, you can use Objective-C or a wrapper over it - Swift. These are all OOP languages ​​that have inherited a lot from Smalltalk and C.

For cross-platform development, Flutter from Google is now used, for which you will need to know Dart. Or React Native from Facebook.

For a novice mobile developer, most likely, his past experience and knowledge of languages ​​will be the determining factor. If Java is the basis of his toolkit, he will be able to learn the world of mobile development through the Android platform much faster, using the same Java or Kotlin.

At the same time, Objective-C for iOS development has taken a lot from Smalltalk, as well as Java, so if you wish, you can make a choice in favor of iOS. But keep in mind that Android development can take place on Windows or Linux, but iOS requires MacOS X. But for a JavaScript developer with knowledge of React, obviously, the most fast track will be React Native. Just like for Dart developers, the choice will be in favor of Flutter.

After a novice developer gets an idea of ​​what mobile development is like, what are the pros and cons of the chosen path, he will decide for himself whether to work with any one approach, or solve problems using cross-platform solutions.

This approach has its advantages: the cross-platform method makes it possible to release a project into a productive environment a little faster, using fewer resources. In addition, it is easier to maintain. But it also has obvious disadvantages for both the developer and the user. For example, a developer does not need to know native technologies, but platform guidelines must be taken into account, since an application written according to iOS guidelines will cause difficulties for Android users and vice versa.

Cross-platform apps cannot achieve the same level of device integration as native apps. That is, if the application is talking about interacting with the device, for example, with the camera, calendar, or using the computing power of the device, then this is easier to achieve using the native approach, and it will be faster and more productive.

When developing a cross-platform application, specialists take into account the capabilities of the framework, which imposes restrictions. It is also worth considering that in order to develop a product on native technologies, specialists are needed for each platform.

If you work as a freelancer or if there is a goal to cover the maximum number of devices with minimal funds, focus on cross-platform development in case of focusing on mobile solutions or working as a front-end developer.

What are the main advantages and disadvantages of mobile native and cross-platform development? Native development itself is expensive because the company needs to invest in two teams - iOS and Android. For simple applications, the speed of development on Flutter / React Native is higher.

But the plus is that the infrastructure is already formed and understandable. You get access to any device resources and can develop under smart watch, cars and more.

Cross-platform development is also a cool thing. But it is not yet highly developed in the IT labor market in Russia. Sensible specialists - count on the fingers. The framework infrastructure is young, but the situation is gradually changing for the better. This development makes it possible to write for several devices at once. Even if you write in Flutter, for example, it integrates easily with native code.

Upgrade Downgrade

Cross-platform development is aimed at quick results and significant budget savings - we write one code for all devices. Its areas of application are either a solution for internal use, where the usability of the product is not so important, and functionality plays a dominant role, or the creation of a quick "pilot" project, when the customer needs to show the principle or idea of ​​​​the application. In addition, if there is no exact understanding on the device with which operating system your prototype will be viewed, then cross-platform development is the way out. However, you need to understand in advance that all devices have a different architecture, so physically it is almost impossible to execute a high-quality application on only one cross-platform code. In complex scenarios, you will need to write native code. In addition, due to its specificity, cross-platform development incurs costs that do not allow the application to be as efficient as possible. This is understandable, in this case, the intermediate cross-platform code must be translated for each of the platforms, which makes the application more “heavy” due to the fact that, in addition to function code it contains its execution environment.

Give another opinion

Everything is clear, show the conclusions

So which development approach should you take?

Everything depends on the task. If you need to write an app prototype for multiple platforms or mobile version site, you can look towards cross-platform frameworks. With them, you will most likely write an application faster than with native development, especially if you work on a framework similar to your usual tool, such as React Native.

On the other hand, the universality of cross-platform applications must be compensated for in some way. Somewhere a “non-native” interface element pops up, somewhere the interaction with the system is worse, somewhere the speed of work sags, etc. Despite the fact that native development requires more resources, many companies prefer it, because on the output is a more stable and native-looking product.

In this regard, if you are just starting out in mobile development, then it would be better to do native development first. For it, you can find more information on the Internet, you will get a deeper understanding of the capabilities of the platform and you will not be disturbed by the individual nuances of cross-platform development. Moreover, if you decide to do cross-platform development in the future, the knowledge gained will definitely not interfere with you.

We remind you that you can ask your question to the experts, and we will collect answers to it if it turns out to be interesting. Questions that have already been asked can be found in the issue list. If you want to join the ranks of the experts and send a response from your company or from you personally, then write to , we will tell you how to do it.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!