Chapter 8

Building Domain Architectures

In this chapter we discuss how a suitable domain architecture can be constructed for an existent target and platform architecture, as described in the previous chapter. We look at building DSLs, general best practices for building the transformation architecture, as well as a couple of detailed technical aspects.

Please do not consider this chapter an outline for the process, because the best practices introduced here can affect the target architecture and/or the reference implementation. Issues concerning the development process are addressed in Part III of the book.

8.1 DSL Construction

This section contains some hints about constructing the DSL itself. Note that apart from the items listed in this section, you can find a great number of examples for DSLs throughout the book. An important ingredient for building DSLs is of course metamodeling, which is described extensively in Chapter 6.

8.1.1 Choose a Suitable DSL

When trying to find a DSL for a certain domain, you should always take into account the required amount of variability you need to express. So, before embarking on a fully-fledged, graph-like textual or graphical DSL, ask yourself whether or not simpler forms of DSLs are enough. Figure 8.1 shows the alternatives as adapted from Krzysztof Czarnecki’s work.

Figure 8.1 Various ways of building DSLs.

If you only need to do routine ...

Get Model-Driven Software Development: Technology, Engineering, Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.