Thomas has posted 2 posts at DZone. View Full User Profile

Rich Graphics with Apache Pivot 2.0

11.02.2010
| 9359 views |
  • submit to reddit

Pivot 2.0 is expected to be released shortly and there are some great enhancements in this version. Just one that I'm excited about is the new SVG support, thanks to the integration of SVGSalamander. Using Pivot 2.0's Drawing class it is easy to load and scale vector graphics created by any vector graphic application such as Inkscape or Illustrator. The result of scaling an SVG drawing versus a PNG image is shown below:

Scaled Pivot Logo

Pivot's skin and theme system is already excellent and now using SVG based images it is also easy to dynamically adapt the images to any color theme your application might use. Bitmap based images are not longer necessary, neither is the the need to recreate them for each possible skin/theme your application may have.

Pivot's new Drawing class is backed by SVGSalamander's SVGDiagram which also provides a powerful scenegraph with retained nodes that can be dynamically created, edited and animated. Plus the scenegraph is completely based on the excellent SVG standard from the W3C.

Unlike JavaFX, which forced a node based programming paradigm as the only choice for rendering graphics, Pivot also provides the full power of immediate mode rendering using the Graphics2D. Now, the best approach can be used and mixed to provide lean, performant and rich graphics.

The horizon for Pivot looks better all the time, its well designed framework made it easy to integrate SVGSalamander and other scenegraph frameworks like ZVTM can also be integrated just as easily. Pivot as an RIA framework has provided what JavaFX was not able to and it has emerged as the best Java option available for the Rich, Internet and Application aspects that modern Java applications require.

The reality that took a long time to come face to face with is that JavaFX will never be an RIA framework, only a possible future set of Java multimedia and UI APIs, after another long wait until they become available in Q3 2011. Pivot certainly welcomes anything that may yet come forth from JavaFX with open arms.

Pivot is a Java RIA replacement for Microsoft Silverlight and Adobe Flex that is not based on Swing, rather it provides an application framework featuring a robust set of UI components, Internet service integration and graphics that can be used today. In addition, Pivot features the powerful BXML script which facilitates building the UI or other object graphs and very robust data binding. There are plenty of demos and tutorials allowing the developer to come up to speed fast. Enjoy Pivot!

Checkout RIA in Java with Apache Pivot here

Published at DZone with permission of its author, Thomas Buhr.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Hantsy Bai replied on Tue, 2010/11/02 - 5:02am

But it is lack of a visual editor like NetBeans Swing GUI builder...it is better provides such a tooling for end user.

Philippe Lhoste replied on Tue, 2010/11/02 - 8:09am

Interesting and exciting news.

I started to explore the RIA world because my company wants to evolve from Swing. So at the time I looked (on my own) at JavaFX and Pivot. Both seemed interesting, in slightly different ways: JavaFX, true to its name, explored mostly the effects axis (making things to look nice and moving) while Pivot was more on the "form" axis (providing lot of useful GUI controls). I also appreciated that Pivot demos loaded very quickly (compared to JFX).

My company discarded Pivot (not enough press for them) keeping JavaFX and GWT in a short list. I focused more on mastering JavaFX. Now they discarded JavaFX too...

Since JavaFX have been pushed to a fuzzy limbo (I bet nobody will start to develop with 1.3.1 now, and 2.0 is still far away in IT time), it is probably time to go back and take a second look at Pivot... :-) Since I learn Scala too, I will explore the usage of Pivot with this language, it might be interesting.

Thomas Buhr replied on Tue, 2010/11/02 - 9:06am

The link to the Apache Pivot site at the end of the article is wrong and try as I might it does not seem to change, the JavaLobby editor does not seem to work. Here is the correct link:

 http://pivot.apache.org/

Thomas Buhr replied on Tue, 2010/11/02 - 9:19am

@hantsy bai

Pivot has a handy BXML script language that is actually faster than using a visual editor in a IDE. For me the framework is usually what matters and not if there is a visual editor, I've always perfered to not limit myself or depend on such visual editors as much.

Thomas Buhr replied on Tue, 2010/11/02 - 3:23pm

@ Philippe Lhoste

 Yes, I went back and looked at Pivot again as well, actually, it was on the eve of JavaOne 2010. I have been very grateful and happy that the Pivot community has been so prudent and accomplished so much during the time that JavaFX promised but did not deliver but instead confused and finally ripped the rug (JavaFX Script) right out from underneath everyone who had already invested 3+ years into it!


cowwoc replied on Tue, 2010/11/02 - 9:26pm in response to: Thomas Buhr

@Thomas

" Pivot has a handy BXML script language that is actually faster than using a visual editor in a IDE. For me the framework is usually what matters and not if there is a visual editor, I've always perfered to not limit myself or depend on such visual editors as much."

 

Yeah, because hacking away at XML is soooooo much cleaner than using drag-n-drop for visual components. I think not :)

Greg Brown replied on Wed, 2010/11/03 - 7:36am in response to: cowwoc

> Yeah, because hacking away at XML is soooooo much cleaner than
> using drag-n-drop for visual components.

I tend to agree with Thom - from my experience, GUI builders are great for prototyping or testing a toolkit's capabilities, but in practice I have rarely found them useful.

Also, BXML really *is* easy to use. No hacking required. :-)

Mark Haniford replied on Thu, 2010/11/04 - 10:09am

Personally, I like having round-trip engineering so that I can have both a visual designer and the xml/whatever source code in sync. Once I've prototyped something out, I find it easier to just start playing with the source. But whenever I hear this argument..."you don't need this, because...", I know that it's a weak spot of a technology. The Ruby on Rails used to say that in regards to IDEs.....until the IDEs came up to speed. You can always smell the bullshit when someone tells you "you don't need it...."

Greg Brown replied on Fri, 2010/11/05 - 7:42am in response to: Mark Haniford

Of course the lack of a GUI builder is a weak point. However, that doesn't make the argument that one isn't necessary "bullsh*t". It's just an opinion, based on experience using both forms of development.

Comment viewing options

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