Couple years ago I still laughed at hybrid mobile development solutions. I was happy with native iOS and Android. I thought I would have sticked with native platforms for life. Then React Native came in town, I tried it and I 💙 it.
- Part 1: The Motivation
- Part 2: The Basics
- Part 3: The Backend
- Part 4: The Frontend
- Part 5: The DevOps
- Part 6: The Monorepo
- Part 7: The Mobile
Recently people are talking about Flutter like crazy, they even question if Android developers should move to Flutter.
Things have changed a lot since I started iOS development 6 years ago. The future is bright for any projects having limited resources. A big question is whether these React Native and Flutter are mature enough to completely replace native platforms.
This post is all about platform overview and advisable thoughts to ease your choice on which platforms you should target as a student, mobile developer or software architect. Some important criteria you should consider:
- Programming language - Technical architecture - Setup and project configuration - Development API - Developer productivity - Community support - Testing support - Build & release automation support - DevOps and CI/CD support
|Source||Closed||Open||+78k stars||+68k stars|
|Changes||Recompile||Instant Run||Hot Reload||Hot Reload|
Apple launched iOS on June 2007 with the very first iPhone. Since then, the mobile operating system has gone through some major upgrades. But it didn’t happen overnight. Ever year in the summer, Apple has reinvented the OS, adding new features and redefining what’s possible on all its iDevices.
The ecosystem that Apple built around the iOS has long been referred to as a "walled garden" because it's a very pleasant place to be on the inside, but it's hard to gain access to. This was reflected in the many ways Apple locked down the interface of the iOS the options it gave to apps.
Learning Swift was relatively easy, as it is similar to many languages you already know (Java, C++). Xcode is without a doubt very advanced and user friendly. Cocoa Touch frameworks are very mature and battle tested for many years.
The smartphone has come a long way since the first iPhone launched in 2007. While Apple’s iOS is arguably the world’s first smartphone operating system, Google’s Android is by far the most popular. Android has evolved significantly since its inception, first being released on an HTC-made T-Mobile device back in 2008.
Android provides a rich application framework that allows you to build innovative apps and games for mobile devices in a Java language environment.
For android with java you will have answer to almost all your questions and that too within the first 5 search results on Google. When you have some confidence with java and the Android SDK you can move on to Kotlin.
Android based platform creation is more time consuming and slow in terms of OS fragmentation. It takes 30-40% longer for engineers to build an Android powered mobile app in contrast to the app that runs iOS. And it is even despite not very complex Java/Kotlin languages.
Android, Which is Linux-based and partly open source, is more PC like than iOS, in that its interface and basic features are generally more customizable from top to bottom.
React Native is a project started by Facebook internally that they open-sourced in 2015. It is already a mature tool and has a huge community. React Native started a trend of hybrid apps that share code between platforms. The idea is very tempting, and other companies are going in this direction.
I am now more convinced than ever that React-Native is the framework of the future, it has so many advantages and so few disadvantages. Best of all, at only a year old, React-Native is already outperforming native iOS Swift applications.
Flutter is a reactive cross-platform mobile development framework that uses the Dart language. Dart and Flutter have been created by Google who’s using the framework for some of its biggest application and is constantly pushing the framework towards being the ultimate solution for creating cross-platform apps. Its initial alpha release was back in may 2017
The main building block of a Flutter application is a widget. Widgets are analogous to components in React Native. Flutter comes with a large number of ready-to-use widgets, most of which implement the material design concepts. There are two types of widgets, stateless widgets, and stateful widgets, just like class and functional components in React.
The application is compiled ahead-of-time into native ARM code, not at runtime as in React Native. This gives better performance because there’s no JS bridge in the middle to parse and execute the code. However it also means there’s no over-the-air update option by downloading a new bundle of JS code at runtime.
Flutter is not a wrapper on top of the iOS/Android-specific native UI components, it really draws the UI from scratch on a ‘screen canvas’, through a fast C++ 2D graphics library called Skia.
Coming to cross-platform solutions like React Native and Flutter, performance should not be a problem for typical apps. Creating an app for both platforms at the same time makes it much easier to keep them aligned at all times.
Cross platform simply does not provide the amount of user interface power as native mobile does, so for apps that require a highly complex UI or sophisticated animations it might not be the best choice. But for simple-looking apps it is a better option because of the way Flexbox handles responsive UI layout, as well as the simple and intuitive structuring of the XML components.
Cross platform is much more effective if used by developers who already have experience with native mobile development, because it doesn’t completely remove the need of going native.
While native iOS and Android are here to stay, and they will remain with us in the foreseeable future, the future of React Native and Flutter are uncertain. It is true that cross platform community is growing and expanding very quickly, we still have to wait and see where it goes.