Native elements. Cross-platform versus native applications: comparison and choice of approaches. Negative user experience

The debate about which is better and more profitable - native or cross-platform development - has not subsided for many years now; this issue is especially acute, if necessary, to develop mobile app... On the one hand, the idea of ​​developing one application for all platforms looks very tempting, but on the other, this approach may not have the best effect on user friendliness, appearance, functionality and performance. We prepared short review, which will help you understand what is the fundamental difference between these two approaches, and decide which one to choose for your application.

His own, dear ...

Let's talk about native development first. Everything is simple here: for each platform there is native language: for Android it's Java, for iOS - Objective-C or Swift, for Windows Phone- C # and so on. Each native language has its own set of technologies and frameworks.

Advantages the use of native languages ​​is that the application developed in them will work faster, will be able to use all the capabilities and features of the platform, and the interface will be clear and convenient for any user of the platform. Plus, native apps are often easier to develop than cross-platform ones.

The main disadvantage This approach is that for each platform you have to create a separate application, although most functionality will be the same. In addition, the development of several applications, as the logic tells us, will be longer and more costly. This is how the idea was born to write one application that would then run on multiple platforms. This approach is called

Cross-platform development

There are two main ways to develop a cross-platform application: do it “manually” by writing C ++ code and wrappers for different platforms, or use one of specially developed technologies.

Development "manually"

The essence of the first approach is that C ++ code can be run anywhere. Android uses the NDK for this, Windows Phone - Managed C, other platforms also have their own ways to process and run the code. Another thing is that such a code will be limited in its capabilities. For example, on Android, it won't be able to access the screen or even start up on its own. To get around these limitations, you first write a library with the main logic in C ++, and then a wrapper in the native language that launches the library and ensures its interaction with the device. True, it is worth noting that this approach is suitable only for a limited range of applications - where there is really a lot of logic on the clients, which makes sense to move into a separate library.

Technologies

The essence of the second approach is the use of one of the cross-platform development technologies, of which there are many today. Here are the most popular ones:

React Native v recent times It is especially popular: even such market giants as Uber or Sberbank are actively experimenting with it. This is not even so much about cross-platform applications as about the “Learn once - write anywhere” principle, that is, the ability to use the same technology to create applications for different platforms, providing a high percentage of code reuse.

Another option to write a cross-platform application is to use HTML5 + JavaScript... By the way, this is exactly how it is written text editor Atom, Visual Studio Code, and Slack (yes, even the desktop version is essentially a browser that looks like a regular application).

Interesting fact: Amperka recently released an unusual microcontroller Espruino. His main feature - firmware that runs on a microcontroller. It is written in pure C, loaded once into a separate place in the flash memory of the microcontroller and is engaged in executing custom JavaScript code.... So now you can program microcontrollers in JS. In JS, Karl !!!

This idea seems absurd, but if you think about it, you can find a justification for it. With the development of the concept of the Internet of Things and the increase in the number of various IoT devices in the future, we can expect a surge in demand for programmers who will be able to ensure their interaction with the outside world. And the threshold for entering JavaScript is much lower than in C or Assembler, you can't argue here!

Not so simple

The advantages of cross-platform development are that you can write an application or any of its components once, using, for example, C ++, and run it on different platforms and devices. It is logical that this will also require less costs. It would seem - write and rejoice! However, this approach also has a number of disadvantages.

And they all have one reason:all platforms are different.

Let's consider the main inconveniences that you will have to face when embarking on the path of cross-platform development.

Negative user experience

Each platform has its own standards: standard gestures and controls, arrangement of elements, appearance icons ... For example, one glance at the screen is enough for you to understand, iOS in front of you or Android. Having developed an application that will look the same on all platforms, you will face the fact that the user will not be able to use his usual control methods and will not see the familiar design, which means that he will find your application less convenient than the native one.

For example, games ported to PCs with PlayStation often suffer from this: many of them do not support the mouse and do not allow customization of keyboard shortcuts that are convenient for the player, which makes them less convenient than games designed specifically for the PC. And if applications such as Mortal Combat or Final Fantasy can “leave” at the expense of nostalgia, then developers of new games should think before depriving users of the controls they are used to.

