Java desktop wishlist for 2008

October 26th, 2007

While the Java blogosphere is raging with debates on closures, properties and other negligible language-level features, the client-side battle is still fought between Microsoft, Adobe and Apple. And while finally Sun decided to step in with JavaFX and improved applet handling, this will change little without the tools for content handling.

As i already said, the customers don’t care about the technology. In “The Agnostic Geek“, Brandon Carson writes:

when you look at a web page, do you think, “Gee, I wonder if they coded this in BBEdit or Dreamweaver?” I don’t know about you, but I don’t give a flip what software product is used to create a web page. Use TextEdit for all I care.

And so, who cares that the applets will load instantly when there are so few good applets? Just look at the amazing breadth of Flash content created by professional designers. Content that has rich multimedia capabilities. Capabilities that come built in with the platform. Platform that is oriented towards content.

So, what are my top two wishes for Java desktop for 2008?

Number one: Cross-platform support for H.264 and FLV formats.

Showing is good, but it also must support creating the content and editing the content (just look at the Sliverlight demoes). And don’t tell me that 99.9% of the market doesn’t need editing. If you want to lead the market, you have to cover everything that the competition has and then some.

I don’t know about the licensing issues, but the reference implementation for H.264 is not that big. And Onavia already has pure-Java player. So it can’t be that hard once you decide to put as many resources on that as you do on JavaFX. And even better, accelerate it with OpenGL and Direct3D, while at the same time gracefully degrading to software loops on older cards.

Number two: Converters and viewers for competing markup formats.

You know what i’m talking about – those pesky competitors that have 99.9% percent of the consumer-facing rich desktop market. Flash / SWF, Flex / MXML and WPF / XAML. Each has its own set of designer tools for creating rich content. Each has armies of professional designers versatile in using those tools, in addition to Photoshop, Maya and others. Do you really expect them to master yet another (unproven) designer tool?

If JavaFX wants to have a fighting chance, it needs to provide a simple migration path. A path that allows taking an existing Flex / Silverlight application and importing it to JavaFX (at least the visuals). XAML has at least three – converter from Maya, converter from Photoshop and converter from SWF. The importing is not enough. You have to have exporting as well. If you’re not convinced, read what Joel Spolsky says about how Excel managed to overpower Lotus:

And this reminded me of Excel’s tipping point, which happened around the time of Excel 4.0. And the biggest reason was that Excel 4.0 was the first version of Excel that could write Lotus spreadsheets transparently.

 

Yep, you heard me. Write. Not read. It turns out that what was stopping people from switching to Excel was that everybody else they worked with was still using Lotus 123. They didn’t want a product that would create spreadsheets that nobody else could read: a classic Chicken and Egg problem. When you’re the lone Excel fan in a company where everyone else is using 123, even if you love Excel, you can’t switch until you can participate in the 123 ecology.

If you want to have professional designers to switch to JavaFX, provide a clear path back. Not that they’ll take it (of course, if the tools and the runtime are bad, they will), but it will give them a nice sense of security.

An extra step would be to allow using the same exact content at runtime without converting it to JavaFX. Soyatec does it partially for XAML, so it can be done. But if you do it, support the complete feature set (including 3D and, guess what, rich multimedia). A bonus part would be to include a bitmap to SVG converter – see VectorMagic for inspiration.

That’s it. I have only two wishes. Granted, these are two big hefty wishes. Will they come true? The first one might partially be, and the second one is highly unlikely.

Here are some Swing links that you might have missed during this week:

  • A very informative posting on the AppFramework mailing list from Hans Muller that includes advice by Shannon Hickey on handling uncaught exceptions in EDT. There are three alternatives, none of them providing a complete solution (unfortunately):
    • Toolkit.getSystemEventQueue.push() with a custom event queue.
    • The “sun.awt.exception.handler” system property.
    • Thread.setUncaughtExceptionHandler(UncaughtExceptionHandler). This option is also mentioned here.
  • An article by Rene Ghosh on implementing a text console component, complete with color and anti-alias support.
  • A posting by Oscar Vega Gisbert on improving the menu selection layer in Swing. A very interesting and LAF-agnostic approach that should be made a part of core Swing implementation. Full source code available.
  • An overview of the existing SVG to Java2D transcoders by Jan Erik Paulsen, and their extension to the Javascript based Darkstar FX renderers.

Those of you who came to the session (PDF link) that Alex and I have presented at JavaOne 2006 saw the application that we wrote to illustrate different animation, translucency and transition techniques. The project itself was named Rainbow and all the bits were made available immediately after the session. Unlike many other demo applications written specifically for JavaOne, Rainbow was not meant to be one-shot sow-it-all-together-over-the-pizza to be left stagnating in the dark, and over the past month i have added a few big features.

There are two main new features that you can find in the version 1.1 (nearing RC stage), code-named Nightstone:

  • Support for SVGZ format in addition to SVG
  • Ability to browse local and remote SVN repositories with the new breadcrumb bar functionality from Flamingo.

To try the latest dev version in action, click on the WebStart button below:

After the application has been downloaded (it is about 12MB large, including the bundled Batik, Substance, SVNKit and a few others) and granted permissions (as before, you can convert the SVG images to Java2D code classes and PNG images and save them to local disk), you can browse two remote SVN repositories, Oxygen and Kalzium.

Here is a screenshot that shows a few icons from the Oxygen SVN repository (click for full view):

As you can see, the application is able to show compressed SVG images (in SVGZ format) after these have been downloaded from a remote SVN repository. Here is a screenshot of another Oxygen folder:

As before, when you click on an icon button, you will see another frame pop up with three tabs. The first tab will show you the SVG contents (XML), the second tab will show you the matching Java2D code that you can save as a local class, and the third tab will allow you to apply a few effects on the SVG image and save it as a local PNG file. For example, if you’re interested in more details on the new Konqueror icon, here is what you’ll see:

Want to see it inverted? Click on the “Invert colors” checkbox et voila:

Still convinced that web applications are the way of the future?

Here are some Swing links that you might have missed during this week:

  • “Fling Scroller” article on java.net by Jan Haderka. Shows how easy it is to implement motion-based scrolling in lists with Timing Framework and a little bit of math. The comments show a similar approach that works on any scroll pane.
  • The new Expression Layout manager by J. Stephen Kress. While the simple example is less readable at the first glance than FormLayout, time will tell if this approach is adopted by the individual developers and the tooling community. My advice to both this project and MigLayout – work with NetBeans, JFormDesigner and Instantiations to provide tooling support, either as the core functionality or third-party plugin.
  • Milestone 1 of Bean Properties by Shai Almog is out. The timing is a little unfortunate and Beans Binding (JSR 295) seems to be getting all the attention, but the time you spend on reading the examples will not be spent in vain. It also has examples on integration with SwingX, Echo2 and Spring.