Generator is a component in a language workbench that produces code or other artifacts based on a Domain Specific Language (DSL) definition. It's like a fancy template engine on steroids that can spit out anything from Java classes to HTML documentation, all while sipping a virtual latte.
"I just whipped up a new generator in my language workbench to convert our product catalog DSL into a React component. Now the marketing team can stop bugging me every time they want to change the font."
"Yo, did you see the new generator in MPS? It can take our trading algorithm DSL and generate both Java and Python code. Finally, we can stop arguing about which language is better and just use both!"
Language Workbenches: The Killer-App for Domain Specific Languages? by Martin Fowler dives into the purpose and benefits of generators in language workbenches. It covers topics like binding to different frameworks, exploring implementation trade-offs, and generating human-readable documentation. Read more here.
A Language Workbench in Action - MPS by Martin Fowler demonstrates how to use JetBrains's Meta-Programming System (MPS) to define a DSL and generate code. It showcases a sample code generation for posting rules and explains MPS's generator language. Check it out here.
Viaweb's First Business Plan by Paul Graham discusses the concept of network-based software and introduces Webgen, a system that generates catalogs and supports ordering. While not directly related to language workbenches, it highlights the importance of code generation in web-based applications. Take a look here.
Note: the Developer Dictionary is in Beta. Please direct feedback to skye@statsig.com.