Another example is Matlab, which on Mac uses not the top menu, but the menu inside the window, which is typical for Windows and contradicts all iOS guidelines. As a monopolist, MatLab can afford it, but if you are developing an application that will compete with others, it is worth considering whether users will prefer the native interface they are used to.

One more thing - all platforms differ externally: fonts, size and shape of buttons, appearance of calendar, checkboxes, radio buttons ... Even if you want the application to just look like the native one, you will have to develop style sheets for each platform, which increases both the timeline and the development cost.

Limitations when developing functionality

In addition to inconveniences for the user, cross-platform development is fraught with a number of problems for the developer. The fact is that actions that look exactly the same to the user can be implemented in completely different ways on different platforms. Let's take a look at some examples.

Such familiar action as drag and drop is fundamentally different for Mac and for other platforms. If on Windows or Linux this action is handled by the application itself, then on Mac the operating system directly comes into play, which means that the developer will need to create a separate “open file” event in order for this action to work correctly on Mac. This means that you will have to accept either the growth of labor costs for development, or the fact that the drag and drop habitual to users will simply not work on this platform.

Another example is opening a specific document. On all platforms, this action launches the application and passes it what document to open as an option, on Mac, a special “open file” event is used. And again, we are faced with an increase in labor costs, and hence the cost of development.

Cross-platform apps slow down: myth or reality?

In almost any debate about the advantages and disadvantages of cross-platform development, you will see the argument that cross-platform applications are significantly slower than their native counterparts. This is both true and not true. For example, code written in C ++ and run on Android using the NDK will run even faster than native apps. On the other hand, if you use, for example, PhoneGap, the application starts to work like "The House That Jack Built": PhoneGap calls JS, which calls Java, which runs on a Java machine that is already running on a real phone. Of course, performance is out of the question.

And what should you choose?

Some may think that our goal is to convince everyone to stop developing cross-platform applications. Not at all: we urge you to evaluate which approach will be optimal for you, and not to chase the seeming cheapness of cross-platform solutions. There is no single recipe for all occasions here; each application must be evaluated separately. Consider two poles.

The popular 2048 puzzle, for example, is best designed as a cross-platform application. Developed on web technologies, it will run everywhere: you can use the same PhoneGap to run it on mobile platforms, Electron - for Windows, Linux and Mac, and for sites, VKontakte and Facebook applications, you don't even have to put in effort: the application will launch directly. All you need is to build the program using different packers and create an icon for each platform. Done, the application is indistinguishable from the native one!

At the opposite end of the scale is, for example, graphics editor Sketch, which has gained enviable popularity among UX and UI designers (we use it at Noveo too!). Currently, it only exists for OS X, and the question of when will it be released for other platforms is asked so often that it was even included in the FAQ.

“Is Sketch available for Windows or Linux?

Due to the technologies and frameworks exclusive to OS X that Sketch has been built upon, regrettably we will not be considering supporting Sketch on either of these platforms. ”

(Are there versions for Windows or Linux?

Due to the fact that Sketch is developed on technologies and frameworks specific to OS X, unfortunately we are not considering porting to any of these platforms.)

Most applications, of course, lie somewhere between these extremum points, so careful analysis will be required to choose one of the approaches. Try to estimate: what percentage of your users will be scared away, for example, by the unusual appearance of the buttons or not using the top menu on OS X? Will these be the users who pay off for your application? Is there a lot of functionality in the application that will require significant improvements for one or more platforms?

Of course, only A / B testing can give accurate results, but even thinking about it, you will do a lot to choose an approach to development.

Let's sum up

Both native and cross-platform development have their own advantages and disadvantages. The main advantages of native applications are performance and the use of all the capabilities and features of each of the platforms. Their main drawback is the need to develop the same functionality multiple times.

There are many cross-platform development frameworks and technologies out there. Among the most popular are Ionic, Unity 3D, Xamarin, React Native, and using HTML+ JavaScript.

The main disadvantages of cross-platform development are negative user experience and complexity in developing functionality. Attempts to customize the application for each of the platforms lead to an increase in labor costs, so in some cases a cross-platform application may turn out to be more expensive than a number of native ones, despite the fact that it will be inferior to them both in terms of capabilities and in terms of user interaction. Also, cross-platform applications often run slower than native ones.

