| Search Locate Previous Next | Contents |
Managing Complexity
Causeway exists because programming effective Gui applications is a tedious and error-prone activity. The name Causeway started as a joke a causeway is a safe path across a bog, so think of the Causeway utilities as one possible safe path across the Gui (pronounced Gooey). This user guide sets out to explain the problem, and then walks you through a series of tutorial examples which should lead to a good understanding of the art of Windows programming in APL.
The first thing to realise is that good Windows applications are an order of magnitude more complex than the equivalent applications on a mainframe or under DOS. The reason is that the user is given almost complete freedom, and can interact with virtually any of the visual components at any time. He/she might close the whole thing down, probably by accident, with one simple click of the mouse; there is the possibility of someone resizing your main form or attempting to drag it completely off screen; it is very likely that at least one user will have set their form background colour to deep purple; ... and so on. Causeway classes have a lot of built-in behaviour which will help your system to survive this kind of attack from innocent users.
The next most common source of problems is when applications forget to redraw some field when the underlying data changes. On a mainframe it was easy the user typed some stuff and hit <Enter> or a function key. You read any altered data, refreshed everything on the screen with the new values, and waited for the next <Enter>. Under Windows there may be many different ways a user could interact with your data for example a chart could be affected by a change to the numbers, a new choice of chart type, or of course by the user opening a completely new data file. Add a few floating toolbars and right-button menus and the complexity can quickly multiply out of control.
Causeway is primarily designed to take this administrative load away from the application programmer. Computers are good at this sort of thing, so why not leave APL to keep track of what you changed, and what must be re-done in consequence? The basic idea is that every object you see on the screen is simply the visual manifestation of some APL expression; associated with the object is a list of any variables which it depends on. If any of these change, Causeway will ensure that all dependent objects get redrawn.
Pre-requisites
A Windows APL interpreter (Dyalog APL/W 8.2 or higher). A working knowledge of Windows design standards. Please buy and read The Windows Interface an Application Design Guide (Microsoft Press) if you are new to writing Windows applications.