Tuesday, June 24, 2008

Taking JavaFX head-on: Java SwingBuilder 0.1.RC1 is here!



JavaFX is no more the only way to do modern declarative UIs on the Java platform. However, unlike JavaFX, the Java SwingBuilder allows you to do it today and in pure Java (using an external YAML file to define the layout, control definitions, data binding setup, event wiring).

The aim of the Java SwingBuilder is to make UI programming in Java more productive than in any other tool, without the need for any specialized UI builders. The Java SwingBuilder runs on Java 5 and is released under the business friendly Apache 2.0 license.

Main site:
http://www.javabuilders.org [0.1.RC1 direct download]

Here are some screenshots from the samples app that is new to this release and showcases the power and productivity of the Java SwingBuilder.


And here are samples of the YAML files:
http://code.google.com/p/javabuilders/source/browse/trunk/org.javabuilders.swing/samples/org/javabuilders/swing/samples/ComponentsPanel.yaml

http://code.google.com/p/javabuilders/source/browse/trunk/org.javabuilders.swing/samples/org/javabuilders/swing/samples/BorderPanel.yaml

http://code.google.com/p/javabuilders/source/browse/trunk/org.javabuilders.swing/samples/org/javabuilders/swing/samples/MigLayoutPanel1.yaml

The only thing missing to really give JavaFX a run for its money is the desktop FX. We will do this in a two-step approach:

a) integrate JXLayer to provide desktop FX for "traditional" Swing panels (planned for 0.2)
b) integrate Scenegraph once it reaches 1.0 and changes license from pure GPL (no exact plans at this time)

Please see our wiki (which will be heavily updated with the missing details before 0.1 FINAL).
We look forward to seeing you at the JavaBuilders Google Group with any questions or bug reports:
http://groups.google.com/group/javabuilders

P.S. And last, but not least...the JavaBuilders engine is not Swing-specific. We will be starting development of the Java SWTBuilder shortly (hey, maybe we'll even do a PivotBuilder). Stay tuned.

Tuesday, June 17, 2008

New generation Java applet plugin: handles proxies like it's 1995!

Every time, I believe Sun's hype on how they are going to bring applets back, I get a crushing dose of reality as to how unlikely it is (and don't get me even started on the colossal mistake in the making that is JavaFX).

So, I downloaded the latest beta of the new plugin and run via Firefox 3 some of the demos:
https://scenegraph-demos.dev.java.net/demo-applets.html

And voila! What greets me first (running this from work)? A beautiful proxy prompt/password!

Just like Flash/Flex and Silverlight pop up all the time...no, wait a minute...they don't!

Imagine what would the acceptance of Flash be if every flash animation forced the user to re-enter their proxy prompt/password. Well, it seems this "new generation" (but same old thinking) plugin can't seem to integrate with the browser properly enough to get its proxy login info correctly!

For crying out loud! To add insult to injury, there is a little checkbox that says "Remember password". You can check it as many times as you want, but you will still have to re-enter your proxy user name and password every time.

With QA like this on the "new generation" plugin...I'd better start learning Flex soon.

Monday, June 16, 2008

Java SwingBuilder : finally a 0.1 Beta release

I am happy to announce the Java SwingBuilder project has reached 0.1 beta status and is available for download from:
http://javabuilders.org [Direct download link]

This is the culmination of many months of research and work, dedicated towards bringing the power of declarative UIs to Java Swing (and in the near future SWT), by utilizing the YAML file format (instead of XML or JSON) to define the UI and related functionality such as method handlers (no need to write action listeners, ever), support for long running background tasks, data binding, input validation, etc. All layout functionality is based around the amazing MigLayout layout manager and provides a simple DSL to it that makes creating UIs a breeze.

More info available at the Java Builders wiki:

http://code.google.com/p/javabuilders/wiki/Overview
http://code.google.com/p/javabuilders/wiki/JavaSwingBuilder

The 0.1 beta release also comes with optional integration libraries for SwingX and Jide Common Layer swing components.

Some highlights:
  • Data binding is performed using the standard Beans Binding library.
  • Layout management is performed using MigLayout and nothing but MigLayout (it makes all JDK layout managers obsolete and you owe a favour to yourself to learn MigLayout and forget about GridBagLayout and GroupLayout once and for all).
  • Early versions of integrated input validation is performed using Apache Commons Validators.
  • Support for long running tasks is performed using SwingWorker.
Runs on Java 5.0.

All you need to start using it in your project is a decent YAML editor, for Eclipse we recommend the Eclipse YAML editor.

Unfortunately, the JavaBuilders project is not usable with NetBeans due to a critical bug in their YAML editor, which at this point they have no plan to fix. We recommend you use Eclipse or IDEA IntelliJ instead.

For any questions, support, enhancements, etc. please join our
Java Builders Google Group

Long term plans are to provide a full-blown alternative to JavaFX, so that developers can use declarative UI and provide desktop FX in pure Java. Our next step on that path will be to integrate the amazing JXLayer library as a standard means of providing FX to your Swing app.

Scenegraph support will be added once they write up some documentation and change the license from pure GPL to something more business-friendly.

Wednesday, June 04, 2008

Java SwingBuilder: help me integrate Scenegraph and take on JavaFX before it even arrives

As part of my Java Builders project (in particular the Java SwingBuilder) I am introducing powerful declarative UI building to pure Java using a separate YAML file to define all the layout, data binding, event wiring, layout management, etc., thus saving the Java programmer countless lines of boring, repetitive code.

As part of this effort I would also like to integrate Project Scenegraph:
https://scenegraph.dev.java.net/

which is the underlying engine behind most of JavaFX's power, but available in pure Java.

Unfortunately, Scenegraph is one of the most poorly documented OSS projects out there, despite its importance. It has some minimal FAQ, some slides with API examples that are out of date compared to the latest download, etc, etc. In short it's really hard to understand all the functionality this engine provides without spending countless hours trying every little piece.

Hours, which unfortunately, I do not have. But, if someone were willing to chip in and do the Scenegraph research and document clearly:

- how do I add components to a scene?
- how do you handle effects? how do you chain them together?
- how do you handle animations? how do you define them? how do you transition from one state to another?
- how do you do layout management for components within a scene?

then armed with that documentation I could integrate it into the Java SwingBuilder.


Thus we would have a tool that would have all the power of JavaFX (and more), but available to pure Java...actually available to any VM language that generates Java-compatible classes. We could do RIAs without being forced to go to a different language, especially one such as JavaFX with some very questionable design choices.

Please use the thread on our discussion group to post any findings:
http://groups.google.com/group/javabuilders/browse_thread/thread/f5b006b83dee6431?hl=en

Thank you very much in advance to anyone who is willing to contribute and participate (and maybe submit some working code samples). It will be very much appreciated.

Cheers, Jacek

LICENSE

P.S. Danno Ferrin has brought up the interesting issue of Scenegraph licensing, which right now is GPL v2 only (the license is pretty hidden, not mentioned on the site, youhave to open the actual source code to see it). This means it is illegal to use it in any non-GPL project (including mine, since I use Apache 2.0)
I started a thread on this in the Scenegraph forum, let's see what the Sun guys have to say:
http://forums.java.net/jive/thread.jspa?threadID=41965&tstart=0