<< Part 2 of ?: Swing Application Best Practices | Home | This Is What Ticks Me Off With Sun and Swing >>

Part 3 of ?: Swing Application Best Practices

The Application and Where to Start

If you haven't seen Part 1 and Part 2 of this series I invite you to read those. I'm really excited about the amount of response I have received on these posts and I really think something good can come out of this. The only problem thus far is I have received an email from 1 person wanting to join the project. I can't do this alone and I can't do it with 2 people. For this to work I really need more participation on the actual project so if you would like to help in any way please send me a gmail address to gdboling AT you know the rest.

We should start talking about what kind of application we can build that will provide a good foundation for everything we want to try and accomplish. Here are a few points to think about as we try and come up with ideas:

  • It has to be simple yet interesting
  • It needs to support multiple forms
  • It should try and use as many components as makes sense. It doesn't need to a be SwingSet demo but at the same time, if a concept can't cary over to multiple components we need to provide good examples.
  • It doesn't have to be RIA. I believe the things we are trying show and learn can apply to any type of Swing application. There are just some things that RIA's require that aren't what we care about right now and I don't want to get hung up on something.
  • Persistence shouldn't matter. We should begin by mocking it if we need to in order to keep things simple. If later we want to supply different persistence layers then fine. But that is not our goal.

So let's hear some wonderful ideas. After I get a few I'll chime in with the ones I have in mind.

Tags :


Re: Part 3 of ?: Swing Application Best Practices

what about a simple raster-graphics software? Java2D gives enough functionality, you can have a lot of forms, it's interesting, easy to demonstrate MVC, etc.

Re: Part 3 of ?: Swing Application Best Practices

While that sounds like fun I'd rather not get caught up in the possible complexity that is Graphics2D. And I'd rather do something a bit more real world. But thanks for the advice. Might be a fun side project anyway.

Re: Part 3 of ?: Swing Application Best Practices

For my Guice-GUI framework (not released yet), I have used an Address Book example, that's a simple example that you can "easily complexify" as much as you want.

By the way, Gregg, although I cannot promise much of my time to it (I have 4 OSS projects currently, 2 of them in a very active state), I would be glad to participate to the Maddie project.

Re: Part 3 of ?: Swing Application Best Practices

Maybe. How complex can an address book really get though? Can you elaborate on some features?

Re: Part 3 of ?: Swing Application Best Practices

Well, first of all, you may want to manage pictures of your contacts, that will add some spice to the app (have to use threading when storing/loading pictures).

Second, you may define "groups" of contacts, That will give the possibility to use more lists or even a tree.

Third you may want to add agenda facilities to your address book, where you can plan meeting/calling some of your contacts. That could be using drag & drop (I've seen in another post that you seem to love drag & drop with Swing ;-))

Fourth, you may add search capabilities (if your address book is big), which gives rise to interesting GUI problems such as: if I open the detail info of contact A in a window (that was open from a search window), then how will the search window reflect the change (this can help show usefulness -and related problems- of binding, including dirty forms; or we can use an event bus for this kind of "view synchronization".

Fifth, you may decide to add some docking capabilities (due the fact that users like to forge their own address book layout), and here you definitely would need an event bus.

I stop here, but you see the idea.

Re: Part 3 of ?: Swing Application Best Practices

I do like the address book idea. If you want to add further complexity, you may add the functionality to compose and send emails (thus providing a formatted text editor, even with a spellchecker). It would be possible to continue adding usage statistics charts such the ones generated by Xobni in Outlook. Yes, I think you can extend the example as much as you want. I'm quite busy al the moment, but I wouldn't mind to help whenever I have the time.

Re: Part 3 of ?: Swing Application Best Practices

have read all 3 parts of the articles and find the idea is very very interesting!! :-) As the example application, I suggest a personal finance application, which has only two parts(because of "keep it simple"): 1. cash management(credit & debit). 2. investment management(stocks & funds) The reasons: 1. Everyone, who has a job, need such a application. 2. It covers almost all features you mentioned.

Re: Part 3 of ?: Swing Application Best Practices

Hi! First of all I like the idea of a "interactive" longlasting tutorial project that figures out the best practices in swing! But please don't come up with a addressbook application! This idea is so old and boring. It's like "Hello World 2.0" :)

Despite the case that i find the finance solution interesting, i would rather prefer something that has to keep the performance issue in mind (something like how do I deal with many events, simultaneous animations, binding to a control instance). I would suggest something like: Desktop Tower Defense
But I have to admit that it focuses perhaps too much the "gaming aspect" for this project. But it could be a hint towards an interesting project... I'm open for comments!!!!!! cheers michael

Re: Part 3 of ?: Swing Application Best Practices

Thanks for the suggestions. If interested lets move this discussion to the

maddie dev mailing list.

Problem domain -> widely understood is better.

The address book app is useful because everyone knows an address book. As a potential learner I want the focus to be on the solution and Swing, not on first learning the problem domain, which I feel would be an issue with a finance app, and even a games app. (Although I do love DTD).

Add a comment Send a TrackBack