Display Machine features

Safety

... is one of the classical buzzwords (not only in object oriented programming). It can mean nothing or everything.

DM gives you safety against yourself (you, the programmer). You are responsible for the bugs. You must get everything working in an extremely short time. So, you are the biggest danger.

DM is tolerant against most errors. It always tries to get the best result from the current situation. It does its best not to crash an application. In short: it is robust.

Robustness

... gives safety. Its a more pragmatic than safety - it is possible to design a robust system. Designing a safe system is more difficult (if it is even possible at all).

DM is robust. So it works very carefully. Before anything is done, DM checks all conditions which must be fulfilled to complete the task. If some condition is not met, a warning is issued (if you asked for such warnings) and the job is just not done.

But the application will not crash.

A typical situation is the use of an non-existent object. This would normally result in a system crash. Not with DM. It makes the usage of these objects impossible (for example by disabling any button calling a feature of a non-existent object).

Independence

The most important benefit of object oriented programming is the enhanced maintainability. It is possible to change one part without interfering with the rest. This reduces the testing efforts necessary and it increases the safety.

DM follows the same strategy.

Pictures (or forms) are independent of the basic algorithms of the virtual machine. They are based on it, but they are represented in a totally different way. We have two independent parts - the virtual machine and the graphical application. Both can call the other - but the coupling is not very tight and if for same reason the interface does not work, the application will not crash. And, you can change either of them without interfering with the other.

the virtual machine the forms
can call forms by calling the display routine of an object with the proper parameter - the number of the form. If the called form is not available either a error will occur or just nothing will happen (according to the programmer's intention)

A form can also call the display routine (as it is an ordinary feature of the object). So it possible for forms to activate other forms. This allows the design of complete applications with many forms.

(also called the GUI application) are always associated with an object. They can access features of the object or of objects reachable directly or indirectly from it. They can also change attributes of the object.

If a form accesses an attribute no longer available (because the virtual machine has been changed) the corresponding parts of the form will be disabled automatically. So there is no danger that the user will press a non-functional button.

Although forms are always independent of the virtual machine, the virtual machine must be changed when functionality is requested which was not available before. It is not possible to write program functionality into the form itself (or at least only in a very limited way - a sequence of procedure calls). This has...

one
disadvantage

  • It is necessary to extend an Eiffel class with a new attribute

but many
advantages

  • Forms (the application) and virtual machine are separated. So they can be changed without interfering with each other
  • Extensions and enhancements to the virtual machine are included automatically into all applications based on the same virtual machine. So in the long term the virtual machine becomes better and more stable.
  • If an application (the form) has been changed, the virtual machine stays the same - it is even not necessary to recompile
  • All benefits of object oriented programming stay (in the virtual machine) - even if the forms are not object oriented.
  • As there is no program code in the forms, they can be changed easily without interfering with the general program structure.

Copyright © Object Tools -- info@object-tools.com
Last updated: 2005/02/02 11:51:07