Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Elias Volanakis

on Sep 21st, 2009RAP Case Study: Numiton Migration Tools

I always want to hear why people pick the Eclipse Rich Ajax Platform (RAP) and what applications they are building with it. Last week I send a few questions to Robert Enyedi, CEO at Numiton.com, to find out how they use RAP.

migration tools screenshot RAP Case Study: Numiton Migration Tools

(click picture to view demo)

Elias: What does your application do?

Robert: We are in the business of automated software migration and we wanted to show a bit of what we do. Any visitor can use this tool to browse migration samples shared by others. Registered users can also create their own snippets and share them if they choose to. We currently support the PHP language as input and produce Java code using the Spring framework or just plain servlets. In the future we plan to extend support to other input and output languages from our development pipeline.

Elias: Why did you choose Eclipse RAP?

Robert: The migration system is written in Java on top the the Eclipse RCP framework. So we needed a UI technology that interoperates well with Java.

Also, it had to be a Web application and not a regular site. Rich user experience was a must which brought AJAX-based technologies into focus. We are Java junkies, but an applet or Java Web Start application were out of the question: we couldn’t justify the need for a client-side JRE and its slow startup time for such a relatively simple application. Yes, since JRE 1.6.0 update 10 things improved, but how many users have that version installed?

Having previous experience with the Google Web Toolkit (GWT), that was our next choice. However, as we laid out the features we wanted, we started to see that it will take a lot of effort to implement them in GWT. We wanted readily available functionality like wizards, message dialogs, dockable views and so on. When evaluating RAP we found all these and much more. We quickly rebuilt the prototype with RAP and SWTDesigner and never looked back.

Elias: How did RAP work out in your project?

Robert: We had a fast development time and we found no technical problems that we couldn’t overcome. It is fair to point out though that we have extensive Eclipse RCP experience from building our migration system and not only.

I want to emphasize that personally I am very pleased about the code quality we managed to maintain, even in the final phases of development. Compared to traditional Web applications, developing on the RAP platform makes it easy to produce well organized code. GUI design tools that work with SWT usually work with RWT as well – so designing the perspectives, views, dialogs and composites is very easy.

From the feedback that we have gathered so far, the users love the application and the overall usability is very good. They also appreciate the coolness factor, even if  this is a really simple front-end.

Overall we look forward to the e4 platform for which RAP should provide the Web runtime and we strongly believe that even now RAP is the best technology for developing enterprise-grade Web applications.

Elias: Robert, thanks for the interview.

Would you like to share your own RAP story? Email us!

on Aug 28th, 2009IPZilla hurting community contributions?

Here are two ways the Eclipse IP process is discouraging community contributions:

1. IPZilla is private (“committer only”).

Why? I find this intransparent and discouraging towards contributors. At a minimum it should be open to committers and contributors.

2. IPZilla round-trip times for small contributions are way too long.

I think a speedy round-trip-time for small contributions (i.e. few days) is paramount in making it worthwhile for the community to contribute AND for us committers to shepherd these contributions.

To illustrate my point: I’m waiting more than two weeks for a CQ to be approved, which I could write myself 2-3 times in those two weeks. Should I turn the next contributor away? (“Thanks, but it’s faster if I write it”)

I wonder why can’t non-incubation projects in good standing have parallel ip for their milestones?  This would speed-up acceptance of community contributions. The review could be completed in the ramp down time between freeze and final release.

What do you think?

PS: kudos to the Eclipse legal team for doing a great  job making Eclipse technology commercially consumable.

on Aug 24th, 2009Eclipse Riena 1.2.0.M1 released

The Fellowship of Riena just released 1.2.0.M1. (download). We committers have fixed 40+ issues and added a couple of new features. Below are my personal favorites.

Improved support for message markers. Multiple validation rules and validation messages are now shown correctly (snippet):

riena message viewer Eclipse Riena 1.2.0.M1 released

The new IListRidget simplifies binding to  lists of elements with one column. This is a bit simpler than using a ITableRidget (snippet).

Easier listening for selection changes using an ISelectionListener on ITableRidget, IListRidget, ITreeRidget, ITreeTableRidget, ISingleChoiceRidget, IMultipleChoiceRidget.

Better keyboard navigation. We have added several new shortcuts. Some examples:

  • Next / Previous navigation element – Up / Down in the navigation tree
  • Next / Previous Module – Ctrl-Down / Ctrl-Up
  • Next / Previous SubApplication – Ctrl-PgDn / Ctrl-PgUp
  • Close Module / ModuleGroup – Ctrl-W / Ctrl-Shift-W
  • Focus on Navigation / Workarea – F6 / F7
  • Focus on Window Menu – F10 (windows only)
  • Quit Application – Alt+F4 (windows only)

and  SubApplication titles now support mnemonics for easier access via the keyboard:

riena mnemonics subapps Eclipse Riena 1.2.0.M1 released

Here’s the complete New & Noteworthy.

Kind regards,
Elias.

PS: SubApplication, Module, ModuleGroup are explained here.

on Aug 22nd, 2009Introduction to Eclipse Riena UI and Navigation

Starting out with Eclipse Riena?  I hope you find my one-picture-summary of the Riena UI and navigation useful:

riena ui 300x250 Introduction to Eclipse Riena UI and Navigation

Conceptually the window is divided into the navigation tree on the left - showing a navigation model – and the work area on the right - showing the view that is currently active. Other window areas are the menu bar, the coolbar and the status bar.

The navigation tree shows the navigation model of the current SubApplication and can change during run-time (for example elements can be added / removed). Conceptually it is a tree constructed like this:

1 Riena Application  - root of the navigation tree; non-interactive
> 1-n SubApplications – each sub application has a clickable tab in the top part of the window
>> 1-n ModuleGroups – groups several modules together; non-interactive
>>> 1-n Modules – has a title (blue background) and 1-n SubModules
>>>> 1-n SubModules – is associated with a View and Controller. When a SubModule becomes selected the corresponding View is shown in the work area. SubModules can be nested. If module has just one SubModule it is not shown.

As you can see, Riena steps away a bit from perspectives, views, editors in favor of a task oriented interaction (side note: underneath this we use views and perspectives, and we support integration of regular views). For example you could have a SubApplication called “Customers”, with a Search Module and additional Modules for each of the customers you are currently editing:

riena demo 300x225 Introduction to Eclipse Riena UI and Navigation

For the full details read the excellent ‘Riena Navigation‘ page on the Riena wiki. The wiki explains this in more detail and shows how to create the navigation structure through Java code or the plugin.xml file.

on Aug 20th, 2009Open Source Development Metrics

cats love linux 150x150 Open Source Development Metrics

The Linux Foundation just published a report with metrics about who and how much is contributing to the Linux kernel. As an Eclipse committer I found this insight into the kernel ecosystem fascinating. Below are couple of data points that got my interest.

Comparing kernel development over the last year (release 2.6.30 with 2.6.22):

  • development speed is increasing (patches per release: 50-100% up, lines of change per day: 100% up to 20,000 from 10,000 a year ago)
  • kernel size is increasing (+35%, 11.5m LOC vs 8.5m)
  • number developers  going up (+32%, 1,150 vs 870)
  • number of involved companies going up (+33%, 240 vs 180)
  • constant release rhythm of about 12 weeks/release – despite the increases
  • focus on commerial development (74,2% done by paid contributors, 18,2 % by non-paid contributors, 7,6% unknown)

Two things that impressed me:

  • the ability to keep release speed constant, despite a huge increase in contributors, patches and lines of code changed
  • the amount of diversity within the kernel community. The overall top-10 contributors (page 11)  amount to 66.7%.  As of today the 2009-top-10 contributors by LOC at Eclipse.org amount to 92,09%  (dash). So it looks like the weight of the kernel development is better distributed. Note, these are only 2009-YTD contributions.

What did you find interesting or impressive?

on Jul 11th, 2009Testing hard to test code with EasyMock

hammock Testing hard to test code with EasyMock

If you are into unit testing, you may find EasyMock quite useful. It is very valuable for making hard-to-test-code testable.

For example I recently was adding tab-switching via keyboard to Riena. The state of each tab is kept in an interface named INavigationNode which has about 40 methods (!). Creating a mock by hand for such a big interface would not be fun at all. With EasyMock it just takes is a call to:

ISubApplicationNode nodeA = EasyMock.createMock(ISubApplicationNode.class);


The code for determining the next tab, depends strictly on the isSelected property. Manipulating the return value of this method takes just another EasyMock call:

