Blog

Flutter vs. Apache Cordova: Which one is better for your application?
Mobile app upgradeFlutter

Flutter vs. Apache Cordova: Which one is better for your application?

4.07.2023

Cordova and Flutter are versatile technologies that facilitate the development of cross-platform applications. However, while Cordova is definitely an older technology, Flutter represents the cutting edge of the field. Which one should you choose for your application? This article will help you make a more informed decision!

Should you opt for native or hybrid applications for your project?

To launch a mobile application, you need to target users across two major platforms – iOS and Android. As a result, you may need to create the same application twice using two different technologies. This requires at least two teams of developers to tackle identical problems, leading to considerable costs, which small to medium businesses might find expensive and restraining. Therefore, developing a hybrid application could be a cost-effective alternative. It allows a single development team to create an application using one code base for any platform. Furthermore, it’s often difficult for end users to distinguish between a native and a hybrid application, especially with recent technology advancements. This has led to a surge in hybrid applications’ popularity, and the demand for developers skilled in these technologies is consistently rising.

What is Cordova?

Flutter and Apache Cordova are both versatile tools for cross-platform app development. They allow developers to code once and deploy on multiple platforms, proving cost-effective for small to medium businesses. However, choosing between these two depends on your specific project requirements, the skill set of your team, and long-term considerations.

Apache Cordova, an open-source platform created by Nitobi in 2009, facilitates the development of mobile apps using standard web technologies like JavaScript, HTML5, and CSS3. Cordova applications function much like web apps running inside a mobile browser. This flexibility allows developers to use any JavaScript library or framework per the project’s needs. Consequently, developers familiar with these languages can get started with Cordova development more easily, thereby reducing the initial setup time.

However, Cordova apps run in a WebView, which may impact performance on less powerful devices. Consequently, apps built with web-based frameworks like Cordova could face performance issues. Additionally, Cordova’s UI maintains a uniform look across different platforms, which may not always provide a native feel to users. It’s also worth noting that Cordova, while offering some debugging tools, lacks automated code analysis functions like Flutter, potentially increasing project complexity.

What is Flutter?

Flutter, a cross-platform framework introduced by Google in 2017, is based on Dart, another Google-developed language. Learning Dart might require some time and effort, but the rapidly growing Flutter community provides ample resources for self-study, and numerous courses are available.

Flutter’s unique feature is its graphics engine, Skia, and widget-based app structure. These ensure high-speed performance, fast rendering, and a smooth user experience, even on platforms with older hardware. Flutter also supports automated testing to quickly identify potential mistakes in the code and a Hot Reload feature to instantly update the app after any code changes, saving recompilation time.

In terms of UI, Flutter gives developers a choice between a native-like appearance or a uniform design for all platforms. Instead of using native UI elements of the platform, it automatically updates the look and feel according to its visual style, offering a more native-like feel.

Currently, Flutter’s future appears more promising than Cordova’s. Despite being relatively new, it’s supported and promoted by Google and has become the most popular cross-platform framework, while Cordova’s popularity has been declining. However, Cordova’s simplicity and its foundation on widely-known web technologies make it a viable tool for quick prototyping and building simple apps.

In conclusion, both Flutter and Apache Cordova have their strengths and weaknesses. The choice between them should be guided by your specific project needs, the performance requirements of your application, and the skills and preferences of your development team.


We help companies choose the best solution

We are helping companies find the best solutions for their goals.

Or just write an email

Development

Cordova

Cordova’s flexibility is its primary strength. It offers developers the freedom to choose their application-building approach. You can run an application built with various JavaScript frameworks such as Angular, React, Vue, or even a simple HTML view, demonstrating that Cordova functions much like a web application.

The primary focus of development work is on the web browser rather than the phone, which means that any web developer familiar with browser debugging tools should navigate Cordova application debugging comfortably.

However, Cordova does have its shortcomings. It lacks certain productivity-enhancing tools, such as Live Reload. This tool lets developers see their code modifications’ impact in real-time, speeding up the development process. Although developers can add this feature, it requires manual effort, adding another layer of complexity and dependencies to the project.

From one perspective, this can be advantageous, as the project remains lean with only the necessary tools added. However, each additional integration increases the project’s dependency chain, which can become challenging to manage over time, especially considering that Live Reload and other productivity tools are becoming standard offerings in modern development frameworks.

Flutter

Flutter, based on the Dart programming language developed by Google, compiles into native code, meaning developers work directly on the target device’s platform. This results in a streamlined development experience with immediate feedback on the device.

Here’s how you can create a simple Flutter application:

# Install the Flutter SDK

# Visit https://flutter.dev/docs/get-started/install for instructions

# Create a new Flutter application

flutter create my_flutter_app

# Run the application

flutter run

The Flutter setup involves a few minutes of configuration, primarily related to installing the Flutter SDK on your machine. However, once past the initial setup, developers can leverage built-in tools that significantly accelerate and simplify development. For instance, the 'hot-reload’ feature is available in Flutter right out of the box. This feature allows developers to view the effects of their code changes in real-time without manually rebuilding the entire application, saving substantial time.

One of Flutter’s most unique features is its approach to UI rendering. All views in Flutter are drawn in 2D, ensuring consistent appearance across various platforms such as iOS, Android, or web browsers. Consequently, a Flutter application will look identical whether you’re running it on an iPhone, an Android device, or a web browser.

Furthermore, when constructing views in Flutter, developers are not limited to the components offered by the system. Instead, they can create fully custom and unique views, leading to highly differentiated and optimized applications.

Here’s an example of how custom widgets can be used in Flutter:

