Skip to main content

A Simple Framework for Desktop Applications

Posted by joconner on May 24, 2006 at 1:33 AM PDT

Designing desktop applications can be tricky. Threading, resource management, launching, shut down...there are a lot of things to think about. Nothing akin to rocket science, but lots of things can go wrong, and do. A desktop framework would bring much needed consistency to the task, providing structure and encouraging adoption of best practices for application design.

At the JavaOne conference last week, the dynamic desktop duo Hans Muller and Scott Violet presented their plans and ideas for a simple framework for desktop applications. Their presentaion focused on possible APIs, but they acknowledged that tools (like NetBeans) would be important for a successful framework.

They gave some examples of common bad practices that demonstrate why you might want a little guidance (a framework):

  • your app runs on the main thread
  • your app IS-A JFrame
  • your app can only support English
  • your app is a tangle of actionPerformed methods that block the event dispatch thread (EDT)

Goals for the framework include these:

  • must be as small and simple as possible, but not any more
  • must be able to describe it within an hour
  • work very well for small and medium sized apps
  • avoid scripting languages, GUI definition schemas, etc that lock you into any tool.

The framework isn't available yet, but JSR 296 defines the request for the framework. You should expect to see a project for it in the near future. If all goes well, Hans and Scott would like to see this minimalist framework in Java SE 7 (Dolphin).

A framework in the core libraries? Although I like the idea of some guidelines, even a project to assist desktop application developers, I'm not immediately sold on any argument to include it in the actual JRE. Hey, but I don't have any say in these things....or do I? Do you?

As luck would have it, Sun's last general session at JavaOne stressed the need for community involvement in the Java platform's innovation. You have an open invitation to join the Java Community Process, comment on proposals, submit some of your own work. So, yes, you do have a say in such things, but you have to register too.

Related Topics >>