[haiku-development] Re: Port of Apache Harmony to Haiku

- No AWT/Swing. This is going to be a huge work.

I vote for SWT first. It uses an underlying native toolkit (on linux
its GTK); it's not too complicated; and it runs Eclipse. But still, a
huge work.

I would also be more interested in porting SWT than Swing, but as you
say, this is still an insane amount of work. The Interface Kit is much
too incomplete to provide all features to an SWT port. For example, the
browser component would need WebKit to be integrated into the Interface
Kit, but even text layout is missing, since it is only available inside
BTextView at the moment. That's not to mention that SWT includes and
SWT/AWT bridge, which allows to embed Swing Frames into an SWT UI...

The downside to having a family is that I just don't have the time for my personal pursuits like I once did. Andrew Bachmann and I might have some insight to add to this topic.

First off, you don't port Swing. You implement AWT. Swing runs 'on top' of AWT 'for free'. Once your AWT implementation is mature, you'll be able to run Swing apps.

I see more value in having an AWT implementation than I do in SWT, and having a working AWT before you try to tackle the SWT will illuminate the shortcomings you'll either have to work around, or changes you'll need to contribute upstream to Haiku to allow for the complex widgets.

In 2005, we had a Java 1.4.1 AWT implementation for R5.0.3 that was roughly 85% complete. The focus subsystem wasn't 100%, and neither was colorspace / transparency handling for the standard software-only, non-accelerated rendering pipelines. We could run Swing applications. SwingSet 2, the Java 2D demos, all worked -- and all performed ridiculously well for not being accelerated in the least.

We went through a couple iterations of AWT implementation, the last of which was -insanely- tight and well-behaved. Implementing atop the BeAPI was a dream compared to the things other platforms had to do.

I (and I believe Andrew) still have this code. At this point, I believe it to be unencumbered. I wish I had time to be involved, but this simply isn't a priority for me anymore. Maybe someday, but likely not.

AWT really wasn't that hard. Once we figured out the 'best' way to design our implementation, it took Andrew (that guy is a machine) and I a few days to implement all the UI widgets, and then it took me a few weeks (maybe days? I forget.) to get Java2D implemented enough to 'work'. There was a lot of reading / learning on my behalf involved though, so someone versed in colorspaces, rasters, familiar with BBitmap, etc. should be able to get it going faster.

Regards,
 -Bryan

Other related posts: