rich client 2.0

Building datacentric RCP/RAP applications with Remus (proposed as Eclipse project)


2. February 2010
Tom Seidel @ 17:36

Last week the Eclipse Foundation published the proposal for the Remus project. In the following I will show you what the goals of the project are and how simple it is to build Eclipse based applications with this technology. We highly appreciate your feedback, suggestions, discussion at the Eclipse Community forums, see http://www.eclipse.org/forums/index.php?t=thread&frm_id=166

The goals of this project can be divided into two big parts:

  1. Provide an out-of-the box set of bundles that can be installed into an Eclipse instance, for example your IDE, for daily information management. This tooling will be also available as standalone RCP application. There is already a build of a full-blown application built on Remus available, see http://www.remus-software.org.
  2. The probably more relevant part is that we want to provide a framework and several APIs for building applications for viewing, editing, catgorizing, searching and synchronizing any datastructures. I’ll show you an example how to build your Hello-Remus bundle in just a few minutes.

The approach

The theoretical apporoach is that we assume that every unit of information can be described with a structure-definition. This definition holds the definition how a specific type of information is organized internally. Based on a structure-definition Remus can create business objects a navigatable information-structure, editing-ui and even a rule engine for manipulating these objects. Every structure-definition is typed, that means it can handled by the framework regarding visualization, indexing or synchronization in a different way.

Example

Ok, we’ve had enough of words, let’s start. Our “Hello World” application will be a RCP application for one single information type: A book review.

Step 1 - Creating the plugin and a structure definition.

We create a bundle using the plugin-wizard for a RCP with a single view. After the bundle was created we define our structure definition. This definition is done by a tree-based editor, but since the underlying technology is emf you can use alternative editing methods, for example with textual plugins like Xtext. A review has the following information-items

  1. Title of the Review
  2. Date
  3. Author
  4. Reviewed book
  5. Review

We can create now this structure definition (see picture)

structure.png

Step 2 - Navigation and first start

The first thing we have to do is to tell Remus about this new information type. We create a new extension, defining name and type of this information and point to the structure definition. Thats all for the moment. After that definition we already can add, edit and save information units. These operations are executed by default on a command-stack and can be un- or redone. The underlying data store mechanisms need no customization.

infotype_def.png

With a few lines you can create your first business objects:

snippet.png
As you can see we aquire an instance of a manager for setting values to an information unit. This manager checks our inputs against the underlying structure definition of this information type. A the end you’ll see that we generate a command and execute it. This command is checked for correctness and is executed on a command stack.

If we start now our RCP application we will see already a good result:

firststart.png

Step 3 - Editor

Remus provides some editor infrastructure to visualize and edit the given information unit. Note that these editors have already the basic functionalitites you know from other applications, like automatic refresh, close, undo-redo,…
Remus has no API for building UI elements you can use your preferred toolkit, but comes with a very handy API for binding UI elements to structure items defined by your information type. Editors are injected by a separate extension-point. For making an information type editable with an editor you have to extend 1 class and overwrite 2 methods (one for generating the ui and one for binding the ui-elements)

Due to the separation between the definition of ui elements and the binding to information structure elements you can use also third-party-tools like SWT designer.

swt-designer.png

The binding is very easy. You just have to bind a ui control to a structure element of your information type, a 2-liner:

snippet2.png

After defining this editor you can now open this information unit from your navigation. As you can see in the screenshot the editor becomes dirty after an edit.

editor.png

In addition Remus provides some additional API to forward the data of a information unit to a HTML Template Engine for pretty information visualization (if you want to browse through the data, complex forms are not appreciated) and to integrate the HTML Output into an editor.

Step 4 - Search

Integrating a search is also very easy. In general you only have to include the relevant bundles and Remus tries to index your information unit. By defining another extension point you can tell Remus which structure items need to be indexed. If you like you can use the default search view which is shipped with the framework. Also the result listing can be reused (if you like). If you use the search bundles you autmatically get a search history, a search for references, a search context with key bindings to navigate through results, …

By adding the search view to your perspective layout, you see the Search-View

search.png

Conclusion

Of course there are many other things you can use, for example linking between information units, support for files, integration of third-party-editors, data-encryption, semantical structures, synchronization with remote information pools,… I’ll post some documentation soon.

The components of Remus can be used to build RCP applications, Eclipse plugins, RAP applications or even a headless information repository running on a server for information distribution. We also provide an ODA Driver to query information structures with the Eclipse Data Tools Platform; this makes especially the BIRT integration very easy.

We are currently in the proposal phase of the Eclipse Development process and need your feedback. If you have questions about features, architecture, use cases, etc don’t hestitate to post your thoughts at the Newsgroup or the Eclipse Community Forums; and if you want to see what we’ve already done with this framework take a look at http://remus-software.org, the projects current home. We’re looking forward hearing from you.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress