Apache Cordova vs. Tabris.js
Warning! This article is outdated and might not represent the current state of Tabris.js.
At EclipseSource we’ve been doing frameworks for many years now. We did server and UI frameworks… Web and mobile frameworks… Open and closed frameworks… If we had only learned one thing, this would be “Play well with others!”. With this post I want to show you how our cross platform solution Tabris.js compares to Apache Cordova and how they are playing well together.
The UI
Apache Cordova Applications are basically webviews embeded in a native app. For this reason Cordova applications provide a UI written in HTML. This gives you the complete freedom of styling and layouting your UI as you are used to with web applications. But one major drawback of these HTML UIs is that they don’t feel and perform like native UIs on mobile platforms. Tabris.js goes in another direction. Instead of using HTML it provides a JavaScript API that renders a UI created with native UI elements. As a result a Tabris.js UI feels and performs like a UI that is written in Object-C/Swift for iOS or Java for Android like the one displayed on this image.
Plugins
One of the most valuable things Apache Cordova provides is a plugin API which allows plugin developers to wrap native functionality with a JavaScript API that can be called within your HTML UI. Popular examples are plugins for accessing the device camera or the device filesystem. To support as many Operating Systems as possible Cordova allows to specify a “platform” like iOS, Android or BlackBerry. Each platform comes with their own bridge into and out of the native world. This is the implementation of the Cordova “exec” function. While Tabris.js is a standalone framework it also ships as a custom Cordova platform. This means there is an “exec” implementation for Tabris.js applications. The cool thing is that as a result nearly all Cordova plugins work out of the box with Tabris.js apps.
Building
Apache Cordova comes with a very handy tool known as the Cordova CLI (Command Line Interface). It provides a very convenient way to build your applications as .ipa, .apk and others. The CLI also provides Scaffolding, Plugin and Platform Management. This means you will “install” a Cordova Platform using the CLI when developing an app. Because Tabris.js ships as a Cordova Platform you can use the standard Cordova CLI to create, manage and build your application exactly the same way you would do it with any other Cordova app.
Branding
To brand an app Cordova provides the “config.xml”. This file contains the application’s configuration like ids, icons, splash screens and more. Tabris.js apps also make use of the config.xml. As a result you can configure a Tabris.js app the same way you would configure a Cordova app.
Conclusion
As you can see Tabris.js and Apache Cordova do not compete with each other. Instead they are filling each other’s gap. You can put it this way:
- Tabris.js provides a native UI for Cordova applications
- Cordova provides plugins and the CLI to Tabris.js applications
To get more details read about Cordova plugins, online build and local Cordova CLI build in Tabris.js docs. You need to get invited to access it. So, don’t hesitate and request an invite try Tabris.js. It’s free!