Some
ways have however been found to be better than others: easier to create, debug,
maintain, and understand. Many??”but not all??”of these ways of structuring code are
also appropriate when writing generators, and the good developer will naturally use
them. Generators also have some special requirements of their own, mainly because of
the strong existing structure provided by the modeling language.
In this section we will look at various ways to structure generators. Each individual
way can be taken and used on its own, or in any combination with the others.We have
however found that building a hierarchy of generators top-down in the order speci?¬?ed
here works particularly well.
A top-level ???autobuild??? generator is thus visible to the user, and is responsible for
building the resulting application for testing. It calls generators de?¬?ned on the various
modeling languages, and these split their task up according to the various ?¬?les to be
produced from each model. Where necessary and possible, the ?¬?le generators again
split the task up according to the object types in the model. If more than one
programming language is needed for the same set of models, this structure can be built
in parallel for each.
11.4.1 Autobuild
The Agile movement has grasped the importance of continuous integration via
automated builds, even though their second tenet is to favor ???individuals and
interaction over processes and tools.
Pages:
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553