Wednesday, June 01, 2005

Keeping it simple...

I've been writing some COM based functionality using d-flat. To test this, I've got some Java code. This is mainly because I know how to write GUI code easier in Java than anything else I've got at hand. So, my test harness is written in Java. This Java code that I've written is some of the best (read simplest) code I think I've ever written.

The application itself is very simple. Just a frame with a tabbed pane. Each pane can have fields that are used as parameters for testing the COM object. Each of the panes have a few labels and fields. To do this, I've got a base class for the panel that handles the generic stuff, like dealing with GridBagLayout (which I think any Java programmer that needs to do Java GUI should learn and love). The base class is 75 lines in total. The most complex panel I've got has three labels and three text fields and one button. The class for creating this panel is 31 lines. And that line count includes comments and single line impots (importing only one class per input, i.e. no javax.swing.*).

It's all so simple and works quite well. I'm happy that I've achieved this, but sad that it is "artifact" code. [sigh]

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home