Before We Get Started
Who is this article for?
So you have a cool idea, a new project you want to start, but you don’t know what framework would be best for your needs and the resources you have at your disposal.
You may be:
- a beginner who wants to learn mobile application development.
- a developer using one mobile application development framework who wants to try a different one.
- a team member on a project who needs help directing this new project.
This article will help all of you!
A heads-up
There are other frameworks out there, like Xamarin and ionic, which are not as popular and new as Flutter, React Native and Native apps, so I will not be covering them.
Also, another big reason is that I have no experience with those frameworks and I’m here to share what I’ve learned from three years of experience in mobile application development.
Hybrid or Native Apps?
The short answer would be to use native apps, always (if feasible).
The good
Nothing can beat the performance of a native Android and a native iOS application. Nothing can beat the level of control you have over the phone with native applications.
Facebook, the creators of the React/React Native Framework, rewrote their whole messenger app in the native application from a React native app, because it beats the power of a native app.
You’ll always be able to easily add complex new features to your native application and performance will be top-notch.
It has a very mature community. Its development has been going on for a long time and it has evolved and improved. Over the years it has become more powerful and efficient — so you can be sure that no other mobile framework will come along and kill native apps.
The bad
1. The biggest downside to native apps are the skills/resources required. Because of this, it will cost you a lot more than a hybrid platform.
You need to learn Kotlin/Java for Android Application Development and Swift/Objective-C for iOS application development. You also need a Mac machine to build the iOS application. This is one of the reasons why so many self-taught developers start with Android over iOS — they don’t have access to a mac.
So, you need more developers and resources to build and maintain the application for both Android and iOS.
2. Also, if you need to extend your application to web or desktop in the future, you would need to hire or learn skills for them separately — the existing codebase won’t help at all in targeting these platforms.
3. Lower developer productivity. It will take developers longer to achieve the same requirement for just their particular platforms they are working on as compared to the hybrid platforms. Hence, if you want to prototype faster and hit the market more quickly, native apps will take far more effort than hybrid applications.
Don’t even ask how much developer time it takes to build and run the native application at the time of development. In some places, the devs do have the bad habit of running the app more frequently, which leads to further loss of productivity.
Don’t even get me started on fixing those weird Gradle errors that come-in Android from time to time. They have improved a lot over the years but still, they are miles behind the build time for frameworks like Flutter and RN.
How to choose between Hybrid and Native
- Understand the requirements: If your mobile app has complex features that require you to access the smartphone’s full potential and capabilities then you will, in any case, have to go for a native app, just to be on the safe side.
- Understand the constraints: If you have enough Android and iOS developers/resources, enough time, and budget at your disposal then you can always go for the native app.
- If you can afford to focus on only one platform to begin with, taking on another platform in the future, then also you can go with native apps.
- If your app is simpler — focused on getting and displaying data from different sources, taking user inputs, and things like that (a data-driven app) — then look into the option of hybrid applications. You could save a lot of time and money.
- In short, native apps are always going to cost you more time and money. But the capabilities, confidence, and flexibility they offer to make your project scalable in the long run make the investment worth it.
So, if you know there’s a complex feature that you have to build, or if native application development is feasible even for your simple projects and you want to enjoy the power and scalability, then go with native application development.
If you’re still reading then you’re still not satisfied with native application development and want to explore and understand Hybrid applications. So let’s look at our final question.
Final Question — Flutter or React Native?
Flutter and React Native are almost opposites as frameworks and in how they approach mobile application development.
One started as a web framework and now has moved into the mobile space (React) while the other started as a Mobile Application framework but is now moving into Web and other platforms (Flutter).
This approach is reflected in how developers think, write, and maintain the codebase of these projects.
Have the right mindset
Neither framework is better than the other one, at least as of now.
There have been many varied opinions online since Flutter came in and you’re not expected to blindly follow any of them!
Youtube Search Results for “Flutter or React Native”
I won’t tell you which one to follow either, but you should understand what these frameworks offer, what their strengths and weaknesses are, and see what trade-offs you or your organization can make while adapting them to your projects. It’s you who has to decide which is better based on your requirements and constraints.
React Native
React Native is a cross-platform mobile application development framework created by Facebook.
The Good
1. Popular Tech: Flutter’s weakness is React Native’s strength. It’s been here for a while, so there’s a bigger community to support you and almost all SDKs provide support for React Native, including AWS.
2. Good support: You have a good number of third party packages and libraries for doing most of the things in react which applies to mobile and web are available for you to use.
3. No learning curve for experienced devs: If you have developers who have experience with building the web app in React, they can straight away get started with React Native and start working on React Native.
The Bad
1. Dependency on third-party libraries: The RN third-party packages also come from the open-sourced community. At times they are poorly maintained and some developers who have used these packages in the production environment caused a lot of problems and eventually were fired (true story).
2. Inconsistency in the UI elements: You have coded your mobile app for Android and now when you run the same app in iOS simulator, you may find inconsistencies that will need your additional attention to fix.
3. Bad backward compatibility: When you upgrade your React Native version, unfortunately, there’s a high risk of breaking your existing running project, which is a dev nightmare.
4. Poorer performance compared to Flutter: The React native runs on a JavaScript bridge on top of the device, while Flutter, which is developed in C and C++, compiles to the device’s Native ARM code which performs equivalent to native apps.
5. Hot Reloading is not perfect: While Flutter Hot Reloading works perfectly as expected, sometimes, RN hot reload just doesn’t do the job and you need to do a full restart of the application.
Flutter
Flutter is an open-sourced cross-platform application development framework developed by Google.
The Good
1. Performance: No other hybrid application framework can beat the performance of Flutter Applications. You will build the most performant apps with Flutter.
2. Developer Productivity: One of the Flutter flagship offerings is “Hot-Reload” which instantly deploys the changes in the code in the application saving hours of development and debugging time.
Also, the developers don’t need to be on a mac system to build Flutter apps for iOS, they can use tools like Codemagic to build the iOS app in Cloud for them.
3. Faster Prototyping: This faster development time also means you can reach your goals faster, hit the market to get user feedback sooner, and improve faster.
4. Batteries Included: Flutter framework helps you minimize your dependency on third-party packages. You can build all the basic features of an application without needing to install any external packages (the code can become a bit complex, but it’s possible).
5. Platforms: Single codebase is deployable to Android, iOS, web (as of today) and is coming soon for Desktop applications as well. The UI elements will look the same across all the platforms you run your code on.
6. Easy learning curve — Yes it’s completely new but all you have to do is learn Dart and get a basic understanding of how Flutter works and this little bit of investment will give huge returns in the future.
7. Flexibility to do Native Application Development: Sadly this is also one of its most overlooked strengths. Let’s see how amazing this is.
- For example, you have a feature in the project where you need to access the user’s smartwatch from their device. So far, you have built all the other features using the core Flutter Framework but now you don’t have that support (just imagine) to access the user’s Android or Apple Watch, what would you do?
- You know you can do them through the native Android and iOS SDKs. Now all you have to do is to use “Flutter Channels” and write the native Android and iOS code just to implement this feature, while the rest of the app still works flawlessly as a Flutter App. So, for just one feature you don’t have to slow down the whole project with native projects.
8. Amazing backward compatibility: If the flutter version is upgraded in your existing apps, your app will stay the same without any crashes which sadly is not the case with Native apps and React Native.
9. Already loved more than React Native: Flutter is newer in the market and has already become a more loved framework amongst dev community as shown in the Stackoverflow survey so that shows a strong future ahead.
The Bad
1. It’s an emerging tech — this is important to understand: It’s just been around two years since Flutter was released and a lot of SDKs for mobile applications are still not available from their official sources.
For example, AWS has no official support for Flutter as of today. You can still make things work with the help of community developed SDKs but they might not give you that confidence in production.
There are many useful packages that have been created by the ever-growing young Flutter community, which you can use to build awesome applications today. But you may have to wait for some SDKs.
So, do your research and see check your requirements to see whether you have sufficient SDKs available before you decide to use Flutter.
2. Fewer third-party packages supporting Flutter on multiple platform: While Flutter can support multiple platforms from a single code base, there are a lot of packages out there that also have to be upgraded to support these platforms.
For example, there are many packages that you can easily use in both Android and iOS but that same package might not be available for the web or macOS, hindering you from using Flutter to its full potential.
These two points will hopefully go away as Flutter and its community progress over time.
3. Freedom and flexibility: The freedom and flexibility to write the code in any way are seen as a strength in Flutter, but that flexibility also leaves room for bad decisions, which can leave your project code messy and unmaintainable in the longer run.
4. Learning a new framework: This can be a challenge for people who’ve been working in web or some other tech before. The way Flutter forces you to think and write code is different, so there’s a different style that the developer has to understand and think through. It requires you to learn some new things which can be a challenge for some people.
Choosing between React Native and Flutter
- If you’re a single developer or have a small team of developers and want to build beautiful, performing apps faster, and you want to release to web and other desktop platforms in the future, then go with Flutter.
- If you are coming from a web background, perhaps you already have a web app, then go with React Native to hit the market faster.
Conclusion
- Nothing beats native mobile app development and if you have the money and time to take on projects in native frameworks then that’s the best option. You get full control and flexibility at your disposal to scale your project in the future.
- Flutter is new but it’s growing rapidly, has great promise, and has delivered on its initial promise already. You and your team might be a little uncomfortable while you’re learning it, but then you’ll be seduced by the efficiency and developer experience.
- React Native has been around a while. It has great demand and great support to help you fulfill those demands. It has almost no learning curve for web developers and will help you quickly jump into building cross platforms mobile apps.