Wednesday, 16 January, 2019 UTC


Summary

With Flutter coming out of beta to the 1.0 version on December 4th, 2018, cross platform mobile development is more than ever on developers’ minds. It is perhaps the perfect opportunity to remind everyone what they both are and why they are important.
What is Cross-Platform Mobile Development?
Whether you are an actual mobile development company, an up-and-coming developer, or a client looking to have an app made, you will face the problem of cross platform compatibility. Ideally, you would like your app to run on all platforms, but that is a challenging proposition at best and while you can probably live without having an app for Sybian, you at least need one for Android and iOS, who together hold 99.9% of the global mobile market share. Although globally only some 15% of this falls to iOS, in the crucial US market it is over 44%. If your target is a global audience, you may perhaps be able to get away with focusing on custom Android app development only, but if you want to appeal to American clients, iOS is a must. So, If you are seriously thinking of custom app development, you cannot simply ignore half of your potential users by focusing on only one of those platforms.
Why then, do not all companies do that? Why do we constantly hear that “Our iPhone app is out now, Android users can expect to see it in some unspecified future” (or vice versa)? Well, that’s because these two platforms are nothing alike and require developers to use different languages. This means two groups of developers working separately from one another and a third group of UX experts navigating between them, trying to make sure that the user experience on both platforms is more or less the same. Obviously, two groups of developers cost twice as much as one group, not to mention the potential issues with users switching from one platform to the other. This is where cross platform mobile app development comes in. It promises the possibility of having just one group of developers working on custom app development for both platforms at once.
Like React Native before it, Flutter wants to be the Holy Grail of cross platform app development, by combining the ease of development typical of web and hybrid apps with the performance and usability of native apps. It makes it possible to build actual native apps, while maintaining a single code base.
What is Flutter?
Flutter is an open-source software development kit created by Google, which uses Google’s Dart programming language. It can be used for mobile app development on both Android and iOS (and Google Fuchsia, if it ever becomes a thing). The whole point of Flutter is that, unlike hybrid apps, apps created using it are more than just a thin native veneer over a web app. While you write code in Dart, the resulting app is actually native and, unlike React Native, does not require a JavaScript bridge. It is possible to view both the Dart code and the native code alongside each other, if you feel that there is a benefit to actually getting into that Swift or Java code directly. This is achieved through ahead-of-time compilation. UI design in Flutter revolves around widgets, which are provided in the Flutter framework in two styles designed to conform to Android and iOS design guidelines. These can be modified and combined to form more complex elements.
One feature of Flutter which Google seems to be particularly proud of is “hot reload”, which allows modifications to the source code to be injected into a running application to be seen immediately, without requiring a restart or loss of state. This feature has been widely praised, as it allows developers to avoid the lengthy compilation process, which is particularly useful for making small changes. Not having to wait who-knows-how-long for the code to compile, only to discover that you left out a semi-colon when changing the color of a button, seems like a real benefit and according to Flutter’s creators it has had a profound influence on the work of developers using Dart and Flutter. It should be noted that this is not a feature unique to Flutter and is already offered by React Native.
Although Flutter, just as React Native before it, is free and open-source, it is not insignificant that there is tech giant behind it. As the backer of Android, Google has a vested interest in keeping Flutter going strong, as it facilitates the creation of Android apps and, perhaps more importantly, cross platform development. A custom software development company working predominantly in custom iPhone app development gains an easy way of creating, from the same code, an app for Android. And if Fuchsia doesn’t go the way of Chrome OS, it will almost automatically gain access to a library of Flutter-based apps. This suggests that Google will keep maintaining and developing the platform far into the future, as well as keeping it as simple and developer-friendly as they can.
If you want to dive in and see how it works, you may want to check out this tutorial.
How does Flutter stack up against React Native in Cross Platform Development?
To start with, Flutter is a fuller package than React Native, which in itself only allows you to render UI elements and access device API, while relying on third party code for certain other functionalities. Although this is not necessarily a problem, it can be an issue depending on who provides and maintains those libraries. Flutter comes with many more features included, such as navigation and state management, as well as a library of widgets, which are crucial for programming in Dart.
What works in favor of React Native is that it gives custom app developers access to a wider range of programming languages, crucially including JavaScript which is one of the most popular languages out there. This not only gives developers more options but also makes it easier to get started with React Native. Flutter on the other hand uses only the Dart. And who, outside of Google, knows Dart? Fortunately Dart seems fairly simple to learn and is somewhat similar to JavaScript. Furthermore, while getting started in Flutter would be harder, the need to rely on third party libraries for certain functionalities in React Native can make it harder to master.
If you want a more detailed, yet still brief, comparison of these two platform, there is a good video on this by RallyCoding.
Is Flutter the Future of Cross Platform Mobile Development?
The simple answer is… hard to say. Although it offers some brilliant solutions, they are hardly unique to Flutter and many of them are already known to developers working in React Native, a comparison with which seems somewhat inconclusive, despite Flutter’s many advantages. Most importantly, it has just went out of beta, whereas React Native already has a thriving developer community. And while Facebook has gone out on a limb and used React Native in its own apps to good effect, the best known application of Flutter so far seems to be the Hamilton Musical app. All in all, with all its features and Google’s support, Flutter is certainly very promising, but we have yet to wait and see how it turns out.
The post Is Flutter the Next Big Thing in Cross Platform Mobile Development? appeared first on Ideamotive.