14.4 Editing and saving code

14.4.1 Integrating the design with your own code

As the design for a GUI evolves, it is useful to include the code generated by the interface builder with your own code, in order to produce a working application which can be tested.

The flexible design of the interface builder means that you can use whatever software development strategy you find the most appropriate. You do not have to change the way you work in order to get the best out of the interface builder. Rather, your usage of the interface builder fits in with your own working practice.

At one extreme, you can specify the entire GUI for an application using the interface builder: even callbacks, keyboard accelerators for menu items, and so on. This means that the source code for the entire GUI is generated automatically, and can then be integrated with your own hand-written source code in the manner which suits you best, perhaps by using Common Lisp systems, as described in Chapter 16, "The System Browser".

Alternatively, you may prefer to use the interface builder for the basic design only. Once you have created an interface skeleton that you are happy with, you could start to augment the automatically generated source code with hand-written code. At this stage, you could dispense with the interface builder completely if you wished.

There are, of course, many stages between these two extremes. Because of the iterative nature of software evolution, the interface builder is often best used in parallel with other tools. A cyclic work pattern is often most effective, whereby you develop part of the interface (using the interface builder) together with the underlying code (using other tools), then save and test the results, and then go back and fine-tune the code you have already developed.

The interface builder is flexible enough that you can use it to whatever level you feel is most suited to your working methods, and to the needs of the application itself.


Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker