Java Chatter and Random Nagging

Thursday, November 15, 2007

Bus factor of Echo2

Tuesday, I went to a presentation by Alef Arendssen
where he discussed the choice of Web Frameworks. One thing he mentioned was the bus factor: for example, when a open source project is managed and programmed by only 1 person, the project has a bus factor of 1. It signifies that it only takes one bus to stop the project, if the person behind the project is hit by a bus, the project is terminated.

It definitely made me rethink my own choice for the webtier. I am currently using Echo2 and I definitely love it, it allows me to create very rich user interfaces (check out the demos in a previous blogpost) and I don't spot too many bugs or missing features. But there has not been an updated version since March 2007, and this scares me. There is not a large community supporting Echo2, although it is a great piece of software.

So, let's look at other options:

I don't know about the bus factor of all the following projects, but they all seem promising and are direct competitors for Echo2 :
  • JSeamless : nice demo, although it seems quite heavy and slow
  • Wings : same issues
  • GWT : definitely not a bus factor of 1, and more client based than Echo2 (probably a good thing, although you can only use a subset of Java this way)
  • And, most interesting to me, definitely considering my objections against Echo2 bus factor : Coeee. Besides having a silly name (really!), Coeee was started as a branch of the Echo2, EchoPointNG and Echo2 Extras source code. The project aims to further develop the code that formed Echo2 into a highly robust web UI framework. It is supported by Karora which aims to create a community around a few open-source web frameworks. They claim that it can port easily ported from Echo2 to Coeee (merely a package change apparently). It all seems a bit too easy. For what reason did the Karora guys fork Echo2 instead of contributing to it directly (they argue that the community support was insufficient with NextApp, and maybe they do have a point here). At least I am noticing quite some activity on their Jira tracker.
For my pet project, I am sticking with Echo2 (which I will probably migrate to Coeee, if I find the time), but for a future webapplication, I will probably consider using GWT.

Offtopic : a very interesting article about an enterprise application sharing almost the same architecture as my pet project (Echo2, Hibernate, MySql).

Labels: , , ,

Sunday, September 23, 2007

Handle Runtime Exceptions In Echo2

I was looking for a transparant mechanism to handle runtime exceptions in Echo2. Apparently Echo2 does not provide any hook for gracefully handling runtime exceptions due to the following posts. Since one solution lost access to the current Application Instance and the other involved changing Echo2 source code, I have found my own solution to this problem:

public class ExceptionalUpdateManager extends UpdateManager{
private static final long serialVersionUID = 1L;

public ExceptionalUpdateManager(ApplicationInstance applicationInstance) {
super(applicationInstance);
}

public void processClientUpdates()
{
try{
super.processClientUpdates();
}catch(AbstractHrutilRuntimeException exception){
//Hook : I show an error popup with the translation of the error code.
TopContentPane.getTopContentPane().add(new ErrorPane(exception.getErrorCode()));
}
}

}

and I overwrite (little bit of hacking with reflection) the UpdateManager of the ApplicationInstance as follows:

public ApplicationInstanceChild() {
super();
ReflectionUtil.setField(this, "updateManager", new ExceptionalUpdateManager(this));
}

This should solve the problem ! Every time a runtime exception is propagated, an error popup is shown with a description of the problem.

Labels: ,

Monday, July 16, 2007

WebOnSwing - Echo-alike

Just found an interesting J2EE View framework that I had never heard off before. It's called WebOnSwing and due to its demo on the site it supports creation of pages using the Eclipse Visual Swing Editor with simple drag and drop. It seems pretty familiar to Echo2 although Echo2 seems to be more eye-candy. An interesting feature of using WebOnSwing is that both a Swing component model can be used, together with an html visualization, so more control of the html output is offered than is the case with Echo2. Definitely take a look at the movie on their site !!

Labels: , ,

Wednesday, June 20, 2007

Selenium and Echo2 : No good !

Selenium is a test tool for web applications that runs directly in a browser. At my dayjob, they use it with some succes in combination with JSF, thus it seemed only fair to me to use it for testing the webinterface of my petproject (which is created using Echo2). Trying it is easy, simply download the Selenium IDE as a plugin in firefox and start recording.

This is already where it went wrong for me. Selenium needs fixed id's from components to execute its actions on it. Echo2 generates its own id's, outside control of the user. This wouldn't be too much of a probem, however the id's vary between user sessions, thus making Selenium unusable in combination with Echo2. (An Echo-Component does have setId() functionality, but this is only for internal Echo use, lookups and stuff).

Labels: , ,