EasyMock.expect(nodeA.isSelected()).andReturn(true);

This tells EasyMock that nodeA.isSelected() will be called once and should return true.

After everything is set-up I switch from ‘record’ to ‘play-back’ mode:

EasyMock.replay(nodeA);

Here’s a full example of a test case:

  protected void setUp() throws Exception {
    super.setUp();
    handler = new SwitchSubApplication();
    nodeA = EasyMock.createMock(ISubApplicationNode.class);
    nodeB = EasyMock.createMock(ISubApplicationNode.class);
    nodeC = EasyMock.createMock(ISubApplicationNode.class);
  }
 
  public void testFindNextSubApplicationAtoB() {
    EasyMock.expect(nodeA.isSelected()).andReturn(true);
    EasyMock.replay(nodeA);
 
    ISubApplicationNode[] nodes = { nodeA, nodeB, nodeC };
    assertSame(nodeB, handler.findNextNode(nodes));
  }

This post barely scratches the surface. Curious? Read this nice EasyMock introduction.

Image: (c) *Micky/flickr. Licensed under creative commons.

on Jul 8th, 2009Tracing Keybindings in Eclipse RCP

When adding keybindings to an existing Eclipse RCP application, it is extremelly helpful to get realtime information about which keybinding registered and to what command handlers it is mapped to. Why is that?  Because sometimes the operating system or another widget will consume the keyboard event before it gets to the command framework. Other times there are several handlers bound to the same key causing a conflict.

Enabling Tracing for Keybindigs

Fortunatelly, this information is easy to get, if you enable the right tracing options:

org.eclipse.ui/debug = true
org.eclipse.ui/trace/keyBindings = true
org.eclipse.ui/trace/keyBindings.verbose = true

trace keybindings Tracing Keybindings in Eclipse RCP

After that each keystroke will produce some output on the console:

KEYS --- WorkbenchKeyboard.press(potentialKeyStrokes = [CTRL+PAGE_UP, CTRL+])
KEYS --- WorkbenchKeyboard.executeCommand(commandId = 'org.eclipse.riena.navigation.ui.previousSubApplication', parameters = {})

In the above you can see that Ctrl+PageUp is mapped to the ‘previousSubApplication’ command.

Some times there is a conflict – i.e. one keybinding is mapped to two or more ‘active’ command handlers. This looks like this:

