Cross-platform development has revolutionized the way developers create mobile applications, offering a shared codebase that can be deployed across multiple platforms. With this approach, developers can save time and resources by targeting multiple platforms with a single codebase. But which framework is best suited for swift app development? In this article, we'll compare Ionic and Felgo to help you decide.

Differences between Cross-Platform Frameworks

Before diving into the comparison, let's explore the history of cross-platform development. Early approaches involved displaying apps within a WebView, relying on the browser engine to render app elements. This approach is still used by many frameworks, including Ionic. However, this method has limitations, as standard web apps running inside a browser cannot access native device features.

On the other hand, tools like Cordova and Ionic's Capacitor provide a web-to-native bridge, granting access to functionalities like localization in a WebView. But what sets these frameworks apart? Let's examine the rendering process of hybrid frameworks like Ionic.

Rendering with a WebView

Hybrid frameworks, such as Ionic, render their content within a WebView, which is wrapped with APIs to access native device features. However, this approach has some drawbacks:

  • Performance depends on the internal version of the WebView used in the targeted OS.
  • You rely on Apple and Google to add features and improve performance.
  • Maintainability can be challenging due to the need to support multiple browser versions and types.
  • Web renderers were designed for displaying websites or multimedia content, not user interfaces and animations. This leads to slower performance compared to native apps.

The Felgo Approach

Felgo takes a different approach by compiling real native applications without relying on a WebView. Its UI elements are rendered using the Qt rendering engine built on C++ and OpenGL ES/Vulkan/Metal. This "scene graph renderer" is optimized for performance, ensuring that the UI looks consistent across devices and platforms.

Moreover, Felgo allows you to reuse your existing native iOS, Android, or C++ code thanks to its architecture. The core language behind Qt and Felgo is C++, which is renowned for its performance and stability. However, it's not ideal for creating modern UIs and cutting-edge applications. That's why Qt introduced QML, a declarative language that lets you compose your UI as a tree of visual items.

For adding application logic, QML relies on JavaScript. This makes it easy for developers familiar with web technologies to get started. Felgo comes with everything you need to build stunning applications quickly. To achieve native performance, all QML items translate to performant C++ components in the backend.

Inside the Frameworks

Let's examine the architecture of both frameworks. Ionic needs a bridge to access OS functionalities like a camera, relying on the browser to render your code. This means you'll need to rely on this bridge to access native features.

Felgo, on the other hand, doesn't require an additional bridge to access OS functionalities. You have direct access to all platform features with native code in your application. This includes the highly performant QML Engine, which is part of your Qt application.

Framework Business Potential

When considering business potential, there are a few things to keep in mind. First, you need to consider current staff experience. When developing with Ionic, you'll need a team with knowledge about web app development. If they lack some of these skills, training will be required.

With Felgo, the main skill your team should have is knowledge of JavaScript, as QML is derived from it. Since JS is one of the most popular programming languages, the probability that your fellow programmers have this ability is quite high. If you already work with programmers who have JavaScript knowledge, it's easy to reuse their skills in a new Felgo project.

Another aspect to consider is supported platforms. Ionic supports only iOS and Android, while Felgo allows deployment to Windows, Mac, Linux, and embedded systems.

By comparing the strengths and limitations of Ionic and Felgo, you can make an informed decision about which framework best suits your swift app development needs.