Domain-specific language
A domain-specific language is a specialized language, notation, or terminology tailored to express concepts and tasks within a particular subject domain.
Building User-Friendly DSLs
A domain-specific language is a programming language designed for expressing concepts and operations within a particular application domain.
- How it is used
- Positions DSLs as precise, editable specifications through which domain experts define software behavior.
- How deep it goes
- Develops DSL implementation through structure, projectional editing, generation, constraints, types, and evolution; defers textual parsing and internal DSLs.
- Examples
- Uses car-rental pricing rules, record types, attributes, and a customer price-quote app as running artifacts.
- What you can do after
- Build it from scratch: implement a Domain IDE that lets experts author DSL content and generates a Runtime.
Read how Building User-Friendly DSLs explains domain-specific language →
Write Powerful Rust Macros
A domain-specific language is a language designed to express concepts and operations within a particular application domain.
- How it is used
- Uses macros to express domain operations more readably while hiding validation and implementation details.
- How deep it goes
- Works through a declarative account-transfer DSL and defers negative-account handling and full cloud-test implementation.
- Examples
- Demonstrates SQL, println!, format!, an Account exchange! macro, and declarative cloud infrastructure specifications.
- What you can do after
- Build it from scratch with declarative macro patterns that turn domain commands into Rust operations.
Read how Write Powerful Rust Macros explains domain-specific language →
Functional Design and Architecture: Examples in Haskell
A domain-specific language is a programming language designed for a particular application domain, including an embedded form hosted within another language.
- How it is used
- Decouples application scenarios from native infrastructure while exposing domain operations as functional interfaces.
- How deep it goes
- Develops embedded DSL design through domain modeling, ADTs, organization, and free-monad wrapping for sequential scripts.
- Examples
- Uses spacecraft temperature-control scripts and a sandwich-construction recipe to illustrate domain-language scenarios and operations.
- What you can do after
- Build it from scratch by modeling domain instructions with ADTs and wrapping sequential eDSL scripts in free monads.
Read how Functional Design and Architecture: Examples in Haskell explains domain-specific language →
Kotlin in Action, 2E
A domain-specific language is a language designed to express operations and configurations within a particular problem domain.
- How it is used
- Expresses domain operations and configuration as readable, statically typed Kotlin code.
- How deep it goes
- Defines DSLs, contrasts them with APIs, and explains grammar through nesting, chaining, and infix assertions.
- Examples
- Uses Ktor HTTP routes, Gradle dependencies, SQL, regular expressions, HTML builders, and Kotest matchers.
- What you can do after
- Build it from scratch by combining Kotlin syntax features into typed, structured APIs with domain-specific grammar.
Read how Kotlin in Action, 2E explains domain-specific language →
Learn Haskell by Example
A domain-specific language is a programming language specialized for a particular application domain or problem class.
- How it is used
- Builds a musician-facing notation for composing within a Haskell synthesizer program.
- How deep it goes
- Explains a worked embedded DSL through typed operators, fixity declarations, data structures, and interpretation.
- Examples
- Demonstrates music notes, sequencing, grouping, repetition operators, and a sample composed expression.
- What you can do after
- Build it from scratch as an embedded Haskell notation that constructs and interprets musical compositions.
Read how Learn Haskell by Example explains domain-specific language →
Quarkus in Action
A domain-specific language is a language designed to express operations within a particular problem domain.
- How it is used
- Uses Java-based DSLs to construct GraphQL requests and access Kubernetes or OpenShift APIs from Quarkus applications.
- How deep it goes
- Defines DSL usage and demonstrates representative calls, but defers detailed GraphQL and cloud-platform treatment.
- Examples
- Demonstrates a dynamic cars query and a filtered OpenShift pod listing.
- What you can do after
- Apply it via Quarkus clients to build GraphQL documents and query Kubernetes or OpenShift resources programmatically.
Read how Quarkus in Action explains domain-specific language →
Acing the CCNA Exam: Volume 2 Advanced Networking and Security
A domain-specific language is a computer language specialized for a particular application domain or purpose.
- How it is used
- Defines infrastructure for Terraform provisioning and management.
- How deep it goes
- Explains specialization, benefits, limitation, and declarative infrastructure use without detailing HCL syntax.
- Examples
- Uses HCL configuration, Terraform providers, and Puppet DSL as examples of specialized infrastructure languages.
- What you can do after
- Apply specialized languages through Terraform to define desired infrastructure states with less effort.
Tiny Python Projects: Learn coding and testing with puzzles and games
A domain-specific language is a language designed for expressing solutions within a particular problem domain.
- How it is used
- Uses regular expressions to describe text patterns while implementing vowel replacement.
- How deep it goes
- Defines DSLs through regular expressions and demonstrates character classes and substitution, without developing broader regex syntax.
- Examples
- Demonstrates '[aeiou]' and re.sub() to replace lowercase and uppercase vowels in sample text.
- What you can do after
- Apply it via Python's re module to describe character patterns and substitute matching text.
Grokking Web Application Security
A domain-specific language is a programming language tailored to expressing tasks and concepts within a particular problem domain.
- How it is used
- Uses compact expressions to let web-application users express domain tasks while preventing those expressions from becoming code-execution paths.
- How deep it goes
- Explains DSL purpose, expression scope, embedded-language evaluation, and parsing-based safeguards, but stops short of complete sandbox implementation.
- Examples
- Uses Google search operators, spreadsheet formulas, embedded Lua expressions, and Python integration as concrete DSL examples.
- What you can do after
- Build secure web-application DSLs by embedding Lua or parsing expressions before evaluation instead of dynamically executing untrusted input.
Read how Grokking Web Application Security explains domain-specific language →
Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform
A language designed to express concepts and operations within a particular application or problem domain.
- How it is used
- Expresses infrastructure resources in YAML or JSON while supporting linting, formatting, and automated validation.
- How deep it goes
- Defines DSL abstraction and demonstrates configuration testing, but does not explain DSL implementation internals.
- Examples
- Uses Terraform-compatible JSON, pytest tests, Terraform plans, CloudFormation YAML, and formatting or linting commands.
- What you can do after
- Apply it via Terraform or CloudFormation, then validate, format, lint, and unit-test configurations before deployment.
Related concepts
- internal DSLincludes · An internal DSL is a domain-specific language embedded in a host programming language and expressed using the host language’s syntax and features.
- Q#includes · Q# is Microsoft's domain-specific programming language for expressing quantum algorithms and operations.
- software languagekind of · An artificial language defined precisely through software, with a formal meaning, notation, and tools for writing and processing it.
- HashiCorp Configuration Languageincludes · HashiCorp Configuration Language (HCL) is a human-readable declarative language for expressing structured configuration, including infrastructure and service definitions.
- CSSincludes · CSS, or Cascading Style Sheets, is a stylesheet language for specifying the presentation and layout of structured documents and user interfaces.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