import 'package:flutter/material.dart';

class CustomButton extends StatelessWidget {

  final String buttonText;

  CustomButton(this.buttonText);

  @override

  Widget build(BuildContext context) {

    return RaisedButton(

      color: Colors.blue,

      textColor: Colors.white,

      child: Text(buttonText),

      onPressed: () {

        // Handle button action here

      },

    );

  }

}

With some experience, developers can create applications running at a smooth 120 frames per second. This, coupled with Flutter’s unique benefits and Google’s backing, makes it a compelling choice for cross-platform application development.

Popularity & Stability

Cordova

Over the years, Cordova’s popularity has steadily declined. According to data from Statista, Cordova’s market share dropped from 29 percent in 2019 to 16 percent in 2021, illustrating a substantial decrease in preference for this technology. Furthermore, key services, including Visual Studio App Center, have discontinued their support for Cordova. This downward trend signals a potentially uncertain future for Cordova. If this decline persists, it might raise security issues in the coming years, potentially leading to the removal of Cordova-based apps from app marketplaces. The steady decrease in usage and support raises significant questions about the sustainability and longevity of Cordova-based applications.

Flutter

In contrast, Flutter has been experiencing an impressive increase in popularity. Despite being relatively new in the field of hybrid application development technologies, Flutter has managed to outpace its competitors, including React Native, and it’s currently the preferred technology for developing hybrid applications for mobile devices. Given the ongoing trend and lack of serious competition, Flutter’s popularity will likely continue rising.

Notably, Flutter is the primary tool for application development on Fuchsia OS, Google’s promising new operating system. With Fuchsia OS potentially making its way into mobile phones and IoT devices in the future, Flutter’s significance in the application development landscape is expected to grow. This highlights Flutter’s stability as a technology and its promising future trajectory, making it an attractive choice for developers and businesses alike.

Developer Productivity

Cordova

As a JavaScript-based technology, Cordova provides a familiar working environment for JavaScript developers. Debugging is primarily executed in the browser, which is intuitive for developers proficient in JavaScript. However, it’s worth noting that Cordova lacks many advanced tools that newer technologies, like Flutter, provide as standard.

Cordova lacks automated code analysis functions present in Flutter, which can affect the development process’s efficiency. While it’s possible to integrate tools like hot-reload, akin to Flutter’s Hot Reload feature, through community-built resources, this adds an extra layer of complexity, which can impact development speed and potentially increase project complexity. Therefore, while Cordova offers the ease of a familiar language, it might require extra effort to optimize productivity.

Flutter

In contrast, Flutter is packed with features designed to boost developer productivity. Creating and configuring a new project is quick, and features like automated testing and hot-reload are readily available. This provides a real-time development experience where developers can instantly build an application and preview changes.

However, the transition to Flutter might pose a challenge due to its use of Dart, which could be unfamiliar to developers from different technology backgrounds. Initially designed for mobile applications (now supporting desktop and web applications), Flutter is backed by Google and uses its own graphics engine, Skia, to ensure high-speed performance and fast rendering. Developers experienced with native languages like Kotlin or Swift may find it easier to adapt to Flutter as they can comfortably implement native components.

In terms of popularity, as of the latest data, Flutter and Cordova hold second and third places, respectively, among the most popular cross-platform development frameworks. Cordova’s popularity has been decreasing, while Flutter’s future looks promising as it continues to gain traction in the developer community.

Summary – which technology is best for your project?

Deciding between Cordova and Flutter is a decision that hinges on your project’s specific requirements and your development team’s expertise.

Apache Cordova, established by Nitobi in 2009 and later rebranded as PhoneGap is based on JavaScript, HTML5, and CSS3. It can be an appropriate choice for crafting Proof of Concepts (POC) or Minimum Viable Products (MVP) if you have a team adept at JavaScript. The framework has the advantage of being familiar and easy to use for those skilled in JavaScript and standard web technologies​1​. However, Cordova’s waning popularity and the fact that some services are gradually phasing it out could make it less than ideal for projects that need to be developed and maintained over the long term​1​.

On the other hand, Flutter, a newer framework first presented by Google in 2017, has quickly become a powerful and efficient tool for hybrid application development. Flutter’s popularity is rapidly growing, boasting a large community of developers. With Google’s strong support and an extensive library of widgets for creating modern mobile applications, Flutter is well-positioned to dominate the hybrid application market in the coming years​1​.

If your project is set on a JavaScript-based application and Cordova doesn’t meet your expectations, there are other compelling JavaScript technologies to consider. This includes React Native, a popular framework used by companies like Facebook, Instagram, Pinterest, and Tesla​2​.

Remember, the final choice of technology should align with your project’s needs, your team’s capabilities, and your long-term maintenance and growth plans. I am still in the process of gathering more statistics and quotes to support these arguments further.


We help companies choose the best solution

We are helping companies find the best solutions for their goals.

Or just write an email
Adam Kaczmarzyk
Adam KaczmarzykPrincipal Engineer, Flutter developer

NEWSLETTER


Get latest insights ideas and inspiration


We help companies choose the best solution

NEWSLETTER
Get latest insights, ideas and inspiration

Take your app development and management further with Codigee

HIRE US

We help companies choose the best solution

We are helping companies find the best solutions for their goals.

Let's make something together.


If you have any questions about a new project or other inquiries, feel free to contact us. We will get back to you as soon as possible.

We await your application.


At Codigee, we are looking for technology enthusiasts who like to work in a unique atmosphere and derive pure satisfaction from new challenges. Don't wait and join the ranks of Flutter leaders now!

We are using cookies. Learn more