Flutter vs Native — How Flutter is moving ahead than other Cross Platform Frameworks?

Variance InfoTech Pvt Ltd
5 min readOct 26, 2020

Flutter ? — Its promising word itself for Cross Platform Apps Development.

Today we’re gonna talk about Flutter vs Native apps comparison. We’re gonna cover about Architectures, Languages used in both to develop apps and Pros and Cons.

Flutter:

Overview

Flutter is an open-source framework developed by Google for building applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia from a single codebase. Also, it supports developing applications for the web.

I’ll give a quick and short description of Google Fuchsia, if you don’t know. I’ll cover more on the current hot topic Flutter vs Native Apps, as this article is about the same. I’ll write another article for Google Fuchsia in which we’ll talk about Fuchsia in more detail.

Google Fuchsia is an upcoming operating system that is also being currently developed by Google. As described here, it can run on many platforms like Embedded Systems (like Traffic Lights and Smartwatches), Smartphones, Tablets, and Personal Computers. You can discover more about Fuchsia here.

Now, back to our track, Flutter. In Flutter, apps are written in the Dart language. On Windows, macOS, and Linux, flutter runs in the Dart virtual machine. It uses a just-in-time compiler when writing and debugging an app.

For creating release versions of Flutter apps, apps are compiled with a ahead-of-time (AOT) compiler on both Android and iOS which makes Flutter apps high performance on mobile devices.

Architecture

Flutter is designed as an extensible, layered system. It exists as a series of independent libraries that each depend on the underlying layer. No layer has privileged access to the layer below, and every part of the framework level is designed to be optional and replaceable.

When in development, Flutter apps run in a Virtual Machine which offers stateful hot reload of changes without needing a full recompile. For release, Flutter apps are compiled directly to machine code, whether Intel x64 or ARM instructions, or to JavaScript if targeting the web. Widgets and Renderer are moved into App rather than Platform. This makes Widgets to become more customisable and extensible. This helps Flutter to aim 60 frames per second (fps) performance, or 120 fps performance on devices capable of 120Hz updates.

Language

Flutter uses Dart which has a C- style syntax. It is an object-oriented, class-defined language. It also has the garbage collector to clear memory and provide efficiency in apps. Below are some of the Dart features described. Dart uses AOT (Ahead of Time) compilation which helps to make apps startup fast. Also, because of AOT compilation, Flutter widgets can be fully customised according to the need. It also has JIT (Just In Time) compilation which allows developers to make changes to an app and compile only the changes made without recompiling the whole app again. This makes app development a lot faster. It has declarative Syntax which makes code easier to read.

Dart features:

  • Flexible imports and exports
  • Constructors
  • Named and optional parameters
  • Constants
  • Cascade notation
  • Null-safe operators
  • Optional dynamic typing
  • Callable Objects
  • Collection if/for and spreads
  • Asynchronous Programming
  • Isolates

Pros

  • Cross-platform: Flutter currently supports to build apps for as shown here, on Android, iOS, Desktop (Windows, Linux, macOS), Web. And last but not least Google’s new operating system Fuchsia which is shown as the OS that can be installed on any platform like Smartphones, Tablets, Desktops, and Embedded Devices.
  • Hot Reload: Flutter provides Hot Reload with which you can make changes to the app and view instantly without recompiling the whole app again.
  • Customisation: Flutter allows you to customise it’s Widgets, with which you can build any layout you wish to build. Besides that, there are lots of animations for making apps interactive.

Cons

  • App Size: Flutter app sizes are large compared to Native apps. A Flutter Hello World app takes around 7.5 MB of storage space.
  • Libraries: In comparison of Native platforms, there are fewer libraries available for Flutter.

Native:

Overview

Native apps as the name suggests specifically are created for and works only on their respective platforms. The two main platforms for smartphones and tablets are Android and iOS. Native apps are written in their respective platform defined languages. Because apps are built to be used on a particular platform only, it can access device hardware easily. Hence, the native app gives better performance.

Architecture

In Native Architecture, whether it is Android or iOS, Widgets are part of the platform and not of application. So, for creating widgets, application code has to talk with the Platform for creating Widgets or accessing Services like Audio, Sensors, Camera, etc. This is where native architecture differs from Flutter. This binds the apps to work on only its particular platform and not on other platforms.

Language

Android: Kotlin is considered as the first language to make Android apps as announced by Google at Google I/O 2019. However, Java (deprecated) still can also be used to build apps for Android. Also, there is availability of NDK (Native Development Kit) which allows to code in C/C++. It provides platform libraries which you can use to manage native activities. Also, you can access physical device components, such as sensors and touch input.

Kotlin features:

  • Clean, compact syntax.
  • Single type system.
  • Null safety.
  • Functions and functional programming.
  • Data classes.
  • Extensions.
  • Operator overloading.
  • Top-level objects and the Singleton pattern.

iOS: Swift as the primary and recommended language to make iOS apps. Swift programming language is developed by Apple. Currently, Swift 5.3 is the latest release. You can also use Objective-C which is also developed by Apple to make Native iOS apps.

Swift features:

  • Closures unified with function pointers.
  • Tuples and multiple return values.
  • Generics.
  • Fast and concise iteration over a range or collection.
  • Structs that support methods, extensions, and protocols.
  • Functional programming patterns, e.g., map and filter.
  • Powerful error handling built-in.
  • Advanced control flow with do, guard, defer, and repeat keywords.

Pros (Common for both Android and iOS)

  • High Performance: As the native languages are specifically designed and made for the particular platform, it has the high performance ratio over Cross-Platform apps.
  • Better UI/UX: Native apps integrate with the operating system flawlessly. So, the UI/UX performance is better on native platform.

Cons (Common for both Android and iOS)

  • Costly: As the native app specifically runs only on it’s platform, different teams are required to develop apps for each native platform separately. Hence, it is costly.
  • Time Consuming: The native app development for each platform requires different code. So, it requires more time than Cross-Platform. Hence, it is time consuming.

--

--

Variance InfoTech Pvt Ltd

Leading vTiger Open Source, Salesforce & SuiteCRM CRM solution consultants in India. Delivered 20+ iOS & Android Mobile app solutions.