DSL classification: a quick Domain Specific Language dictionary

I wrote a post some time ago on the classification of DSLs, that presented some dimensions of DSLs:

  • Focus of a DSL (vertical vs. horizontal)
  • Style of a DSL (declarative vs. imperative)
  • Notation of a DSL (graphical or textual)

But today (triggered by the discussions at Code Generation) I realized I overlooked a few obvious classification dimensions that are worth mentioning:

Internal DSL vs. External DSL
As defined by Marting Fowler in his blog, External DSLs have their own custom syntax, you can write a full parser to process them, and you write self-standing, independent models/programs using them
Internal DSLs instead consist in using a host language to give the host language the feel of a particular domain or objective, either by embedding pieces of a DSL in the host language or by providing abstractions, structures or functions upon it.

Interpreted DSL vs. compiled DSL 
(aka., model interpretation vs. code generation)
 This dimension has triggered a long debate in the MDD community. Model interpretation consists in reading and executing the DSL script at run-time one statement at a time, exactly as programming languages interpreters do.
Code generation instead consists into applying a complete model-to-text (M2T) transformation at deployment time, thus producing an executable application, as compilers do for programming languages.

If you want, you can suggest further classification dimensions you deem relevant for DSLs, your contributions is really appreciated.

To keep updated on my activities you can subscribe to the RSS feed of my blog or follow my twitter account (@MarcoBrambi).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s