Native Languages or Cross-platform Frameworks

As a software engineer I am keen on efficiency, optimization and lightweight code. It is a no-brainer that for a mobile app I need to go with native languages like Swift or Kotlin. Maybe even Objective-C or Java. It would allow me to have better control of how the app is engineered and optimized. That was my initial thought. But as I do more research, I’m seeing that I may not need to go to such lengths for my use case. In fact, utilizing native languages incorrectly can achieve the opposite ending up with something that’s over-engineered and inefficient.

When to Use Native Languages?

Native languages are better for intensive apps that utilize a lot of memory and CPU power because it allows the developer to have better control of an app’s underlying performance. Developers also have direct access to the phone’s hardware and software features (such as camera, notifications and GPS). Apps built on native languages are specifically tailored to their respective platform instead of trying to accommodate every platform. Even though iOS and Android devices share similar features and functionality, they are built differently underneath. Strategies that optimize an app on iOS may not be applicable to Android and vice versa. Native languages give developers direct access and full control to optimize as needed.

Full control is a double-edged sword. With everything being so freeform it is also up to the developer to engineer a proper structure for apps built on native languages. For inexperienced developers who are not careful, optimization can easily turn into inefficiency. Therefore it is important to assess the complexity of what I’m building when making a decision. Good examples that warrant native language development include 3D gaming, augmented reality, or image / video editing. Apps that require a complicated algorithm or heavy customizations are also good candidates.

Hybrid Cross-platform Frameworks

On the other end of the spectrum for less complex apps, cross-platform frameworks like React Native and Flutter aim to take the pain out of app development. There are other frameworks available, but I am narrowing my focus to the two most popular based on developer adoption over the years. These frameworks come with a suite of commonly used components and features that is sufficient for a majority of run-of-the-mill apps. Access to the phone’s hardware and software features need intermediary plugins available within each framework. Both frameworks take a hybrid approach so developers don’t have to worry about coding in native languages but the option is there if they need it.

Keep It 100 is not a complex app. It will read data from a database, retrieve assets, and then display everything to the user. The buyer / seller communication aspect of the app will be close to, but not quite a real-time chatting interface. The proximity of Keep It 100 to a web app (in fact I plan to extend it to a web app in the future) allows a web developer like myself to transition seamlessly to app development. I take all these factors into consideration as I weigh my options.

And the Winner is…

I think Keep It 100 will be best built with a cross-platform framework rather than engineered from scratch with native languages. If I come across something that I can’t do with the frameworks, I still have the option to modify the native code directly. It is the best of both worlds. Which framework will it be? I went with React Native and here is list of reasons why:

  • Flutter is powered by the Dart programming language. React Native is based on Javascript. As a web developer, I’m already familiar with Javascript and React. The idea of having to learn Dart even though it claims to be very simple is not as appealing as Javascript. Not having much of a learning curve is ideal for my first app endeavor.
  • Historically Flutter tends to yield a larger file size than React Native for the app’s final build. Flutter has improved with recent updates and in some instances builds claim to be smaller. The improvements are still not compelling enough to replace React Native.
  • React Native has a larger support community overall. It also has more extensions and plugins than Flutter. This is important for a first time app developer. I will have a lot of questions and unknowns. As previously mentioned, I am reliant on Stack Overflow and will need the support community to carry me through this project.
  • React Native will allow me to create a unified codebase. I will have a lot of reusable components and code in the future when I build a web app counterpart for Keep It 100.
  • Some of the other online marketplace apps that I reviewed are also built on React Native. This means it is a proven solution for my use case. I don’t want to choose an option just because similar established apps are doing the same thing, but it does offer some guidance and assurance.

What About Expo?

There is also a framework on top of React Native call Expo. Expo has great tools for building apps quickly and with ease. It comes packaged with common components that cover most app use cases freeing developers from needing to interact with native code at all. As great as that sounds, I will not be utilizing Expo for Keep It 100. The lack of access to native code when necessary creates possible roadblocks in the future. I want to retain the hybrid flexibility that React Native allows.