A model is a representation of data or relevant knowledge. Structured models conforms to a pregiven set of rules called metamodel.
Essential provides a textual DSL for representing and editing models called: Essential.Model.
A quick introduction to its syntax follows:
using Sample.Metamodel; namespace Model1 { Project P1 { Name = "Plan 9"; Description = "Plan 9 from outer space"; Milestones = [M1, M2]; } Milestone M1 { Name="Project Launch"; Date="1/1/2009"; } Milestone M2 { Name="Project Conclusion"; Date="1/1/2015"; } }
The primitives of the Essential modeling language are described here:
Allows the importation of external namespaces. Such namespaces can provide types (metamodels) or objects/instances (models) for futher referencing and usage.
A namespace defines a naming scope where definitions like object instances can be created. Namespaces like UML packages, helps to organize the concepts when them increase in numbers.
Objects can be instanciated inside a namespace using the class name and providing a unique name to such intance for further referencing.
Inside objects, properties can take values accordingly to the defined type.
Objects references can be used as values when the property has the adecuate type.
For example: in the quick sample M1
and
M2
are used as references for the
Milestones properties with the expression Milestones = [M1, M2];
Inlining allows to create the object just in place. Example:
... Project P1 { Name = "Plan 9"; Description = "Plan 9 from outer space"; Milestones = [ Milestone M1 { Name="Project Launch"; Date="1/1/2009"; }, Milestone M2 { Name="Project Conclusion"; Date="1/1/2015"; } ]; } ...