BINDINGS --- A conflict occurred for CTRL+SHIFT+W
BINDINGS ---     [Binding(CTRL+SHIFT+W,
	ParameterizedCommand(Command(org.eclipse.ui.file.closeAll,Close All,
		Close all editors,
		Category(org.eclipse.ui.category.file,File,null,true),
		org.eclipse.ui.internal.CloseAllHandler,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system), Binding(CTRL+SHIFT+W,
	ParameterizedCommand(Command(org.eclipse.riena.navigation.ui.closeModuleGroup,Close module group,
		,
		Category(org.eclipse.riena.navigation.ui.swt,Riena Navigation Commands,null,true),
		org.eclipse.riena.internal.navigation.ui.swt.handlers.CloseModuleGroup@39880a,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system)]

What happened here is that Ctrl+Shift+W was already bound to the CloseAllHandler via the ‘file.closeAll’ command. I was not aware of this initially, because it is defined in the org.eclipse.ui plugin. So I accidentally bound another command and handler to Ctrl+Shift+W. With the output I quickly realized what was going on. I ditched my own command and instead made ‘CloseModuleGroup’ a handler for the ‘file.closeAll’ command.

on Jul 7th, 2009Introducing the Rich Ajax Platform (RAP) Incubator

With all excitement for the Galileo release, we totally missed to mention that the RAP Incubator project was approved. This is a great way to accept, distribute and mature community contributions. I look forward to some new widgets and improved tooling. For starters the project contains:

  • chart support via the Google Visualization Widgets
  • the GCCanvas widget
  • an editor for RAP themes

Read on for more details on these goodies.

Google Visualization Widgets

This project contains over 10 new RAP widgets:

rap incub charts Introducing the Rich Ajax Platform (RAP) Incubator

Note that the widgets are interactive – they are not just static images. The widgets have an SWT-like java interface and are build around Google’s Visualization APIs. They have been contributed by David Donohue and were originally developed for the inqle project.

Here’s some example code:

JSONGoogleDataTable dataTable = new JSONGoogleDataTable();
dataTable.addColumn("Activity", "Activity", "string", null);
dataTable.addColumn("Hours", "Hours per Week", "number", null);
dataTable.addRow(new Object[] {"Design", 12});
dataTable.addRow(new Object[] {"Development", 16});
dataTable.addRow(new Object[] {"Testing", 8});
dataTable.addRow(new Object[] {"Documentation", 4});
String widgetData = dataTable.toString();
 
PieChart pieChart = new PieChart( parent, SWT.NONE );
pieChart.setWidgetOptions("{width: 300, height: 300, is3D:true, legend:'none'}");
pieChart.setWidgetData(widgetData);
GridDataFactory.fillDefaults().hint(300, 300).applyTo(pieChart);
JSONGoogleDataTable dataTable = new JSONGoogleDataTable();
dataTable.addColumn(“Activity”, “Activity”, “string”, null);
dataTable.addColumn(“Hours”, “Hours per Week”, “number”, null);
dataTable.addRow(new Object[] {“Design”, 30});
dataTable.addRow(new Object[] {“Development”, 40});
dataTable.addRow(new Object[] {“Testing”, 20});
dataTable.addRow(new Object[] {“Documentation”, 10});
String widgetData = dataTable.toString();
PieChart pieChart = new PieChart( parent, SWT.NONE );
pieChart.setWidgetOptions(“{width: 300, height: 300, is3D:true, legend:’none’}”);
pieChart.setWidgetData(widgetData);
GridDataFactory.fillDefaults().hint(300, 300).applyTo(pieChart);

GCCanvas Widget

On of the most requested features in RAP is the ability to paint directly in the browser using Java. The GCCanvas widget developed by Mirko Solazzi makes this possible. It provides a Java API around  the Explorer Canvas java-script widget. This way one can draw in the browser without having to use flash or an applet.

rap incub canvas Introducing the Rich Ajax Platform (RAP) Incubator

Here’s some example code:

canvas = new GCCanvas( shell, SWT.NONE);
canvas.setSize(500, 500);
canvas.setForeground(display.getSystemColor(SWT.COLOR_RED));
canvas.setLineWidth(5);
canvas.drawLine(100, 100, 200, 200);
canvas.drawLine(200, 200, 500, 0);

RAP Theme Editor

This editor should make it much easier to customize the css-based themes used by RAP. It provides structured editing for the themeable RAP widgets. It was developed by Matthias Schaeffner during last year’s ‘google summer of code’.  The screenshots on the Eclipse wiki look very promising. Currently the tool has some issues with the recent RAP 1.2 release but we intend to fix that.

rap incub themeditor Introducing the Rich Ajax Platform (RAP) Incubator

Note, please be patient while the project is created and provisioned.

If you need access to the code now follow the links in the project proposal.

on Jun 19th, 2009Portland Galileo DemoCamp 2009 – RAP Slides

This Thursday we had a great Galileo DemoCamp in Portland. Pictures from the event are on Gabe’s blog and Darin has posted a summary of all presentations. Thanks to the nice folks at Instantiations and the Eclipse Foundation Portland for putting this together!

You’ll find the slides of my presentation ‘RAP and the Eclipse Download Wizard’  below:

rap talk galileo Portland Galileo DemoCamp 2009   RAP Slides

To learn more about creating apps for RCP and RAP from a single source, register for our free webinar on Eclipse Live:

Single Sourcing: Extend your RCP Application to the Web with RAP
July 9th, 2009 at 9:00 am PDT / 12:00 pm EDT / 4:00 pm GMT

Single Sourcing: Extend your RCP Application to the Web with RAP
July 9th, 2009 at 9:00 am PDT / 12:00 pm EDT / 4:00 pm GMT

on Jun 5th, 2009Tutorial – First steps with RAP and Eclipse 3.5

This RAP tutorial will have you developing web-applications with the Rich Ajax Platform in no time.

rap tutorial lars Tutorial   First steps with RAP and Eclipse 3.5

The tutorial walks you through:

  • Installing RAP into Eclipse 3.5
  • Creating and running an app
  • Writing a view and perspective
  • Theming

As committers we love community contributions to our projects.

Thanks Lars for writing this!

© EclipseSource 2008 - 2011