Good modeling tools can, however, bring many improvements compared to
code-based reuse. Perhaps the main improvement is that now components can be
reused by direct reference, rather than by indirect reference through typing the same
name. This goes beyond what even the best refactoring environments offer: nobody
need ever think about the name change and what to do, everything just continues to
work.
Reuse is discussed in more detail in Chapter 15: for now, the important thing is to
make sure that if there are parts of a set of models that will be reused when building
another product, these parts can be clearly separated. Reusing ???every other object???
from a diagram is about as possible as reusing ???every other line??? from a piece of code.
This is thus another place to apply the ideas of commonality and variability that you
have already used in de?¬?ning your modeling language. This will allow your modelers
to reuse a model by linking to it, rather than by duplicating it with copy??“paste and
changing parts of it.
13.4.4 A Balancing Act: Generators and Domain Framework
As we discussed in Chapter 11, the temptation is often to start work on the generators
too early. Generators can safely be left until the modeling language and its metamodel
are stable. There can still be minor changes, for example, adding a property or maybe a
less important object type, but there should not be any notable refactoring of the
names of concepts or the division of responsibility between the concepts.
Pages:
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648