Cross Platform App Development
Cross-platform applications are written simultaneously for several platforms in one language, different from the native one. How can such code work on different devices? There are also two approaches.
The first is that at the stage of preparing the application for publication, it turns into a native one for a particular platform using a transpiler. In fact, one cross-platform programming language is “translated” into another.
The second one is that a certain wrapper is added to the resulting code, which, working already on the device, on the fly translates calls from 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 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.
It is only necessary to refine the UI and UX for 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.
Cross-Platform Mobile App Development
World statistics on the use of smartphones shows the absolute predominance of only two mobile operating systems.
So in the second quarter of 2018, Android OS was installed on 88% of all smartphones used, and iOs – on 11.9%. Data, in turn, shows as of April 2019 for Android OS – 69.63%, and for iOs – 28.50%.
As of March 2019, there were over 2,600,000 apps in the Google Play Store. In the Apple App Store, as of July 2018 – 2,450,220 applications.
In recent years, the number of available applications has been growing at hundreds of thousands per year. According by 2020 the volume of the mobile application market will approach $ 190 billion.
With such a constantly growing number of competitors, the question arises for mobile application developers – what approach should be used in development to make new, competitive applications:
- developed quickly;
- turned out to be of high quality and reliable;
- easily updated and maintained;
- easily involved all the necessary features of the platform.
In fact, the market forces the developer to make a choice between developing cross-platform applications and developing native applications. Let us consider in more detail what each of these approaches is.
Benefits of Cross-Platform Application Development
If you think that developing a cross-platform application is what your company needs, you should learn about the benefits of cross-platform mobile applications.
A single code makes it easy to configure and maintain your application. Moreover, there is no need to temporarily suspend the operation while performing regular maintenance of your cross-platform application. Simple and quick maintenance can reduce costs.
Development cost reduction
Cross-platform application development is based on the “write once, use everywhere” concept. Reusable codes and rapid application development with tools can significantly reduce development costs.
If you want to promote your business on multiple platforms and devices in a cost-effective way, there is no alternative to cross-platform applications.
When you hire mobile app developers to create a cross-platform app, they can simply use the reusable code. This helps them get rid of writing unique code for various platforms, thereby saving their time and effort.
Faster development process
This is another big advantage of cross-platform applications. Thanks to a single source code for various platforms, development efforts can be reduced by 50–80%. This will help you get a rich business application in less time.
The development team can readily meet the deadlines for developing cross-platform applications.
Simple cloud integration
A single source code also makes it easy to integrate a cross-platform application with a cloud platform. Enterprise-level plugins are available to integrate your business applications with the cloud, making them universally compatible.
The main goal of cross-platform technology is to create native applications. Nowadays, thanks to the advent of advanced tools and functionality, developers can create cross-platform applications that will look like native applications.
It can be expected that in the near future, this difference between cross-platform and native applications will become blurred.
Disadvantages of Cross-Platform Application Development
The need to work with the interface of each platform separately. Each system has its own requirements for the design of elements and sometimes they are mutually exclusive. When developing this must be taken into account;
Problems in implementing complex functions
The poblems of working even with simple procedures due to errors of the development frameworks themselves.
The cross-platform environment only translates requests to system calls and interfaces into a format that it understands, the system, and therefore at this stage both difficulties with understanding and the occurrence of errors within the framework itself are possible;
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 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 compared to today’s ones, but now, with the growth of mobile device performance, this can already be neglected.
Background to Cross-Platform Solutions
What tasks are intended to be solved by cross-platform engines, why did someone decide that this makes sense?
If you ask a Java developer for Android or Objective-c a developer for iOS what they think about cross-platform frameworks for mobile platforms, then in most cases you will get an unambiguous negative response and another kilogram of epithets
The main reason for this reaction is that good developers, like any other professional, are very sensitive to the very concept of development, efficiency, productivity, each of them has their own vision of “what is good and what is bad?”.
But usually everything revolves around the technology that they own, cherish and cherish. It is important to understand that not every developer can sacrifice programmer romance and give an objective assessment of what is actually beneficial for the business at a particular moment.
In general, it happened that everything, as usual, is decided by the budget, so the main prerequisite for the emergence of cross-platform solutions is precisely the benefit for the business, which can be detailed as follows:
- when developing a mobile application for 2-3 mobile OS on a cross-platform framework, most of the code can be written by one specialist. Those. there is no need for a full-time developer for each individual OS;
- the lack of narrow specialists in the labor market for a sufficiently large number of mobile platforms;
- relative simplicity in the context of monitoring the correspondence between versions of the application under different mobile OS.
Popular cross-platform development platforms and tools
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 just in the ideology of the wrapper.
Cordova and PWA
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 that “turns around” with a small platform code that broadcasts calls from the system to the application and vice versa.
Yes, it will slow down the work, it may not have exact geolocation in it, but it will work on all devices and will allow you to at least 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 specify restrictions and templates on the logic and UI for your HTML5 project, and the frameworks operate on their own ready-made UI elements that simulate mobile platforms and their 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.
Trendy technology from Google is the same web applications, but due to the use of certain technologies (primarily the so-called Service Worker – scripts running in the background, and Web App Manifest – a description of the web application in a way that is understandable for a mobile system).
They can work as native without a wrapper from PhoneGap. They can be installed on the home screen bypassing the application store, work offline, work with push notifications, with native functions.
The problem is that not all platforms even now support these “specific technologies.” This primarily concerns Apple, which, apparently, really 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, not native, language, and then it is translated into native.
So two birds with one stone are killed at the same time: the code base is one, and the applications are obtained as close as possible to the native one.
Xamarin, React Native, and Flutter
Microsoft platform. The standard C # programming language is used for Enterprise development; the cross-platform development environment is Visual Studio. The output is native applications for iOS, Android and Windows. True, relatively large.
Being a relatively young platform, React Native is obviously (though not catastrophically) suffering from a lack of development tools and documentation.
Such a giant as Google could not get around the cross-platform development of Android and iOS-applications.
Flutter, so far, however, existing only in beta version, professes a different approach from React Native and Xamarin.
It does not turn the source code into native, which is executed by the platform, but actually draws a window on the smartphone screen and draws all the elements itself.
This has both advantages (for example, outwardly identical interfaces) and disadvantages (for example, redrawing an interface requires a certain amount of memory and processor 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 well-established and impressive ecosystem
What to choose for cross-platform application development
You probably already went around spinning, but there was no understanding what to choose. Let’s present a simple list of questions that will help you:
- Should it somehow work on any device? Choose HTML as the basis;
- You have enough money, no rush and you 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 a mobile application in business? Here you can recommend Cordova / HTML or PWA;
- Do you have your own CRM system and its supporting C # developer? Take Xamarin;
- You “want to try”, but you need to do everything beautifully and fashionably? Look towards React Native or Flutter.
You can go on the other side. Look at the functionality that you will need in the application, and proceed from this:
- Simple business card application? Take React Native or HTML5 and you will get two platforms for the lowest price;
- Do you have a website with high traffic and you need to test the hypothesis of presence in the mobile space? HTML5.
- Complex applications with access to the desired device features? Native development, Xamarin, React Native.
Front Desk Helpers Co, 2019. Change your business mind!
Read our additional articles on software development