The Modeling Language “M”

After a high level look at the “Oslo” platform in my last post I want to take a little deeper look into the new modeling language “M”. As I mentioned, M is a textual language to define sa model that is stored in the database. Just this fact is really exciting. Storing models in the database will make it much easier to version, to query, to change, and to work with them. In fact, we could think of scenarios where we can easily enable automated transformations of models from one meta-model to another by storing the changes made to the meta model. But this is another topic.

When I started working with “M”, I used the Intellipad. It is a great tool to get started. I am not sure how the tool would work out if the model description gets more complex, but at this point it is an awesome tool to do some prototyping.

image

The image above shows the Intellipad with a basic sample module called Northwind (aren’t I creative ;-)). It defines a type Address with Street, City, State, and ZIP code. You can lso see the the constraint put on the street name to be less than 128 characters. The city and state are defined as Text and the ZIPCode as Integer. Furthermore, the Street is defined as the unique identifier. All types that are reused need to define a unique identifier.

Next you can see a type employee defined, that reuses the address type. This is straight forward and doesn’t need much more explanation.

The last part of this code that I want to highlight is the type definition of MyEmployee and MyEmployee2. These types define more stringent requirements on the Name and ID than the base version of Employee.

Have fun playing around, and I will be back with more on “M” and “Oslo” soon…..