Ontologies and Domain-Specific Modeling
A little while back a customer asked about the difference between DSM and ontologies, here's my opinion.
A Domain-Specific Modeling language has many things in common with an ontology: classes in a hierarchy, slots and rules about what values they can hold (including instances of other classes), and of course the ability to instantiate the resulting language/ontology. Creating a DSM language also has things in common with creating an ontology: domain analysis, bounding the domain, trade-offs between theoretical accuracy and practical usability, the importance of good names, etc.
However, ontologies and DSM languages differ in how and why they are used, at least for a stereotypical case:
Ontology | DSM | |
---|---|---|
Purpose: | Describing something that exists | Designing something that will be created (often automatically from the instance) |
Instantiation: | Only once, either globally or once by each user | Many times by each user, to create many different things |
Querying: | Often ask questions of the instances of an ontology, like querying a database | Rarely queried manually, but instead are often read by generators that produce programs |
Cf.: | XML schema and instance | Programming language grammar and programs |
Creation UI: | Tree view plus a property sheet; no possibility for manual layout |
Graphical diagram, matrix or table; layout made by creator of the instance |