The IBM Director SDK allows for a great deal of flexibility in implementation. There is often more than one way to program a new function with the SDK. This section is intended to provide guidelines for making design decisions.
Guidelines:
When you create a GUI panel for the IBM Director Console, always choose to extend TWGTaskFrame. This class contains code to place your program on the window list and to manage your GUI task during a Console logoff.
Consistency in look and feel is important. To make your GUI integrate properly into the IBM Director Console, use the might href="e_uil.html">IBM Director look-and-feel guidelines.
Generally, the IBM Director Server code should run in the main server JVM. That is, the sameJVM parameter should be set to true. There are several advantages to running with sameJVM=true:
However there are some important guidelines for running in the main server JVM:
There are two basic methods for writing debug messages:
1. Writing to standard out. IBM Director will capture the standard output messages and redirect the output to a file in the "log" directory. Use this method for initialization messages.
2. TWGRas. TWGRas will write messages to the TWGRas.log file. TWGRas can be started and stopped with the raswatch command and the TWGRas.log will "wrap" when it grows to big. TWGRas is best for normal debug messages.
Generally, you do not need to create a new service node for every Command you send. Most of the time, you will only need to create one service node and send all of your Commands through it.
If throughput is critical, it is important to realize that a Service Node cannot process a Command while a previous Command is being processed. For instance, if you extend ServiceNode and two different components each send you a Command, your Command Received() method will be called for the first Command and the second Command cannot be processed until your code returns from CommandReceived(). In cases where you need to optimize throughput, you may need to:
Always use the Command interface to create, update and delete tables. The Command processing has code to handle database errors. Never open your own database connection from inside a Directro Extension.
It can be helpful for debugging if you use a predefined message format.
If messages that are presented to the user have a unique message identifier that identifies the component or extension within IBM Director that issued the message and a unique message number, you can more easily trace the message to it's source.
The message format proposal is:
The message identifier is 10 characters in length and has the format: XXXMYY###Z
where,
For example,
Message number range is 000 - 999
For example, a valid IBM Director zSeries message identifier would be: DNZZVD005E