Unix Programming - Special-Purpose Code Generators - Case Study: Glade
We looked at Glade in Chapter8 as a good example of a
declarative minilanguage. We also noted that its back end produces a
result by generating code in any one of several languages.
Glade is a good modern example of an
application-code generator. What makes it Unixy in spirit are the
following features, which most GUI builders (especially most
proprietary GUI builders) don't have:
Rather than being glued together as one monster
monolith, the Glade GUI and
Glade code generator obey the Rule of
Separation (following the “separated engine and
interface” design pattern).
The GUI and code generator are connected by an (XML-based) textual
data file format that can be read and modified by other tools.
Multiple target languages (as opposed to just
C++) are supported. More
could easily be added.
The design implies that it should also be possible to
replace the Glade GUI editor component,
should that ever become desirable.
[an error occurred while processing this directive]