Friday, June 13th, 2008

Pivot: Swing++ as New Java-based RIA Platform?

Category: Java, UI

And now for something a little bit different on a Friday. Greg Brown from VMWare pointed us to the fruition of nearly a year’s worth of R&D: Pivot, a new GUI toolkit for Java.

While traditionally Java Applets and the Web have mixed together about as well as concrete and peanut butter, the upcoming revised Java plug-in might give a window for Java-based GUI toolkits to be of interest to Web folks.

While Pivot’s source code is still forthcoming, a quick glance at its classes shows an architecture with a strong resemblance to Java’s built-in Swing GUI toolkit, but with many of Swing’s rough edges smoothed out. As a long-time Swing developer, I’d characterize it as attempt to create Swing++.

Similarities to Swing include a light-weight rendering model (i.e., it doesn’t wrap native components), a nearly identical component contract, a very similar system of UI delegates, and a very similar event model. Differences include a cleaner API (by virtue of nixing direct interoperability with Java’s ancient AWT toolkit), different approach to layout, fresh implementations of common GUI components, and a new collections framework (inspired by Java’s collections framework but… different).

Thinlet is another, older alternate GUI toolkit for Java that draws its own components and targets Applet developers (though a new version is under development).

Posted by Ben Galbraith at 7:05 am

3.6 rating from 33 votes


Comments feed TrackBack URI

A little more robust but offers Qt for C++ and Qt Jambi for Java development.

Qt Jambi integrates with Eclipse and comes with Qt Designer.

“Qt Designer makes it easy to visually design advanced user interfaces – at any time, you can generate the code required to reproduce and preview your interface, changing and adjusting your design as often as you like.

Qt Designer helps you build cross-platform user interfaces with layout tools that move and scale your controls (widgets) automatically at runtime, taking font sizes and language use into consideration. The resulting interfaces are both functional and native-looking, comfortably suiting your users’ operating environments and preferences.”

“The intuitive Qt API includes all the functionality needed to develop advanced cross-platform applications. The Qt class library is implemented in C++, and provides support for C++ development and Javaâ„¢ programming through Qt Jambiâ„¢. “

Comment by seancallan — June 13, 2008

Why require JRE for running Java-based RIA GUI? GWT, IT Mill Toolkit, Echo3 and Thinwire have given possibility to write your GUI in Java for quite a long time now and they do not require your users to install JRE.

Comment by jole — June 13, 2008

@jole: not that you don’t know or aren’t plugging something, but writing java and running java are not the same thing. Everything you listed is just running html, css, and javascript in the browser. There are obvious benefits and reasons for doing that, but don’t act like they’re the same thing. There are many reasons to want your client code to ACTUALLY be java. The jvm is both fast and extremely rich.

That said, I’m not too impressed by the demo. I give the guy props for all the work, though. Maybe there’s a niche for it, but I doubt it will get much traction once javaFX gets really rolling.

Comment by genericallyloud — June 13, 2008

Hi genericallyloud:

As the developer of Pivot, I’d be curious to know what about the demo you found lacking. We think Pivot is a great platform, but it is also still quite new – we recognize that there will be a lot of room for improvement. It would also be helpful to understand what you are comparing it to as a metric. The demo is bare-bones, that’s for sure, but it is really only meant to give users a quick overview of some of the features Pivot provides. Compared to the original SwingSet or GWT’s Kitchen Sink demo, I think it holds up pretty well.

Personally, I’m not terribly excited about JavaFX. As I mentioned in the original post, I want to build rich client applications in Java, not a new scripting language. Also, JavaFX is built on top of Swing, which suffers from a number of legacy issues (discussed in the blog). This is just my opinion, of course, but if anything seems destined for a niche role, I think it is JavaFX.

Comment by gkbrown — June 13, 2008

Does UI accpet Heavy Component again?

Comment by KKFC — June 14, 2008

Sorry, Greg, but it doesn’t work on Mac OSX Intel running Leopard, JRE 1.5.0_13.

The page comes up, but most of the controls are nonfunctional. I couldn’t get past the radio buttons.

Comment by ds94103 — June 14, 2008

Hi ds94103:

Pivot definitely works in OSX 10.5 – in fact, Leopard is my primary development platform. However, for some reason, it does not work in Firefox. I suspect it may have something to do with the issues described in this article, but I’m not sure:

Comment by gkbrown — June 14, 2008

@gkbrown: I’ve spent quite a bit of time developing UIs on swing, Flex, and html/css/javascript. None of them are perfect. I can appreciate that there are aspects to swing that may be lacking, and in that sense, I can see how pivot could be a competitor to swing. However, I don’t think swing by itself is actually a competitor in the RIA landscape.

I haven’t dug into the code, so keep in mind my judgements are very surface level. Specifically from the demo I don’t see anything new. You yourself compare the Pivot demo to swing and gwt. I don’t think that many people would really consider either of those are very exciting demos. To me RIA also includes powerful animations, video, and flexible skinning as standard tools. Interactive forms are available now without the jre as jole pointed out. JavaFX, Flex, and Silverlight have that. Even dhtml is pretty good in that arena. Nothing in the demo showed me that side of things.

Comment by genericallyloud — June 14, 2008

> Specifically from the demo I don’t see anything new.

I wouldn’t say that Flex or Silverlight offer anything truly new in terms of features, either. What they do offer is a different means of delivering those features – it is easier to build “rich” web functionality using those tools than it is in HTML.

For the record, I don’t necessarily associate “animations and video” with “RIA”. I think the “richness” in RIA comes as much from the availability of more desktop-like widgets as it does from the media features.

Comment by gkbrown — June 15, 2008

Leave a comment

You must be logged in to post a comment.