Toggle Menu [-]

How to finish a big project to start an even bigger one…

Published by admin on Sunday, November 22, 2009 - 06:37:29 - Filed under General, News, Development

I can tell you that’s what happened to me 3 months ago.

I was happy to have finally finished my marathon series of tutorials on how to build Servoy-Aware java beans for Servoy, with a web compatible bean and all the bells and whistles. A bit fed up with MS Word as a primary tool, to tell you the truth: there’s not even code completion in this thing!

So it was a good time to rest a little and enjoy some free time experimenting a few of the mad stuff I had in mind without having to explain every single line of code (which actually goes a lot quicker :)

So I went back to one of my pet project (I have a few - don’t ask), this one started with the disgust I had with the java HTMLEditorKit class: the base of all html rendering/editing in pure Java. The worst piece of software that Sun has ever made, if you ask me.

So I thought: I can’t be alone frustrated with this stuff! Surely there are some clever guys out there who have found a better way to deal with html rendering and editing in Java. And I googled for it, believe me, I did. But felt even more depressed after that:

Oh yes, there is the ghost of JWebPane around, and some conversations here and there about it, lots of hope, for sure. But the project hasn’t move for a year now, and with SUN (now Oracle) dropping all funds and supports for the dev-java.net projectss (JWebPane being one of them), I didn’t find any comfort with that. And no downloadable binary anywhere either. And there are also some technical issues, like the fact that it is supposed to be a lightweight browser, when all plugins (think Flash or Acrobat for example) are heavyweight. It is very unclear how JWebPane is going to support that, if it is. And anyway to support plugins you actually do have to exist!

So what? Wait for JavaFX to come up with a browser? But there is none annouced, and if there was it is likely that it would be a JWebPane flavour.

JRex? No support since 2005!

WebRenderer? It’s just a fork of IECanvas and has problems in Swing because it is heavyweight and badly integrated.

ICESoft ICEBrowser is at the end of its life (as announced on their web site).

The Flying Saucer project has some good XHTMLRendering support but it is not meant to be used as a dynamic browser (no JavaScript support, no plugins), Jeff Bader already has a plugin for this, and we have been in contact to make a bean version out of it, but it is a good option for static rendering, not usable as a browser.

The MozSwing project, nice integration of the XULRunner browser, but limited in terms of interaction with the container: the MozSwing API lack certain capabilities and is not synchronous which is a quite problematic.

Last but not least, the DJ-Project NativeSwing seemed really nice but there was no support at all for Mac OS X, and only some hints that it would be usable on Linux. Quite bad as a candidate for Servoy multi-platform deployment.

Still frustrated, and because one of my company’s client wanted an Html Editor for the project I’m working for, I even started building a limited version based on the hexidec EKit html editor. I fixed a few things, like the table handling, but it has been very tedious work to fix, the DataTransferHandler for example (cut/copy/paste) is so badly broken in java HTMLEditorKit, and unfortunately, like most other java Html editor, this lib was based on it. But I had a reasonnable implementation with a a fixed set of functions working and that was enough for the current project.

Still I was toying with the idea and actually tried to implement the XULRunner browser, with the help of the MOZSwing project, but I was limited very quickly by some bad features, like the fact that all javascript execution is actually done from a javascript:url, which allowed only one line!

So I tried integrating the DJ NativeSwing lib, and it was like a dream come true!
On windows, I mean.

Within a single evening I actually had a Servoy wrapper plugin around the JWebBrowser working perfectly in Servoy 4!
And I even did a little video demo, because I wanted to show that stuff to a few people who where asking what I was into…

You can actually SEE this video here - this is a vintage! The download is 18Mb and will unzip to a 165Mb avi file on your hard drive, no less - (with no sound. Yes, if you wonder why I wriggle the mouse so much, it’s just because I had no mike on my PC!).

So I thought it was great and I even went as far as talking to a few users about it, and showing that video… poor me! I had no idea where this would lead.

Now I know, 3 months later and lots of sleepless hours staring at java thread dumps with sheer discouragement, tons of test classes cluttering my Eclipse workspace, and multiple versions of SWT, XULRunner and various other libs scattered all over my hard drives…

I feel a lot better now that this is really taking shape, but you will learn more about why and how in later posts… So stay tuned if you want to know more about that.

In the meantime, I have update the Browser Suite to 0.8.48, with better installer and deployment (no need to deploy XULRunner on 64-bit OS for example), and the option to setup you own popup menu from Servoy, providing an Array of plugins.popupmenu.MenuItem. I also updated the FAQ with some info about i18n and some bug reports that you can vote for on the Eclipse bugzilla system.

Enjoy!