Getting to Know EBERT

DZone 's Guide to

Getting to Know EBERT

· Java Zone ·
Free Resource

The Eclipse Examples Project has a 0.1 release review scheduled for next Tuesday (December 23). For this review, there are two components: The Eclipse Business Expense Reporting Tool (EBERT) and Image Utilities. I’ll defer discussion of Image Utilities for another day…

As the name suggests, EBERT is an application that can be used to capture business expenses. For the time being, it’s not all that usable an application (it doesn’t do all that much yet). But that’s not the point: EBERT is intended to serve as an example of how you might go about building an application using various Eclipse technologies. Perhaps the coolest thing about EBERT is that it is intended to run as a desktop application using Eclipse Rich Client Platform (RCP), a server application using Rich Ajax Platform (RAP), and an embedded application using embedded Rich Client Platform (eRCP). What makes this cool is that this level of portability is not a build trick, it’s a packaging trick.


EBERT has a set of common bundles that are used across all three platforms. These bundles contain the bulk of the application code including the domain models, and the three views that make up the user interface. Additional bundles provide platform-dependent behavior. On eRCP, for example, we have access to a set of “command” buttons that surround the display; where the views are tiled in the RAP and RCP version, they’re stacked in eRCP due to limited space. In its current form, the RCP version offers a slightly richer user interface than the other two (via bundles that augment the “common” behavior). However, recent developments in RAP are going a long way toward leveling this distinction (the next version of the application will leverage these developments).

There were many interesting challenges in the development of this example. Perhaps the most challenging challenge was living with the restricted Java Runtime Environment available on the embedded platforms. I opted to restrict the “common” bundles to the Connected Device Configuration (CDC) 1.1, Foundation Profile 1.1 (CDC-1.1/Foundation-1.1) which, conveniently, is supported by a wonderful eRCP-ready Nokia phone that I happen to have handy.

CDC/Foundation is effectively a Java Runtime Environment for devices with “moderately constrained” resources that provides a restricted set of Java APIs; it is basically Java SE 1.3 excluding the APIs for user interfaces (fortunately RCP/RAP/eRCP provides this for us). I opted to restrict the “common” projects to Java 1.3 syntax (though I believe that 1.4 syntax is supported).

While the restriction was a big challenge, it was never a show-stopper. It was frustrating at first to learn that JavaBeans are not supported by core CDC-1.1/Foundation-1.1, and I had to leverage some Eclipse platform code to provide something similar to bound properties. Of course, that little issue cascaded modestly into further issues when I started using the JFace DataBinding APIs. I’ve got a bug open to explore whether or not we can use EMF in this environment. I think the answer is “yes”, but I haven’t (embarrassingly) had the time to investigate yet.

Over the coming days and weeks, I’m going highlight some of the more interesting parts of EBERT…

From http://dev.eclipse.org/blogs/wayne


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}