stefangaller.at

cross-platform-development.png

What is Cross-Platform Development?

Perhaps you’ve already encountered the terms cross-platform development and native development several times. Here I want to explain how these two approaches differ and when each approach might be right for you.

Cross-Platform vs. Native

To begin, let me explain the concepts we’re actually talking about. What exactly is cross-platform development and what does native mean?

Native Mobile Apps

In the context of software – especially apps – native essentially means “made directly for the operating system”.

For Android, this means the app was written in Java or Kotlin and directly uses the development interfaces provided by Google. For the Apple universe, it means that a native iOS app was written in Swift (or previously in Objective-C).

These are essentially apps that are programmed the way the operating system manufacturers intended. As we’ll see later, this approach comes with advantages, but also has disadvantages.

The Problem with Native Apps

If I want to program an app for just one operating system, there isn’t much against native development. But as soon as I want to develop an app for both Android and iOS, I face the problem of having to develop the same logic in two different programming languages. However, not only the languages differ, but also the concepts used.

If I now want to develop an app for both systems, I need developers who either have experience with both platforms, or different developers for each platform.

This leads to the following problems:

  • I have to implement the same app multiple times (once per platform)
  • Developers need to switch between different technologies
  • Teams working in parallel can lead to different development stages depending on the platform (e.g., Android “lags behind”)

To overcome these problems, there has always been an effort to find a way to write code that can be used across different platforms.

Cross-Platform Apps

The history of cross-platform apps actually begins before apps even existed.

When we open a website, it doesn’t matter whether we’re browsing on Android, Windows, or our Xbox. The browser takes care of the underlying operating system and handles the display of data: Simply put, websites are something like cross-platform “apps”.

HTML-based Apps

It’s not surprising, therefore, that the first cross-platform apps were websites embedded in apps. With frameworks like Cordova and Capacitor, it’s possible to use HTML, JavaScript, and CSS to develop apps for Android and iOS. These frameworks also allow access to platform-specific features like sensors.

The early mobile versions of Facebook also followed this approach. However, performance problems and bugs accumulated, which is why Facebook decided to choose an alternative approach.

React Native

In 2015, Facebook introduced React Native, which builds on its React Framework. Instead of displaying an HTML page like a browser, native UI elements are used for the user interface. This allows them to be displayed as in a native app. The logic continues to be implemented in JavaScript or TypeScript.

The framework and libraries handle a large part of the operating system-specific operations for the developer. Therefore, a large part of the code can be developed independently of the operating system.

Flutter

Google took a different approach when they introduced the first version of Flutter in 2017. Instead of accessing the existing UI building blocks, they developed a high-performance graphics library that can display graphic elements at the pixel level at up to 120 frames per second.

Another difference from React Native is the use of Dart as the programming language. This makes Flutter one of the few cross-platform frameworks that doesn’t use JavaScript or TypeScript.

As with React Native, a variety of libraries are available that handle platform-specific implementations for the developer.

Frequency of Native vs React Native vs Flutter

app-shares-by-technology.png
Distribution of different technologies. © appfigures.com

An analysis by appfigures shows which frameworks are used for development. However, it should be noted that when using Flutter and React Native, the native framework (Swift or Kotlin) is additionally used. Multiple mentions are therefore possible.

In summary, this means that on Android, every 3rd app was developed with Flutter or React Native. For iOS, it’s at least every 4th app.

Arguments For and Against Cross-Platform Development

Should you use cross-platform development for your next project? As with many questions of this kind, the answer is: It depends.

In the following, I would like to compare the reasons for and against using it, thus providing a decision aid.

Reasons for Cross-Platform Development

My app should look the same on all systems.

If a unified “look” for my app is important to me, Flutter in particular is a good choice. Because all UI elements are drawn at the pixel level by the Flutter framework, I can ensure that the design language is implemented as desired on all platforms.

Additionally, the user interface for all operating systems is generated from the same code. An unintended deviation is therefore not possible. With native development, I have to verify myself that the UI looks the same on all platforms.

I have limited time and financial resources.

If I have to develop the same app multiple times, it naturally costs more time and money. Either I have to hire two developers who each create a version for Android and iOS at the same time, or I need one developer who creates the apps one after the other. Even the exact same logic has to be implemented anew in the respective programming language.

