8. Generating Artifacts

Introduction

As we saw in Chapter 2, a key task that domain-specific languages can be used for is to generate code and other artifacts. In this chapter, we’ll review styles of artifact generation that can be used with DSLs and then look at a specific worked example of using the default artifact generation system supplied with the DSL Tools. Then we’ll review in detail the syntax used by that system. Finally, for those interested in deeply customizing the artifact generation system, we’ll look at its implementation architecture and three customization examples.

Historically, artifact generation has typically been spoken of simply as code generation. The analogy is often drawn between the move from assembly code to high-level ...

Get Domain-Specific Development with Visual Studio DSL Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.