Top seven design patterns
Java, Model View Controller or Presenter (MVC or MVP)
C++
C++
C++
Homebrew
iTools
Various
Object oriented design patterns for IDL
Here are my seven most favourite design patterns for use in IDL. The explanations are brief as the present, but I hope to elaborate in future. I have included the origins of each pattern. Most patterns are common knowledge in C++ and Java. Some patterns have been derived from iTools, the Syngo platform (Siemens) or are just homebrew ideas of mine.
Controller
A controller class is convenient a way of processing GUI events. The controller represents a class which only handles events and does not directly concern itself with data storage or visualisation. They should be generic such that multiple controllers can be combined with one visualisation to provide a rich user interface.
Proxy
A proxy class is an alternative to class inheritance. A proxy class is often useful if you want to provide a lightweight method for cloning an object without the cost of replicating the underlying data storage. For example, it is possible to replicate an image, but not the underlying data by using the SHARE_DATA keyword when creating an IDLgrImage.
Singleton
A singleton is a class which only has one object instance. A singleton class will often manage system resources or data storage. The advantage of a singleton class is that the programmer assumes that there is only one instance. Thus, the programmer can make an object reference available all contexts via a system variable or common block.
Factory
A factory is convenient way of keeping all object initialisation code in a single class. A factory class will often deal with initialising a family of classes. A factory is useful for keeping a track of heap variables. In IDL it is useful to create procedural wrappers for a singleton factory, thus allowing for object initialisation from the IDL command line.
Process
A process is a class which completes a single procedure. The variables in the procedure are exposed as object fields. This is useful in IDL when you want to insert some procedural code into a an object oriented context, however, you want to be able to test the same code from the command line.
Global Identifier
A global identifier is a string identifier which uniquely represents the instance of a class. A global identifier provides access to an object from a broad context. Global identifier are useful in IDL because it provides a method of referencing objects from the command line. Global identifiers are an integral part of the IDL iTools framework
Workflow
A workflow defines a logical sequence of activities to complete a job. Each activity in a workflow has a corresponding object. The objects are executed and controlled by the workflow engine class. The engine determines the logical sequence of execution. Within a GUI, the engine also coordinates UI blocking and useful user feedback.
Here is a screenshot of a workflow editor which allows for inputs and outputs to be connected in arbitrary order.