Welcome!

Java Authors: Michael Sheehan, Maureen O'Gara, Jonny Defh, Suresh Krishna Madhuvarsu, RealWire News Distribution

Related Topics: Java

Java: Article

Sun Stroke in Santa Clara

Sun Stroke in Santa Clara

Sun has asked for feedback in a "J2SE Client developer survey," http://java.sun.com/webapps/survey/ display?survey_id=1064.

Scott Violet himself went onto javalobby.org asking for input and my initial thoughts were, "Fantastic - finally Sun is taking Java seriously on the client." I got myself a fresh latte coffee and sat down to complete the survey.

Unfortunately, the survey questions were a tad different than what I was hoping for. After a lot of questions about what desktops I used and what I was planning to use, I felt like I was filling in a Computer Weekly subscription form. Finally, up came the burning issues that Sun wants to get our input on: two questions about JFileChooser.

Here's my answer folks: I don't care diddly squat about the file chooser, nor do my users. I build applications that are concerned with viewing, displaying, and editing database entries. The software has to integrate with multiple back-end technologies, make use of different messaging protocols, and interface with call-center telephony and voice response systems. My users' programs have to calculate claim amounts based on catastrophe reinsurance spirals, and they do this by interfacing to spreadsheets and news services. This is the bread and butter of application development for anyone who is involved in serious business software.

This is what I want to see done to J2SE client development.

Ditch emulated widgets. It's yesterday's problem, and users want their applications to look and behave like other desktop programs. Most companies standardize on a desktop, and instead of Sun spending time writing lots of fancy Java code that pretends to be a native widget, just use the native widget. Infragistics JSuite and Quest JClass already provide good native extended AWT controls, and I'm tired of hearing that it can't be done because of different cross-platform focus processing. If SWT and others get it to work, so can you. Antialiased fonts and mitred line corners in Java 2D can be used by people who need them, but for most business apps that are concerned with data display and entry, just give us the extra native controls we need. And, on Windows give us better ActiveX integration. One user told me, "It's not even a case of Swing programs playing second fiddle to Visual Basic on Windows; the best it can do is stand in the back row of percussion and occasionally burp."

Rethink what layout managers are all about. If they're designed to allow multilingual GUIs, they're the wrong solution. I've worked for international companies that deploy apps in different branches across the world, and more often than not they standardize on a single language. If the program does need translating, then J2SE needs something similar to the .nib files of InterfaceBuilder, where the entire GUI is serialized as a separate file that's hand customized for each locale. The XMLEncoder sort of provides the beginnings of this, but this needs to go further and be formalized into a standard GUI architecture that allows true separation of business from display logic.

Segueing into my final point, rethink how listeners work. J2SE client development tends to encourage almost reckless use of inner classes for event handling logic, and inner classes are expensive to load and require flashy VM trickery to work. Someone needs to go back to square one and look at how other languages such as Python and Smalltalk deal with this, and maybe introduce some way of soft typing event callbacks.

I looked for the bit at the end of the survey that lets me type in comments that I want the Swing team to read; however, there was only a tiny text box available. Next time make the box bigger, please guys.

More Stories By Java News Desk

JDJ News Desk monitors the world of Java to present IT professionals with updates on technology advances, business trends, new products and standards in the Java and i-technology space.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
Serge Bureau 05/09/03 06:42:00 AM EDT

They seem to be much quicker at writing doubtful commentary than to answer for it.

It is quite easy to write in a magazine and then ignore the critics.

If you want to see somebody who really know SWING go and see the many years of article from Claude Duguay in JavaPro.

What you wrote this month is really low.

And oyu always loose pages about cutting your grass or some useless phylosophical things, we what Java and not your opinion on the weather.

I apologize for some of the good writers you have, but the overall quality is going down.

Sergey Litsenko 05/07/03 08:00:00 AM EDT

In addition to mentioned by Serge Bureau, I would like to append:
Do person, who is behind "JDJ Staff" and wrote this artice ever try to use or at least learn something about JAVA and SWING in particular? I doubt about that.
"SWT is better than SWING..." - blah,blah,blah.
Instead of repeating constantly such sentences as conjuration, just show your code, which does not work well, may someone will help you to understand technology.

SWT in particular have a long way to go before it will have comparable features as SWING. Certainly, SWING has some bugs, but they're solvable. same related to native GUI libraries.

And I'm tired of hearing that 'all people should use the native widget'. It looks like religious war :(

If you like to use native widget, - use it. But, please, DON'T SPEAK in the name of ALL USERS!!!

If you have a hole in understanding of particular technology, even ASSEMBLER or C/C++ does not help you to achieve a goal!

"Rethink what layout managers are all about. If they're designed to allow multilingual GUIs, they're the wrong solution."

You're kinda GOD, indisputably making the final decision, and complaining: "Everyone is wrong, except myself" . :(

You can read and learn something about layout managers here http://java.sun.com/docs/books/tutorial/uiswing/overview/layout.html

and here http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

If the program does need translating, then J2SE needs something similar to the .nib files of InterfaceBuilder

DON'T START TO INVENT A WHEEL!
JAVA already have the full support of localization, probably best in industry.

You can read and learn something about
localization support in JAVA here
http://java.sun.com/docs/books/tutorial/i18n/index.html

J2SE client development tends to encourage almost reckless use of inner classes for event handling logic

J2SE does not tends to encourage of inner class usage - everything up to developer. Personally, during over four years of using SWING I have never used an inner class for event handling.

Someone needs to go back to square one and look at how other languages...

Someone needs to go back to university :)

Luan O'Carroll 05/07/03 04:04:00 AM EDT

You mentioned the problems with event handlers so the XUI project on sourceforge might be of interest. It takes a simpler approach to handling events and addresses some of the other issues raised in the article. See http://xui.sourceforge.net

Serge Bureau 05/06/03 03:25:00 PM EDT

It si funny to see you people claiming things against SWING. It mainly shows your lack of understanding. Comparing SWT to SWING is ludicrous.

And users do not care about native look at all as there is hundreds of PC apps not having the standard interface at all. As far as Linux, they don't even have a standard interface !

Stick to what you know, the client side is obviously not it.