Geertjan is a DZone Zone Leader and has posted 457 posts at DZone. You can read more from them at their website. View Full User Profile

Interview: Greg Brown & Todd Volkert from the Pivot Framework

06.27.2008
| 17009 views |
  • submit to reddit
How/when did you get started creating Pivot?

Greg. Pivot actually grew out of an AJAX toolkit we had been working on for VMware. We just couldn't get the performance and behavior we wanted out of JavaScript and the DOM (although if the <canvas> tag was supported on more browsers, this may have been a different story). Java seemed like a good fit, so we started playing around with porting our design to Java/Java2D a year or so ago. It actually worked out really well, so we continued to work on it. The result is what we are now calling "Pivot".

VMware Remote Access client in Pivot

Who do you anticipate to be the target audience?

Todd. Developers of rich internet applications will benefit most from Pivot, but one of the things that's really great about Pivot is that the runtime container (browser vs. native application window) is abstracted away from the developer, meaning that the same application can be deployed in an applet or on the desktop without any code changes. As such, Pivot is a good choice for any cross-platform application developer.

How has the response been?

Todd. We just announced it this week, but so far, the response has been very positive.

Can you walk us through a very basic step-by-step "getting started" scenario?

Greg. The Pivot tutorial is probably the best place to start:

https://pivot.dev.java.net/nonav/tutorials/index.html

It includes the traditional "Hello World" application and is an easy way to get started using Pivot. It also includes more detailed information on how to use many of Pivot's features (note, however, that it is still a work in progress, and many sections are incomplete).

Javadoc for Pivot can be found here, but it is also a bit incomplete in some areas:

https://pivot.dev.java.net/doc.zip

What are your personal favorite features?

Todd. The XML declarative markup, WTKX, is a personal favorite of mine. I had to prototype a medium-sized application given a handful of screen mock-ups, and in under 4 hours, I was able to get a functional prototype up and running:

I only had to write about 20 lines of Java code; the rest was all done in WTKX. It yields a great separation of code and presentation logic, which makes for a much more maintainable code base, but it's also a great prototyping tool!

Greg. Personally, I'm very happy with the whole package. All of the classes in the various libraries work really well together. That doesn't mean that they are tightly coupled, though—they can also be used independently. The entire platform is geared towards allowing developers to do what they need to do as seamlessly and efficiently as possible.

As an example, I really like the fact that I can execute a web query, have it return a List object, and set that list as the data model of a table view. We do this in the Stock Tracker application in the tutorial. This application displays a list of stock quotes retrieved from Yahoo! Finance (http://finance.yahoo.com). It's very simple and clean—the whole thing happens in just a few lines of code. However, it is not simplicity at the expense of flexibility. If you want more control over anything in Pivot, you'll probably find a hook into it. Even then, we don't sacrifice elegance for flexibility. Everything just works together very well.

Pivot Stock Tracker demo running in Safari

 

Published at DZone with permission of its author, Geertjan Wielenga.

Comments

Steven Baker replied on Mon, 2008/06/30 - 7:44pm

i like the idea of this, but i think it needs some optimisation

my computer literally slowed to a crawl when the demo applet started...

and no, my pc isnt even a peice of junk

Todd Volkert replied on Tue, 2008/07/01 - 1:17pm in response to: Steven Baker

Hi Steven,

 The slowness of the demo is due to the JAR files being served out of subversion on java.net.  When we load the applet off a plan old web server, it starts much faster.

 -Todd

Steven Baker replied on Tue, 2008/07/01 - 5:30pm

it's not so much the load time. when it's already up and running and all downloaded, the browser chokes up a bit.

are you saying the applet downloads jars at run time? or is it all delivered at the start?

Todd Volkert replied on Wed, 2008/07/02 - 10:48am in response to: Steven Baker

Curious - we've tested Pivot on a number of systems, and it has always performed well.  Question: might you be running it inside a VM?  The one time I've seen Pivot lag is when it was run inside a virtualized environment (the virtual graphics drivers tend to be very primitive).

 The applet in the demo downloads all the JARs at startup as it is set up now.

 -Todd

Greg Brown replied on Wed, 2008/07/02 - 1:09pm in response to: Steven Baker

Looks like this may actually be dependent on the Java plugin version. We see some unusually high CPU usage in Mac OSX and pre-J6u10 builds on Windows, but in J6u10 CPU usage is normal. What version of the JRE are you running?

 

Steven Baker replied on Wed, 2008/07/02 - 5:48pm

must be it... im using JRE 5

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.