BT

Standard Application Framework for Swing Proposal Approved

by Floyd Marinescu on May 25, 2006 |
Unlike the web development world, the Swing community has long been lacking standards or frameworks for how to best design applications.  This may change soon, as JSR 296, Swing Application Framework, has been approved by the JCP. 

The proposal defines the need:
Well written Swing applications tend to have the same core elements for startup and shutdown, and for managing resources, actions, and session state. New applications create all of these core elements from scratch. Java SE does not provide any support for structuring applications, and this often leaves new developers feeling a bit adrift, particularly when they're contemplating building an application whose scale goes well beyond the examples provided in the SE documentation.
JSR 296 will standardize:
  1. The essential application lifecyle, startup and shutdown, with well defined milestones so that applications can insert startup or shutdown work when the application has reached a well known state.
  2. Support for loading localized resources. Desktop applications deal with a set of common resource types beyond message strings, notably images, colors, and fonts. Resources can also be specific to the platform or to the application's "branding".
  3. Persistent session state. Most applications need a way to persist things like top level window geometry across sessions. Automatic support for such common cases as well as for loading and storing arbitrary session data at startup and shutdown time, would be useful in most Swing applications.
  4. Actions define the behavior of Swing application from the user's perspective. In all but the smallest applications, it's useful to be able to loosely couple an Action's (localized, branded, etc) presentation from its implementation. Action implementations often must perform some work asychronously wrt to the Swing event dispatching thread. The application framework would provide support for doing so and for providing GUI feedback while significant work is being done on the user's behalf.
The JCP EC all voted yes, with the following comment from IBM:
This JSR aims to address a common challenge for Swing developers - IBM acknowledges the underlying need which this JSR targets. Since Sun have proposed that this JSR will be considered for inclusion into Java SE 7.0, we suggest that the JSR-296 Expert Group take care to preserve the JSR's current scope as they progress. This is to ensure that JSR-296 doesn't grow into an unnecessarily large application framework which could further overload the Java SE platform in the future.

The expert group is still being formed and currently includes Ben Galbraith from Ajaxian.  The spec aims to have a final framework ready for Java 7 (Dolphin), with an early review draft later this year.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Please consider including Karsten Lentzsch by Dorel Vaida

I've worked for almost 2 years with the excellent JGoodies library by Karsten Lentzsch. If there is anything about how to use Swing in a proper way and this guy doesn't know, than DO NOT get him into the expert group. Otherwise, Ben, please consider talking to him and eventually get him into the expert group, his tremendous Swing experience can do only good for this JSR. Of course if he'll accept.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT