ui GUI toolkitIn physics and philosophy a thought experiment is an attempt to solve a problem using the power of human imagination where a real experiment would be impossible or impractical. In a way, then, this Thought Experiment is a bit of a misnomer, because the unit tests presented here are practical and real. You can try them for yourself. On the other hand, this investigation uses the power of imagination by inventing an idealized GUI toolkit with no visual display and simulated events, thus making feasible a set of unit tests that would be impractical, if not impossible, with a real GUI toolkit.
A second way in which this Thought Experiment exploits the imagination is to evolve the necessary classes step-by-step using Python's inheritance mechanism, incrementally testing the evolving code and preserving the evolutionary process at the same time. Thus the imaginative journey is as important as the final destination. Nevertheless, in the end practical and concrete conclusions are drawn regarding the development of custom GUI-based applications with Python.
The two-layer Abstraction-Presentation (AP) framework that emerges from this thought experiment is a form of the Model-View-Presenter (MVP) architecture:
(A)(P) == (m)(vp)
The Abstraction layer is made up of models. The Presentation layer is made up of presenters, which in turn are thick wrappers around views from the GUI toolkit. Within the Abstraction layer, models are organized into logical or functional hierarchies, and within the Presentation layer, presenters are organized into similar, but not necessarily identical, hierarchies as well. Both layers are defined and coupled together using a notation that is flexible, powerful and easy to maintain.
|
XHTML 1.0
© 2003 Donnal C. Walter,
This page updated 2003-11-05. See About this document for information on suggesting changes. |