Monday, April 10, 2006

Non-Performing Journal Sections (NPJS)

A non-performing journal section is the equivalent of a blog post or a comment. Till now, entry was made via the command line, one line of text at a time. Fine for a text client, but really yuck for a Swing client. That's been changed now. The Text client still works the same way for this command, but the Swing client provides a JTextArea for the user to edit. And no, I haven't implemented forms processing yet.

What I have done is change the abstract class Display to DisplayInterface. This allowed me to combine the display classes with the command classes which invoked them, and still keep commands stateless and threadsafe. OK, so I only eliminated 3 classes and one package, but every little bit helps.

Unfortunately the same can't be done with commands and the evaluators they invoke--evaluators are stateful. So we're going to have some dumb command classes.

An abstract form evaluator class is likely coming soon. First I want to redo the help command. It can be much simpler (i.e. eliminate the evaluator class it uses) and easier to use, too.

Another item on the short list is the ch command for creating/editing content, but I may want to implement it as a form--I've already got enough evaluator classes to convert to forms.

Frankly I'm delighted with this forms idea. It will seperate a lot of nasty code from ordinary applicaiton code. :-)

Bill

0 Comments:

Post a Comment

<< Home