Accueil > Eclipse RAP > My first steps with Eclipse RAP [step0]

My first steps with Eclipse RAP [step0]


I’m one of XDocReport developer which is a Java API to generate report with docx, odt. Our XDocReport JSP online demo doesn’t use any JEE framework. Only JSP is used and now we would like to use a JEE Framework. But which JEE Framework? Indeed,there is a lot of JEE Framework like GWT, Struts2, Play, Wicket, JBoss Seam…that’s cool but it’s hard to choose the best framework depending on the need of the WEB Application that you want to create.

Need of JEE Framework

For XDocReport case, we would like to provide a WEB Application with several features :

  • Rich UI: for instance to fill the XDocReport data-model form which is used to replace fields in the docx, odt document and generate report could be improved with pretty Rich UI. Rich UI means that you must use a well Javascript library which provides pretty UI widgets and support AJAX.
  • No Javascript to code: in my past I have developed several Rich UI (autocomplete, treeview, slider, swap…) in the JSControlsTags project. It was very hard and today I’m a lazy developer who we would like avoid developing Javascript code. So I’m looking for JEE Framework which provides Rich UI without coding Javascript. I prefer to manage my UI with Java code (ex : add listener to a Java widget instead of adding listener to a Javascript widget). Debug Java is more easy than debug Javascript even though we have great Javascript tools for a year (FireBug, Google Chrome…).
  • Plugin mechanism: for XDocReport we want to provide an extensible WEB Application, in other words provide a framework for reporting with commons features like upload a document, preview generated report and give the capability to extend the WEB Application for provide custom data-model form depending on the selected report. Extend the WEB Application with plugin system could be used for instance to develop a resume WEB Application which manage resume (create resume in a DB, generate resume…) like Dynaresume.
  • OSGi support which help a lot to have extensible application. Register/Unregister service gives you the capability to have a modular application.
  • Fat client : XDocReport want to provide 2 types of application : WEB Application and Fat client. Since I’m lazy developer I’m looking for a Framework which manage the both and use the same Java code for the 2 types application. This feature is called Single Sourcing.

Eclipse RAP

After studying several JEE Framework, we decided to use Eclipse RAP :

The Rich Ajax Platform lets you build rich, Ajax-enabled Web applications by using the Eclipse development model, plug-ins with the well known Eclipse workbench extension points and a widget toolkit with SWT API. Existing RCP applications can be run as Web applications with only minor changes.

You can play if you wish with our XDocReport RAP online demo.

Eclipse RAP – Demo

If you go at RAP Demo you will see impressive demo and see at first the power of the Rich UI. Yoxos OnDemand is a sample of nice application :

Eclipse RAP – Features

Eclipse RAP provides exactly that XDocReport need :

  • Rich UI : as you can see at RAP Demo, UI is very impressive. You can retrieve the same widgets used in the Eclipse IDE (simple widgets, treeview, dialog, view, perspective…). AJAX is used (ex : treeview use AJAX when you open a tree node) and it is based on powerful and rich Javascript Library qooxdoo .
  • No Javascript to code : UI creation/management is done only with Java code by using Java Eclipse JFace/SWT API.
  • Plugin mechanism : RAP application is a Plugin Eclipse which is based on OSGi. So you can benefit of the Eclipse Plugin mechanism (extension point) to extend your application.
  • OSGi support : Plugin Eclipse is an OSGi bundle, so you can benefit with OSGi features.
  • Fat client : RAP application use Eclipse RCP/JFace/SWT API so it’s possible to use 90% of the same Java code for Eclipse RCP Application (Fat Client) and Eclipse RAP Application (WEB Application). The difference between Fat Client and WEB Application comes from with HTTP context : in WEB Application you have several users although Fat Client you have one user. Plugin mechanism give you the capability to deploy your application in Fat client mode or WEB Application by choosing well Plugins according the context (HTTP or not).

My first steps with Eclipse RAP

I decided to write several articles about Eclipse RAP that I have called My first steps with Eclipse RAP. Goal of those articles is to explain how generate RAP application, the RAP architecture and show the Single Sourcing in action to manage both Fat Client (Eclipse RCP) and WEB Application (Eclipse RAP) with same code.

Go at My first steps with Eclipse RAP [step*] to have the plans of those articles or start to read with [step1].

RAP links

Here a list of interesting links about Eclipse RAP :

Link Description
http://www.eclipse.org/rap/getting-started/ Getting Started with RAP. You have a video which show you how generate RAP application with PDE wizard. I will explain in [step1] the same thing that this video by giving more explanations.
http://www.eclipsetotale.com/?keywords=RAP Some Frensh interesting links about RAP from Eclipse Totale.
http://www.ibm.com/developerworks/opensource/library/os-eclipse-richajax1/ Article wich explains how generate RAP Application. This article was written in 2007, so it doesn’t explain how use the today RAP tooling.
http://www.vogella.de/articles/EclipseRAP/article.html This tutorial describes how to create Eclipse RAP applications and how to use the CSS theming to modify their look. .
http://www.slideshare.net/rsternberg/single-sourcing-rap-and-rcp-desktop-and-web-clients-from-a-single-code-base Article which explains how use Single-Sourcing with RAP.
http://www.eclipse.org/rap/incubator/ The incubator is a place at RAP where we make interesting / promising developments visible and accessible for the community.
http://wiki.eclipse.org/RAP/FAQ RAP FAQ.
Catégories :Eclipse RAP

Laisser un commentaire