BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Tabris 1.0: Cross-platform Mobile Development in Java

Tabris 1.0: Cross-platform Mobile Development in Java

Leia em Português

This item in japanese

Lire ce contenu en français

After three years in development, EclipseSource has released Tabris 1.0, a cross-platform Java mobile development framework for iOS and Android. Tabris is targeted at enterprises, and unlike other mobile solutions out there it uses a different approach:

  • Most of the programming is done in Java
  • The business logic including the binary representation of the client UI runs on the server side on Eclipse RAP.
  • A very thin client application runs on the mobile device
  • The server communicates with the client in JSON format, sending data and commands for creating the visual UI
  • The client generates the interface using native components
  • The client is written in Objective-C for iOS and Java for Android

Tabris comes with a UI Toolkit built on top of Java SWT API. The toolkit adds two main widgets: Page and Action. Page contains the basic content of an application while Action is for taking user’s commands. Page is shown in red and Action is shown in green in the following snapshot of a demo Tabris application:

image

Pages can be chained and navigated, while Actions can be global –for the entire application-, or local – for the current page-.

After processing a component, the server side of the application sends a JSON snippet to the client as the following one used to create a button:

image

The client app will render the button using iOS or Android native components.

InfoQ has talked to Holger Staudacher, Team Lead for Tabris-server at EclipseSource, to find out more about the framework. According to Staudacher, Tabris is targeted at enterprises and requires a permanent network connection to the server:

Tabris is for On-Site mobility applications. This means it works best in a controlled environment. With controlled I mean a fixed network connection and so on. We have customers e.g. like a hospital where all devices are connected to the same network. Such applications are usually developed by the enterprise.

Tabris does not work offline. A mobile UI is basically a session. So, if the user's device loses connection the session becomes invalid. There is error handling which can be done on the mobile clients. We have implemented standard error handling for retrying sending the http request and so on. But this can be extended by the app developer with native extensions.

When asked if Tabris would make sense for developing applications for the general public, Staudacher said that theoretically it could be done but it is not best fit for that purpose:

To general public means you will create a heavy load on the server. We are using standard Java EE technology there. So, if you have such a heavy load standard Java EE clustering mechanisms can be used. It's not yet tested with millions of users. But from a technical point of view it should be doable ;)

Tabris supports many SWT components and adds support for several native sensors such as camera and geolocation.

Currently, tablets are supported but such an application shows only one page at a time. Support for multiple pages is to be added in the future. Also, Tabris can be extended to other mobile platforms, and Windows will be probably supported if the framework gets traction.

In the near future, the Tabris team intends to add the following functionality:

  • Address book support
  • Device orientation support
  • Client Scripting support for handling client events
  • XCallbackUrl support

According to an FAQ, applications created with Tabris can be deployed through the App Store “as long you comply with the App Store rules”. A demo application for Android can be found on Google Play.

Tabris is not open sourced but enterprise licensees can get access to the source code. More details can be found on EclipseSource’s pricing page.

Rate this Article

Adoption
Style

BT