Capacitor vs Cordova#

Teams building Web Native apps (known historically as Hybrid apps), are likely evaluating the two leading platforms in the ecosystem: Cordova and Capacitor.

While the two projects are similar in that both enable web developers to deploy web apps across iOS and Android, and extend their app with native functionality, that's where the similarities end, especially for enterprise app development teams.

Ionic's flagship open source project, Ionic Framework, supports both Cordova and Capacitor, but the decision between the two becomes more important for enterprises looking for official support, and alignment with the rest of the Ionic stack.

Capacitor#

Official Ionic native runtime for Web Native apps on the Ionic stack.

Pros

  • Officially-supported Ionic product (with an active enterprise subscription)
  • High user satisfaction ratings[1]
  • Improved Developer Experience
  • Progressive Web App (PWA) Support
  • Backwards-compatible support for most Cordova plugins
  • Newer, uses modern JavaScript and TypeScript
  • Easier integration with Native APIs

Cons

  • May not support all Cordova plugins
  • Newer, younger community and ecosystem

Cordova#

Legacy native runtime on the Ionic stack. Project of the Apache Software Foundation.

Pros

Cons

  • Low user-satisfaction ratings [1][2]
  • Not based on modern JavaScript or TypeScript
  • Difficult to build plugins or add custom native code

Resources#

In our opinion

Capacitor is a must if you want stay in sync with the Ionic stack. We built it to improve one of the most important pieces of the Ionic experience, and because we fully control and own it, we are able to fine-tune the experience to fit into the rest of our offerings which we've started doing in earnest.

One of the biggest improvements Capacitor makes is making it easier to extend your app with custom native functionality. Our mantra is "you should never get stuck," meaning you should always be able to drop down to native to add any functionality your app needs. As someone that built many Cordova plugins in the past, the difference between Capacitor and Cordova on this point is pretty stark. Capacitor treats your native projects as actual source artifacts you check into source control and can fully edit, making it simple to install a custom native library or code in a plugin right into the app (instead of as a standalone plugin project which is more difficult to work with).

Perhaps most significantly, with Capacitor you can follow any stack overflow or native SDK documentation and copy and paste the exact same code a native developer would to add a small bit of native functionality. With Cordova, there was often a "Cordova way to do something" but with Capacitor you're fully aligned with typical native developer techniques when necessary.

Beyond that, Capacitor is built and maintained by the Ionic team, with dedicated support available to teams with an enterprise subscription. This is unheard of in the frontend world, and we're proud of the teams that find our offering to be the sweet spot between open source and enterprise proprietary platforms.

Max Lynch
Max LynchIonic co-founder and Creator of Capacitor