Skip to main content

Karsten's Best Practice Swing.

6 replies [Last post]
jousby
Offline
Joined: 2003-07-21

Karsten,

After reading your post earlier this year (see extract below) I've been eagerly awaiting an example application detailing your thoughts on best practice Swing. In particular the stuff on data binding.

Do you mind me asking how this is progressing, and do you have any links/details to tide us over in the mean time.

Thanks,

James.

______________

extract from post by Karsten:

I plan to contribute to a preliminary version of the Java desktop blueprints. Therefore I will publish library code, example applications, patterns and articles around my desktop architecture and good practive patterns. The overall goal is to find the ideal Swing production process.

Find here a diagram that explains how I build up all my Swing applications. In the diagram replace 'JGoodies' with 'custom' and you have a general Swing application architecture: http://www.jgoodies.com/products/images/Swing-Suite-Details.jpg

I'm currently in the process of overhauling my data binding framework. That is a candidate for my next open source project. This framework framework is a Java port of the Smalltalk ValueModel hierarchy. Find below some references about ValueModels. See an overview of my app architecture at pp255 in http://www.cincom.com/downloads/pdf/AppDevGuide.pdf ValueModels are explained in: http://c2.com/ppr/vmodels.html A comparison of my approach with MVP: http://www.object-arts.com/EducationCentre/Overviews/MVC.htm Oracle's JClient uses something similar to my new data binding: http://otn.oracle.com/products/jdev/htdocs/JClient/forms_Client.html

I will work on the code and simplify the library before I will bring it to a larger audience. Also I feel a need to publish a sample application that shows how everything is tied together. That is scheduled for later this year.

___________________

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jousby
Offline
Joined: 2003-07-21

Cheers Karsten.

Looking forward (as are plenty others no doubt) to what you come up with in 2004 and thanks for being so generous with your time/code.

Regards,

James

karsten
Offline
Joined: 2003-06-11

Hi James,

I would very much like to publish my binding and validation libraries, and more generally everything I've build since the JavaOne 2003 and in the past. But there's a strong need to prepare every new package so that a large audience can understand it and work with it well - without a need to contact me.

When I open sourced the Forms, Looks and Animation packages many developers applauded and started a friendly mail hailstorm. It still takes a significant amount of my time to answer in the mailing lists and individual email. I've now improved the tutorials and HTML documentation, the packaging, build process and the overall user experience for the open source packages. And that pays back. I can now work more on the code.

That said, I feel a strong need to prepare a demo and tutorial for the binding library before I can ship it to the general public. Swing Suite customers can already study the binding in some of my larger sample applications. But even these examples are far away from being a good introduction for the binding.

With the binding and now validation I have build two solutions for general Swing problems that most developers face. I see my primary contribution not in the library itself but in providing an overview of the problems, typical pitfalls, and available concepts. I don't want to irritate developers and therefore will present my solutions as just _one_ instantiation of just _one_ concept. My binding demo shall highlight the brute-force copying binding as well as advanced concepts to buffer, cache, multiplex and synchronize data.

I've recently found a visual language how to explain the problems my binding solves. Basically I present a bunch of incompatible male and female connectors and then add a set of adapter to a set of compatible connectors plus many predefined extensions that are all based on these compatible connectors. I've agreed to talk about the binding at the German JAX2004 Java conference, and so there's no way back and there's a time frame when a presentation will be available.

Two other things led me to change my schedule. My primary customer required a validation solution urgently. Since the binding works well, I have given the validation and validation demo a higher priority than the binding demo. You can find the validation demo at http://www.jgoodies.com/freeware/validationdemo/. I've not yet announced it to the public because some early reviewers have convinced me to add two other common validation tasks: the configuration of the JFormattedTextField and using custom Format implementations with the formatted input (to enter stuff like a temparature, volume, length, etc.).

So what about the updated schedule? I expect to have the Validation Demo ready next week; however, most likely I'll wait until January before I announce it to the general public - just to get more attention. The next step is to open source the Skeleton application. Skeleton shows some of my basic Swing good practices: how to separate concerns, and where to put what code? It is already in the java.net CVS and I've updated the license agreement.

Except the Binding Demo, almost all code parts are ready to go public. Be asured that I will deliver a lot of stuff early in 2004. Sun has helped me bringing my contribution to the Java desktop blueprints to the light. As of today I've failed to deliver the most interesting part: how to tie all parts together to build a Java Swing application efficiently. Many people are satisfied with the already open libraries, but that's just a small portion of what I can deliver.

I hope you understand my constraints that I've to prepare everything on product quality before I can publish it. So, back to the code ;) I'm eager to check in some recent improvements to the CVS.

Best regards,
Karsten

yeroc
Offline
Joined: 2003-06-10

Karten,

I too am eagerly waiting to see the best practices documents and binding and validation libraries. You mentioned that the source for your Skeleton app is checked into the java.net CVS but I looked around and couldn't find it. Could you post a link?

Thanks,
Corey

karsten
Offline
Joined: 2003-06-11

I maintain three invisible subprojects under the 'jgoodies' container project: binding, demos and validation. The code has been moved to the associated CVS directories but the projects are still marked as non-public.

Skeleton is in the demos project. I will mark it as public as soon as the Swing Suite 1.3 is out of the door. The current schedule is late in January.

Best regards,
Karsten

sirwio
Offline
Joined: 2005-03-02

What's the status of the demos project?

I bet there's tons of people waiting for sample applications that will ease the initial development of maintainable and reusable swing applications. I'm definitely one of them...

karsten
Offline
Joined: 2003-06-11

These demos are in the commercial Swing Suite and I'd like to open source them and make them available to the general Java community, not just customers. But it seems I can't get a budget to maintain, support, improve and extend the demos collection.

- Karsten