Softwr

Mobile Development · head to head

Apache Cordova vs Stimulus

Apache Cordova logo

Apache Cordova

Mobile Development

Open source framework for wrapping HTML, CSS and JavaScript apps as mobile apps

From
Free
Free plan
Yes
Stimulus logo

Stimulus

Web Development

Small JavaScript framework that adds behaviour to existing server rendered HTML

From
Free
Free plan
Yes

The short version

  • Stimulus is an MIT licensed JavaScript framework.
  • Both are free.
  • Only Apache Cordova lists platform feature support documentation; only Stimulus lists designed to pair with Turbo in Hotwire.
  • Where Apache Cordova falls short: apps render in a web view, so UI is not native by default.
  • Where Stimulus falls short: does not render templates, so HTML must come from the server or another tool.

How do Apache Cordova and Stimulus differ?

Apache Cordova and Stimulus differ on platforms, category (Mobile Development against Web Development) and year founded (2008 against 1999). Only the attributes on which Apache Cordova and Stimulus actually diverge.

Attributes where Apache Cordova and Stimulus differ
AttributeApache CordovaStimulus
PlatformsiOS, Android, Windows, macOS, LinuxWeb
CategoryMobile DevelopmentWeb Development
Founded20081999

Identical on both: starting price (Free), pricing model (Open-source), free tier (Yes).

Which features does each one have?

They share no listed features; 6 appear only for Apache Cordova and 7 only for Stimulus. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Apache Cordova

  • Single JavaScript API for device functions
  • Plugin system managed from the command line
  • Targets iOS, Android and Electron
  • HTML, CSS and JavaScript app code
  • Apache 2.0 open source licence
  • Platform feature support documentation

Only in Stimulus

  • Controllers attached through data-controller
  • Actions that bind DOM events to controller methods
  • Targets for locating elements inside a controller
  • Values that read, write and observe data attributes
  • Works with server rendered HTML
  • Designed to pair with Turbo in Hotwire
  • MIT licensed open source

What is each one used for?

Apache Cordova is most often brought in for wrapping an existing web app as a mobile app; Stimulus for adding small interactions to Rails views. The jobs each tool is most often brought in to do.

Apache Cordova

  • Wrapping an existing web app as a mobile appnot Stimulus
  • Single codebase for iOS and Androidnot Stimulus
  • Prototyping mobile apps with web skillsnot Stimulus
  • Accessing device features from JavaScript through pluginsnot Stimulus

Stimulus

  • Adding small interactions to Rails viewsnot Apache Cordova
  • Progressive enhancement of server rendered pagesnot Apache Cordova
  • Pairing with Turbo for fast page updatesnot Apache Cordova
  • Replacing scattered jQuery codenot Apache Cordova
  • Form and widget behaviour on existing HTMLnot Apache Cordova

Where do Apache Cordova and Stimulus fall short?

Apache Cordova's most cited limit: apps render in a web view, so UI is not native by default. Stimulus's: does not render templates, so HTML must come from the server or another tool. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Apache Cordova

  • Apps render in a web view, so UI is not native by default
  • No built-in UI component library or hosted build service
  • Adobe's PhoneGap Build cloud service was discontinued in 2020
  • Many platforms listed in older versions, such as BlackBerry and Tizen, are no longer supported

Stimulus

  • Does not render templates, so HTML must come from the server or another tool
  • No built in routing, data fetching or client side state management
  • Behaviour is tied to data attributes in markup, which some teams find harder to trace
  • Not a component framework, so large interactive interfaces need other libraries

How much do Apache Cordova and Stimulus cost?

Apache Cordova is free to use; Stimulus is free to use. Plan by plan below, from each vendor's own pricing page.

Apache Cordova

Free

No published plan breakdown. See the Apache Cordova review.

Stimulus

Free

No published plan breakdown. See the Stimulus review.

Which should you pick?

Choose Apache Cordova if

  • You need single javascript api for device functions.
  • You want to start without paying.
  • You work on iOS, Android, Windows, macOS, Linux.
  • You also want plugin system managed from the command line.

Choose Stimulus if

  • You need controllers attached through data-controller.
  • You want to start without paying.
  • You also want actions that bind dom events to controller methods.

Questions people ask

Is Apache Cordova or Stimulus better?
It depends on the job. Apache Cordova fits wrapping an existing web app as a mobile app; Stimulus fits adding small interactions to Rails views. Apache Cordova starts at Free and Stimulus at Free.
Which is cheaper, Apache Cordova or Stimulus?
Apache Cordova starts at Free and Stimulus at Free.
Does Apache Cordova or Stimulus run on more platforms?
Apache Cordova runs on iOS, Android, Windows, macOS, Linux. Stimulus runs on Web.
Can I use Apache Cordova for free?
Both have a free tier, so you can try either at no cost before committing.
What is Apache Cordova best used for?
Apache Cordova is most often used for wrapping an existing web app as a mobile app, single codebase for ios and android, prototyping mobile apps with web skills, accessing device features from javascript through plugins. Of those, wrapping an existing web app as a mobile app and single codebase for ios and android are not what Stimulus is typically brought in for.
What can Apache Cordova do that Stimulus cannot?
Apache Cordova covers Single JavaScript API for device functions, Plugin system managed from the command line, Targets iOS, Android and Electron, HTML, CSS and JavaScript app code. Stimulus covers Controllers attached through data-controller, Actions that bind DOM events to controller methods, Targets for locating elements inside a controller, Values that read, write and observe data attributes.

Answered from the vendors’ own pages

Apache Cordova: Is Apache Cordova free?

Yes. The project describes itself as free and open source under the Apache License 2.0, maintained by the Apache Software Foundation.

Source
Stimulus: What is Stimulus used for?

Stimulus enhances HTML that already exists on the page by connecting JavaScript controllers to elements through data attributes. It does not generate the HTML itself.

Source
Apache Cordova: How is Cordova related to PhoneGap?

Nitobi Software developed PhoneGap in 2008 and Adobe acquired Nitobi in October 2011. The code was contributed to Apache and renamed Cordova.

Source
Stimulus: What are the core concepts in Stimulus?

Controllers are the main unit, and they are joined by actions, targets and values. Actions link events to methods, targets find elements and values store state in data attributes.

Source
Apache Cordova: Which platforms does Cordova support?

As of version 11, iOS, Android, Windows 8.1, Windows Phone 8.1, Windows 10 and Electron are listed on Wikipedia. The project site has a page of per-platform feature support.

Source
Stimulus: What licence does Stimulus use?

The GitHub repository states that Stimulus is released under the MIT licence. It is free to use.

Source
Stimulus: Why was Stimulus created?

According to the project's origin page, Basecamp used a mix of jQuery, vanilla JavaScript and object oriented subsystems that were hard to reuse and learn. Stimulus condensed those patterns into a small, consistent framework.

Source
Share

Related pages

Other head to heads