With cross-platform development, this duplication is eliminated. Only in exceptional cases do I need to write platform-specific code.

Furthermore, Flutter and React Native support “hot-reload”. This means that changes in the code are immediately visible without having to rebuild the app. This instant feedback allows for a significant speed improvement in the development process.

I/my team already has experience with JavaScript, TypeScript, or Dart.

If you or your team already have experience with JavaScript or TypeScript, it naturally makes sense to bring your expertise into app implementation. In this case, React Native would probably be the ideal choice.

Dart is relatively similar to JavaScript, so it can also be learned very easily. In my opinion, the language has some advantages over JavaScript, but more on that later.

I want to be able to easily serve other systems (web, desktop) in the future.

Are you already thinking about bringing your app to market as a web or desktop app as well? Then with the development of a cross-platform app, you’ve already done a large part of your work.

Flutter apps can also be directly generated as web and desktop apps for Windows, Linux, and macOS. This can save you a lot of time and accelerate your market entry.

Reasons Against Cross-Platform Development

I only need my app for Android or iOS.

If you’re sure that your app will be used on only one platform, you’re probably better advised to implement it directly for the selected system. Most advantages of cross-platform development are based on the idea of being able to reuse the same code. If this argument doesn’t apply to you, you’re (usually) better off with native development.

I already have experience with native development.

You or your team already program fluently in Swift and Kotlin? Then it’s highly likely better to rely on these strengths and conduct the project in a familiar environment.

Often there are multiple ways to achieve a goal. In this case, I would decide in favor of experience.

My app requires many platform-specific adjustments.

Do you want to be the first to use the latest killer feature of the next iPhone? In this case, too, native development is the better idea. Although you can also connect native code with React Native and Flutter, it’s usually more work than developing natively directly. Also, with platform-specific features, I always have to ask myself how to represent this function on the other operating systems.

If you’re writing a large part of the code dependent on the operating system anyway, you might as well develop the app natively.

I want to be as close as possible to the native “look & feel”.

Since React Native also uses the native UI elements, this point is more directed against the use of Flutter.

Although Flutter also includes a library of recreated iOS design elements, these don’t fully match the specifications. Additionally, it usually takes some time before new iOS elements are available for Flutter.

Flutter as My Choice for Cross-Platform Development

Native Android development was my entry into programming mobile apps. However, for me, who has implemented many projects alone, the limitation to a single system was a major drawback. But additionally developing the apps for iOS was not an option for me. Programming apps a second time, instead of implementing new features, sounded unappealing.

So I experimented early on with cross-platform approaches like Cordova, but was not convinced by the performance of the available frameworks.

It wasn’t until I developed my first Flutter app that it became clear to me: Cross-platform development can be this easy.

Through “hot-reload”, I could easily see the effect of my changes. The implementation of the UI with its reusable nature was a welcome advantage over the (at that time common) XML hell in Android.

With Flutter, I now also have the possibility, as a single developer, to implement projects that would have previously required a development team.

Among other things, I developed the travel expense app Trexpense completely on my own. Thanks to Flutter, it’s available for Android and iOS.

Why Not React Native

Flutter is my first choice when it comes to cross-platform development. For me, this has the following reasons:

  • Unified appearance: The pixel-perfect implementation of the user interface ensures a consistent presentation of the brand.
  • High code quality through Dart: Dart is a modern programming language that places great emphasis on detecting errors during development. Avoiding errors in production is essential for high user satisfaction.
  • Excellent documentation: The documentation provides reliable information on a wide variety of questions. This reduces the time needed for problem-solving.

Implementing a Flutter Project Together

I hope I could help you figure out which development approach is best for your next project.

If, like me, you’re convinced by cross-platform development with Flutter, I would be very happy to implement your next project together.

Let’s use the advantages of Flutter development together:

  • Rapid market introduction: Short development time through simultaneous implementation for all platforms.
  • Cost efficiency: Fewer developers mean lower costs.
  • Future-proofing: Your app can easily be extended for web or desktop if needed.

Feel free to contact me and arrange a free initial consultation, where we can discuss your idea together. You can find all ways to get in touch with me on the Contact page.

Let's get started!

Contact me for a free initial consultation.

Contact me