Patterns of Compositional Architecture: Domain Specific Languages
This is the second post in the Patterns of Compositional Architecture series that I mentioned in my introductory post.
Introduction
It’s important to note two things before I begin with this section: 1) I will not do the problem space of DSLs justice and 2) this is key to understanding how FubuMVC actually works. So, now that I’ve set myself up for success, let me see what I can do.
Through the course of this mini-series on Domain Specific Languages (DSLs), I will be focusing on Internal DSLs. More specifically, I will discuss patterns used for implementing these concepts in C#.
Note:
For further reading, I recommend Martin Fowler’s Domain Specific Languages book.
The Pattern
Define a programming API as a language with rich semantics, language features, and convention-driven operations.
Overview
This pattern is broken down into patterns of DSLs to accomplish our goal. Given the definition of this particular pattern, let’s break it down a little further:
- Semantic Models – The result of parsing the language
- Registries – The primary entry point into the language
- Conventions – Operations executed on the Semantic Model
- Wrapping it Up
Each of these concepts deserve their own post so that I can properly address each one. I will write a wrap up post afterwards to tie this all together.