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 :
- 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.
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
Eclipse RAP – Features
- 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.
Here a list of interesting links about Eclipse RAP :
|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.|