In order to understand which approach to give preference to, evaluate the complexity and uniqueness of your application. Simple solutions It is more profitable to develop on cross-platform technologies, but the more complex the functionality, the more profitable native development becomes.

Of course, it is impossible to disassemble all the subtleties and nuances of native and cross-platform development in one article. Our goal was to give an idea of ​​the basic concepts and complexities that are involved in this issue. Share your opinion and experience in the comments!

If you find an error, please select a piece of text and press Ctrl + Enter.

In this article, we will compare 6 cross-platform development solutions that were popular in 2016 and try to find the best solution.

Cross-platform frameworks PhoneGap, Xamarin, Unity, Qt and Appcelerator Titanium, Telerik Platform currently occupy 80% of the cross-platform development market for mobile devices.



The table below summarizes the main characteristics for each framework:

PhoneGap Xamarin Unity Qt Appcelerator Titanium Telerik AppBuilder
Languages JavaScript, HTML5, CSS3 and native languages ​​(Java, Objective-C, C #) C #, Xaml C #, UnityScript, Boo C ++ QML JavaScript, Python, Ruby, PHP .Net, JavaScript, HTML5, Java, PHP
Supported platforms Android, iOS, Windows Phone, Blackberry, WebOS, Symbian, Bada, Ubuntu, Firefox OS. iOS, Android, Windows Phone and Windows 8 / RT, Tizen Android, iOS, Windows Phone, Tizen, PS 4, Xbox One Android, iOS, WinRT, Windows, Symbian, Linux, QNX iOS, Android, BlackBerry, Windows, Tizen, Denso iOS, Android, BlackBerry, Windows, Windows Phone
Prices PhoneGap Pricing

Paid version: from $ 9.99

Free version: available

Adobe Creative Cloud Membership: Available

Prices
Xamarin

Xamarin Studio Community: Free

Visual Studio Community: Free

Visual Studio Professional: Available

Visual Studio Enterprise: Available

Prices
Unity

Personal Edition: Free

Professional Edition: from $ 75 per month

Prices
Qt

There is free version... Paid versions start at $ 79.

Prices
Appcelerator

Indie: $ 39 per month

Free trial available

Price from 39 $ per month

Open source + - - + + -
UI Web Native UI Canvas Native Native Web

PhoneGap

PhoneGap allows you to create mobile applications using standard web technologies (HTML5, JavaScript and CSS3). As a result, this led to a rapid growth in the popularity of the framework, with its help it is possible to do without development in such programming languages ​​as Java for Android, Objective-C for iOS and C #.

PhoneGap Build allows you to build builds for iOS, Android and Windows Phone at the same time, without the need to install any SDK tools (of course, there is some cunning in this - when developing, it is still better to build locally, at least on Android, before sending for testing) ... But more importantly, this service allows you to build for iOS in the cloud without having a Mac.

Installing PhoneGap requires incredible effort, so I advise you to free up half a day ... Just kidding. Installation for Xcode took 3 minutes - it consisted of downloading the archive, unpacking and installing. That's all.

PhoneGap introduces the ability to use the native functions of a mobile device to work with:

  • accelerometer,
  • camera,
  • compass,
  • contacts,
  • file storage,
  • geolocation,
  • database,
  • events, notifications,
  • media, etc.
If the application does not go beyond these points, then the speed of development using the PhoneGap framework will be an order of magnitude higher than the development of a native application for each platform. Video with application development and description of PhoneGap.

Advantages:

  • PhoneGap has a simple API that makes it easy to get started with HTML, CSS and JavaScript.
  • Ability to use any existing JavaScript libraries (JQuery, Prototype, Sencha Touch)
  • Support for all mobile platforms
Disadvantages:
  • The user interface is rendered using the built-in browser. This makes it difficult to obtain feedback compared to the native app.
  • Often existing plugins are outdated, so sometimes you have to write your own.

Xamarin

Xamarin is the second cross-platform framework on our list. Xamarin allows you to create one single application logic using C # and .NET.

Functionally, the Xamarin platform represents a number of sub-frameworks. These sub-frameworks play a large role - through them, applications can route requests to application interfaces on devices. A visual interface is defined, logic is anchored in C #, and it will all work on Android, iOS, and Windows Phone. Xamarin.

Advantages:

  • A large and growing community.
  • Developers can use TestCloud to test apps automatically.
  • If you are already familiar with C # and .NET, then you will not need to spend a lot of time learning a few new frameworks.
  • You can reuse already written code.
  • Applications under different systems will look very similar.
  • Dynamic layout for iOS is infinitely easier than using constraints manually.
  • Due to CustomRenderers, standard controls can be easily supplemented with arbitrary properties (for example, making a gradient fill for buttons is a matter of a couple of minutes, although it doesn't work out of the box).

Disadvantages:

  • Some interface patterns are hard to implement on monodroid and very hard on monotouch, since default solutions for a particular feature rely on platform crutches that may simply not work in Xamarin.
  • Problems arise from the mono, monotouch and monodroid platforms. Your application must meet specific stability requirements.
  • Android pages cannot be positioned as part of an existing Activity / Fragment.
  • Not all controls are implemented.

Telerik AppBuilder

One of the main reasons to use AppBuilder is a complete online IDE. It allows you to build, test, and even publish hybrid apps from any computer or mobile device, without having to download it.

Ability to create iOS Apps working on Windows or Linux is another advantage.

Advantages:

  • Telerik provides Visual Studio and Sublime Text plugins for AppBuilder.
  • AppBuilder offers quick way importing Cordova plugins.
  • Complete online IDE.
  • Easy to use and learn

Disadvantages:

  • Small community

Unity

A multi-platform tool for developing 2D and 3D applications and games Unity, also one of the best tools for showing 3D content. Applications created with Unity run on Windows, OS X, Linux, Android operating systems, Apple iOS, Windows Phone, BlackBerry, as well as game consoles Wii, PlayStation 3 and Xbox 360. Video with the development of a mobile game on Unity.

Advantages:

  • Great option for creating mobile games for a range of devices
  • 3D engine produces high quality results without any complex configurations
  • There are many good free plugins
  • Unity allows the developer to make their own shaders and change the way Unity renders the game.

Disadvantages:

  • UI and complexity for beginners
  • Source code not available
  • Unity compilers are not optimized for ARM processors on some mobile devices.


Qt is a library for building cross-platform C ++ windowing applications. Qt should be viewed not so much as a collection of classes for creating a GUI, but rather as a complete class toolkit for all occasions. It is possible to develop programs not only in C ++, but also in the QML language, which is very similar to JavaScript. This is a special branch of Qt development focused on rapid prototyping and mobile application development. Video showing the development of the Tiled Map Editor in Qt.


Advantages:
  • Qt has many good tools to help with development, such as the QT Creator IDE, Qt Designer, and code profiling.
  • It has libraries containing intuitive API interfaces for elements such as networks, animations, and more.

Disadvantages:

  • Qt is hard for beginners

Appcelerator Titanium

Titanium is a completely open platform for developing, deploying, distributing, and ultimately executing web applications. Appcelerator Titanium allows you to create mobile apps in JavaScript, HTML and CSS.

You can create modern, and most importantly, native applications using any operating system popular today: Windows, GNU / Linux or MacOS X.

Applications built with this SDK will be truly native. The navigation controller on Android will look familiar and not the same as on iOs. And not only the view, but the application code itself will also be native. By the way, this does not prevent you from creating a classic WebView and filling it with the desired web content.

Advantages:

  • JavaScript makes it easy to develop applications without using platform languages.
  • Appcelerator allows you to do analytics in real time
  • Using the native API will give you more high productivity for applications that are not very large.

Disadvantages:

  • There are delays when starting the application due to loading the library
  • It is difficult to create complex applications because the use of JavaScript has a negative impact on application performance.

React Native

What is React Native? It is a JS framework based on JS and React - a JS library for creating a UI (View layer).

The technology is very promising, but young, so the platform is still crude in some places. The Android version came later, so there are more components for iOS apps for now. It is also worth considering that when the application is deployed, all the JS will get to the user's device, so you should not keep secret business logic at the presentation level. We can say that now React Native can be used for rapid prototyping. mobile versions your web applications. Moreover, if the web application is already written in ReactJS, then the transfer speed increases significantly. An example of React Native development.

Advantages:

  • Unified workflow and tools: it doesn't matter if you are working on the Android or iOS version, you still use the same tools.
  • For this reason, the speed and ease of development.
  • Wiring Legacy App to JS API and Hybrid Apps: Let's say you already have a ready-made iOS app and want to switch to React Native. Then you can wrap native components so that they are available in React Native. This way you can gradually migrate to React, and you end up with a hybrid application - half native, half in React, and a few legacy components in JS API.
There is no perfect solution, each framework has its own pros and cons. For a very simple applications I would suggest using PhoneGap until responsiveness is key. And for more serious development, it is better to use Xamarin, but even with Xamarin it is better to combine native development for most of the user interface elements.

Hybrid and Native Development: Comparing?


Hybrid apps or native? This is one of the most important questions that the customer has. software when he needs to release a new application for consumer use.

Let's start by defining each one. A hybrid application, as it sounds, combines elements of both native (the application runs without any external support) and Web (the application runs through a browser and is usually written in HTML5) applications. The application borrows cross-compatible web technologies such as HTML5, CSS and Javascript and uses some of its own code to make it more responsive to the user's device. Hybrid apps are hosted internally own application where the WebView of the mobile platform is located (the browser is bundled inside the mobile application, so to speak). To put it simply, a hybrid application is a website that is packaged in an original wrapper. Examples of brands using mashups: Amazon App Store, Gmail and Yelp.

The native app is designed for a specific mobile operating system(Objective-C / Swift for iOS or Java for Android) and optimized to take full advantage of all platform features (camera, contact list, GPS, etc.). Essentially, a native application is implemented using the native tools of the platform. Examples of such applications include Starbuck, Home Depot, Facebook (though some disagree with the latter).

Let's take a look at some important considerations to help you choose between native and hybrid apps.

Development cost

Hybrid apps are being developed for many platforms. Identical HTML code can be applied and reused on more than one mobile operating system. Simply put, when you order the development of a hybrid application, your final product will work immediately on most modern smartphones and tablets. Thus, your development costs are significantly reduced.

Developing a native app, on the other hand, requires writing completely different programs for each unique device. Unlike hybrid programming, which borrows information from previous HTML5 experiences on the web, native programming is often considered more specialized. Thus, the cost increases, which is impractical for small companies and individuals.

Time

Hybrid apps are often favored by companies looking to get something to the mass market as soon as possible. Again, since the same HTML code is reused for different operating systems and only a fraction of the complex machine code needs to be rewritten, the application will be ready to run on multiple devices as soon as possible.

If time is not a priority, then native development may be the right fit for you. Otherwise, a hybrid will be preferable.

Updates

Hybrid development allows content to be updated directly from the web. If there is no drastic change in functionality, then the updates are almost imperceptible. Many of these updates may not be installed through the App Store. This makes fixing bugs and adding updates more efficient and less annoying for the user. However, there is one caveat related to web updates.

There may be a situation when the application is focused on the features of the mobile platform, which no longer works because the plugin is outdated. When this happens, you are faced with a dilemma - you need to either remove the application function or hire a programmer to write the plugin. The same scenario applies when new versions of the mobile platform are released. If you want your app to be able to take advantage of the new features, you again task the developer with creating a plugin to host the update, or you can wait for the community to create.

With native development, you can update your application to handle platform changes and take advantage of new features without relying on ongoing support communities of your plugins and not being dependent on community release cycles. For hybrid development, it is necessary to conduct a comprehensive account of the reliability of plugins in order to avoid unpleasant surprises in the near future.

Users

With the native application, you can easily use the wide functionality of your mobile device: camera, microphone, GPS and much more. That said, the user learning curve is low.

Native apps are also typically designed for use when there is no Wi - Fi or external data retrieval. The hybrid can also work in offline, you just have a little less options.

It should be noted that the response speed, other things being equal, is usually higher in native applications. This is often felt by the user in a gaming environment that is dependent on graphics performance. This shows up even when the mashup uses HTML5 Canvas and WebGL. The difference in speed is a fraction of a second - it's up to you to decide whether this is critical or not.

Security

Hybrid critics may cite JavaScript injection or SSL vulnerabilities, but if you have secured your site, then this is not your concern. However, mashups have more publicly available knowledge, which makes the reverse engineering process more likely. They also depend on plugins, which constitute an additional layer of code where a security vulnerability can potentially be found.

Native apps use their own security features without plugins. Thus, for applications where it is required high level security, native development may be preferable. For all other business application needs, hybrid development offers a satisfactory level of security.

Cross platform compatibility

Everything is simple here - this is where hybrid apps benefit: a native app developed for the iPhone won't work on Android, and vice versa.

Output

Are you looking for a definite answer? The only thing I can tell you is that the best form for developing an application is the one that suits your unique needs. This will depend on your resources and the needs of your end user. Let me remind you that you can always contact me for the development of the program; I can create an application in Java or C #. There is also experience in development for J2ME and Android.


Currently, 9 out of 10 potential customers apply to develop an application for 2 platforms at once - iOS and Android. This is quite logical, because the mentioned platforms together occupy more than 95% of the market, and it is economically feasible to develop a mobile application specifically for these platforms.

During communication with customers, the technical director of the company Mauris Vladimir Bondarenko often has to explain what is the difference in development for each of the platforms and why these are two completely different products. Many people think that programmers develop one application, which they then register in the App Store and Google play... In some cases this is true, but not always. Vladimir spoke about the main approaches to the development of mobile applications.

There are only four of them:

Application builder- a ready-made service that allows you to assemble a mobile application in 30 minutes.

This approach has two benefits: speed and cost. As a result, you will get a generic non-branded application with limited functionality without the ability to adapt it for yourself. With this approach to development, more than 50% of all your wishes cannot be realized.

Cross-platform application- single software solution immediately under both mobile platforms... The product itself is a browser-wrapped site that launches home page when clicking on the icon.

Advantages:

  • The speed of work. The interface of cross-platform apps is responsive.
  • Development time. Due to a single solution for 2 platforms, development time is significantly reduced.
  • Platform technical support.

Disadvantages:

Disadvantages:

  • Limited API. While React Native supports a huge number of APIs, there is still a need to use other APIs through built-in modules.
  • Differences between Android and iOS platforms.
  • Relatively poor performance. If you are planning to develop a complex application, React Native is not for you.

As a result, the user gets a flexible application with a native responsive interface and a single software base... But it is worth considering that the technology is quite new, and in some cases the developers of your application will have to modify the standard ones themselves. mobile development software components.

Native development- development of two independent applications for iOS and Android platforms.

Advantages:

  • Convenience of development and debugging. In general, developing native applications is much more convenient than, for example, developing cross-platform ones. This is due to the fact that in native development there are no additional layers between the application code and executable file and, in general, the native's tools are more advanced.
  • Availability of documentation and regular technical support
  • The speed of work. Native applications provide high speed and performance.
  • Usability. Native applications provide the ability to implement the interface and general behavior of the program in the most natural way for a given platform.

Disadvantages:

  • Coverage of platforms.
  • High development cost.
  • It is difficult to find an experienced contractor. In general, it is quite difficult to find a good developer in Java or Objective-C due to the specificity of this area and more. high threshold entry into technology.

What is the bottom line? You will get the most flexible application with a full arsenal of possibilities for each of the platforms, but the implementation and support of the application for each of the platforms will require a separate development team.

There are a number of less popular technologies for implementing applications, but they all fit into the gradation described above.

Now, before developing an application, you can choose the best approach to implementation, based on your budget, timing and functionality.

In this video you can find out how long it will take to develop a mobile application. More videos on our channel:

The mobile apps market is over ten years old, but it is still growing rapidly. The demand for companies is constantly growing and it still significantly exceeds the 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 development and a lot has changed since then. It's time to talk about methods and tools again.

Let's start by going over the terminology again.

Relatives

If developers in the process of writing an application use a programming language adopted for a specific 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:

  • speed of work and response of the interface. The application responds to pressing instantly, there are practically no delays in animation, scrolling, receiving and outputting data;
  • clear and simple access to the functions and sensors of the device. For the developer, it is not a problem 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 the functions of a smartphone. 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. For each platform, you need to write your own code. With the growth of the mobile app market, developers have become not only expensive, but very expensive.

And not relatives

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

The first one is that at the stage of preparing an application for publication, it turns 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, working already on the device, on the fly broadcasts calls from the non-native code to the native functions of the system.

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 an item 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. You just 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 changes to the interface so that the application meets the spirit and letter of the desired platform is a matter of desire, the required speed and quality of development.

Advantages:

  • cost and speed of development. Since there is much less code to write, the cost of work is also reduced;
  • the ability to use the internal resources of the company. As we will show later, cross-platform development of mobile applications can often be done by the efforts of your 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 requirements for element design and sometimes they are mutually exclusive. When developing, this must be taken into account;
  • problems in implementation complex functions or possible problems work even with simple procedures due to the mistakes of the development frameworks themselves. The cross-platform environment only translates requests to system calls and interfaces into a format that it understands, by the system, and therefore at this stage both difficulties with understanding and the occurrence of errors within the framework itself are possible;
  • speed of work. Since the cross-platform environment is an "add-on" over the code (not always, but in certain situations), it has its own delays and pauses in working out user actions and displaying the results on the screen. This was especially noticeable a few years ago on smartphones that are less powerful than today, but now, with the increase in the performance of mobile devices, this can already be neglected.

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

Popular platforms and cross-platform development tools

As we wrote above, there are two approaches - turning the code into native code 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 ideology of the wrapper.


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 being created, which is “wrapped” in a small platform code that translates calls from the system to the application and vice versa.

All the disadvantages and advantages are expressed here like nowhere else clearly. You can use web developers (HTML, CSS and JavaScript as the main technologies) and make the first version of the application in a month or even a couple of weeks for relatively little money. Yes, it will slow down in work, perhaps it will not be completely precise geolocation, but it will work on all devices and will allow you, at a minimum, to test customer demand on mobile devices.

A huge number of frameworks have been created for this approach, but they all do virtually 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, and frameworks operate with their own ready-made UI elements that mimic mobile platforms and their own development logic. As an example of this approach, you can specify: Ionic Framework - a wrapper; Framework7, Mobile Angular UI, Sencha Touch, Kendo UI - front-end 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 - scripts running in the background, and Web App Manifest - a description of a web application in an understandable mobile system form) they can work as native without the PhoneGap wrapper. They can be installed on the home screen bypassing the app store, work offline, work with push notifications, and with native functions.

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

Taking into account all the disadvantages of HTML5 solutions, many companies have created tools that allow you to write code in one, non-native, language, and it is then translated into the native one. So 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 for Enterprise-development programming language C # is used, the cross-platform development environment is Visual Studio. The output is native apps for iOS, Android and Windows. True, relatively large.

React Native

Platform from - applications are written in JavaScript and using CSS-like styles. The interface turns out to be native, and the code is interpreted already on the platform, which gives it the necessary flexibility.

As a relatively young platform, React Native still obviously (though not disastrously) suffers 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 still only in beta, takes a different approach than React Native and Xamarin. It does not transform source into native, which is executed by the platform, but in fact draws a window on the smartphone screen and draws all the elements itself. The language used is "proprietary" Dart, which Google created as an enhanced version of JavaScript.

This has both advantages (for example, seemingly identical interfaces) and disadvantages (for example, redrawing an interface requires certain memory and processor time).

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

What to choose

Your head is probably already spinning, but you still haven’t come up with an understanding of what to choose. Let's present a simple list of questions to help you:

  • should work somehow on any device? Choose Html as a basis;
  • do you have enough funds, no rush and want the highest quality application? Direct way to you native development;
  • do you have a built-in web developer or do you just want to quickly and easily try a mobile application in action? Here you can recommend Cordova / HTML or PWA;
  • do you have your own CRM system and a supporting C # developer? Take Xamarin;
  • do you “want to try”, but you need to make everything beautiful and fashionable? Look away React Native or Flutter.

You can also enter from the other side. Take a look at the functionality you need in your application and proceed from this:

  • a simple business card application? Take React Native or HTML5 and you get two platforms for a minimal price;
  • Do you have a high traffic website and need to test the hypothesis of a presence in the mobile space? 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 set 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 before starting the project. The made cross-platform application is obviously better than the unmade native one. You can quickly and cheaply develop it, 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.

Still having doubts and questions about cross-platform apps? 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 housing and communal services to orders in online stores. Better sign up for free consultation, with an indication of the approximate budget and brief description ideas or contact our manager Katya by phone