The mobile application industry has grown tremendously over the last few years. In 2017, revenue from app stores known as the App Store, Google Play and other independents totalled about $ 86 billion. In fact, mobile applications have become a necessity in everyday life for people and businesses.
This rapid growth has brought a huge challenge for mobile application developers to meet this market demand: creating, in record time, apps that work well on multiple platforms (Android, iOS, Windows Phone, etc.). The solution to this was the development of frameworks for creating cross-platform applications, that is, from a single code, the developer can generate an application for several platforms. Two of these frameworks are the main focus of this article and will be discussed throughout the text.
This article aims to introduce the reader to existing alternatives for the development of mobile applications (Native or Hybrid) and to show a comparison between two frameworks that promise to be the future of mobile application development: Flutter and React Native.
Native Development
The “traditional” way to develop a mobile application is to use the tools and languages specific to a certain platform that is, in most cases, made available by the companies that own the technology. For example: For the development of applications for Android devices uses the tools, SDK, interface elements, all made available by Google, using Java programming languages and/or Kotlin.
Devices that have IOS as the operating system use the tools provided by Apple and the languages are Objective-C and Swift.
Native development has many advantages, most of them related to application performance since all the code and tools used were built specifically for that platform. This performance is a determining factor in the usability and performance of the application, as well as make a big difference in the user experience.
The disadvantages are simple and very easy to point out. The first of these is that if you or your company wants an application running on multiple platforms, you need to have the knowledge of both or hire someone who has it, that makes development somewhat more costly in many ways.
One of the factors that makes this so laborious is the lack of professionals who master native development, either on one or both platforms, since learning is an onerous process. In addition to the cost, the development time may be longer, since developing native requires the developer to worry about details that, for smaller applications, could be easily ignored.
Due to the drawbacks cited in “classic” native development and the growth, popularization of mobile applications and the great financial returns they bring to startups, independent developers and large companies, the need arose for finding new ways to create faster and less costly. Then emerges cross-platform development.
Cross-Platform Hybrid Development
Development “Cross-Platform Hybrid” is the approach of so-called Web Apps, that is, applications developed using Web technologies (HTML, CSS and JavaScript).
Such a form of development is cheaper, since development time is reduced because the application can be used on different platforms (iOS, Android and Windows Phone), and give the programmer great freedom to create applications that look identical to native applications, but are actually running in a browser.
All this freedom and ease can have its downsides. The escape from the platform design pattern is one of them. The iOS and Android systems have several peculiarities, such as gestures, actions, colours, shapes, etc. When an application is developed using a hybrid platform, all of the above factors can be compromised if the application interface is not well planned, affecting much of the user experience.
The hybrid development is more attractive for those who need simple applications and do not lack complex functionalities of the operating system of the device. It is a cheap and fast alternative, however, the performance, UX (User Experience) and difficulty in using native features such as camera, Bluetooth, storage, GPS, etc., can compromise more complex applications. Some examples of these frameworks are Ionic, Cordova and PhoneGap.
Cross-Platform Native Development
“Cross-Platform Native” development is basically the use of a framework that allows the programmer to develop in a programming language (defined by the framework) to write code that when compiled generates an executable for the various platforms.
It is possible in certain frameworks to use codes in the native language and thus merge with that of the framework. This occurs most often in creating layouts, minifying the UX problem pointed out in hybrid development. Examples of these frameworks are: Xamarin, React Native and Flutter, the latter two of which we will cover from now on.
React Native Overview
In view of all the problems identified in the native development and the possible solutions proposed by the community with the Cross-Platform approach, some frameworks currently stand out in the market.
One example of success in the market is React Native, launched publicly with the open source in GitHub in 2015 by Facebook, joining the native APIs Android and iOS, in order to greatly simplify the mobile development. React already has in its portfolio several famous applications such as Facebook, Facebook Ads Manager, Instagram, Facebook Analytics, Pinterest, Skype, Tesla, Uber, Walmart, Wix, Discord, SoundCloud Pulse, adidas GLITCH, among others. The programming language is JavaScript, pointed to by GitHub as the most commonly used language in its platform. The framework also supports native widgets, which makes browsing and user experience quite enjoyable. It supports some Android and iOS APIs, as we’ll explain later.
Overview Flutter
A competitor of React Native is Flutter, developed by Google and launched in 2017. Though new, it promises to revolutionize the mobile world. As a recently launched framework, it is not easy to find successful applications that have been developed on the platform. It has a great documentation, explaining in detail the step by step of creating applications using the tool. It has its own widgets, being totally based on the Google Material Design, which in turn has created a strand to meet the framework. Its programming language is what may be surprising to many, the Dart language framework, launched at the GOTO Conference in October 2011. Although it seems bad to adopt a new language and not widely used by the community, Dart closely resembles famous languages like JAVA, C # and C ++, promising a small learning curve for programmers with some experience.
React Native vs. Flutter
Both frameworks are attractive with advantages and disadvantages. React Native, in turn, has been on the market for longer and has more applications in its portfolio. This provides security for large organizations to risk adopting the framework, which further leverages their reputation.
Flutter, because it was released less than a year ago, still needs to be further exploited by the industry in order to make the platform gain the confidence of developers.
According to Google one of the great differences of Flutter is in relation to its speed, being able to natively show animations at 60fps and providing early compilation optimization, which makes the application portable by being compiled into code suitable for ARM and x86 architectures, compatible with IOS, Android and others. A disadvantage that can be pointed out is the use of widgets of their own, which can cause the same problem as Cross Platform Hybrid applications.
React relies on native APIs for WiFi and GPS, with good third-party solutions for cameras, sensors, biometrics, Bluetooth and NFC. However, it has a weakness in relation to building custom graphics. There are no good APIs for developing this functionality, making these types of features more complex to perform, implying native code development.
The situation is slightly different in Flutter. Most hardware APIs, with the exception of Bluetooth and NFC, are either under development or are already available. Depending on how fast all of this is done, Flutter can become the winner with respect to hardware APIs.
Part of the comparative framework made by Agile Engine can exemplify some of the differences found in the frameworks, giving an overview of the state of each one.
Conclusion: Which one to choose?
It’s easy to see that both largely solve the problems of native development, bringing agility, performance and practicality to the developer, who can, with less code and work, achieve faster, more secure and reusable development with the best performance possible.
Pros and cons can be raised about each other, but if we take into account maturity and industry adoption, and these are the determining factors for a platform to gain market share, React Native is the winner in this dispute. Flutter promises to bring great benefits and may still surprise a lot when it comes to agility in mobile development and performance, but only time can prove whether such promises will have any real effect in the area.
For now, the most sensible choice on the part of the developers would be to mirror in great applications that have risked and worked, counting on a support and an active community for more than 3 years, that is the case of React Native.
Photo by Max Nelson on Unsplash
Also published on Medium.