<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Metalevel</title>
	<atom:link href="http://pjmolina.com/metalevel/feed/" rel="self" type="application/rss+xml" />
	<link>http://pjmolina.com/metalevel</link>
	<description>Abstraction based levitation</description>
	<lastBuildDate>Sun, 07 Feb 2010 23:17:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Modelling with Essential</title>
		<link>http://pjmolina.com/metalevel/2010/02/modelling-with-essential/</link>
		<comments>http://pjmolina.com/metalevel/2010/02/modelling-with-essential/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 21:06:47 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=466</guid>
		<description><![CDATA[
After presenting the metamodel DSL, today is the turn for the modelling DSL.
As commented previously, Martin Thiede has a nice prototype called Concrete of a Web editor for model and metamodels. Such work and video also helps to understand the modelling and metamodelling duality.
Coming back to Essential, our tool is also providing a DSL to [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Benzene chemical model. CC-NA via Wikipedia" src="http://upload.wikimedia.org/wikipedia/commons/6/67/Benzene_structure.png" alt="" width="357" height="117" /></p>
<p>After presenting the <a title="Essential.Meta DSL" href="http://pjmolina.com/metalevel/2010/02/essential-meta-a-concise-dsl-for-metamodeling/">metamodel DSL</a>, today is the turn for the modelling DSL.</p>
<p>As commented previously, Martin Thiede has a nice prototype called <a title="Concrete" href="http://modeldrivensoftware.net/profiles/blogs/concrete-a-lightweight?xg_source=activity" target="_blank">Concrete</a> of a Web editor for model and metamodels. Such work and video also helps to understand the modelling and metamodelling duality.</p>
<p>Coming back to Essential, our tool is also providing a DSL to instantiate a metamodel. But a sample will probably be more illustrative:</p>
<p>Suppose the following simple metamodel:</p>
<pre class="brush:c-sharp;">namespace Core.Class
{
    class ClassModel
    {
        composition List&lt;Class&gt; Classes opposite Model;
    }
    class  Class
    {
        string Name;
        composition List&lt;Attribute&gt; Attributes;
    }
    class Attribute
    {
         string name;
         string Type;
    }
}</pre>
<p><img src="http://yuml.me/diagram/scale:90/class/[ClassModel]++1-Classes&gt;*[Class],%20[Class]++1-Attributes&gt;*[Attribute]" alt="" /></p>
<p>You could consider it as a very basic OO model. Intentionally I haven’t added too many details to keep it simple.</p>
<p>If you continue building it; adding operations, arguments, association support and more&#8230; at the end, you can have a metamodel comprising a full class diagram of UML, for example. The complexity of the metamodel you want to use is up to you. Having the control of the concepts inside the metamodel you can always add or remove features.</p>
<p>Modelling tools focused in UML, for example, provides this metamodel closed. You can’t change it, it’s a hard-wired standard and you are not allowed to change the core directly (only by extensions points like stereotypes and profiles).</p>
<h2>Modelling Language</h2>
<p>Now, let’s see how we can create <strong>a model</strong> using the previous metamodel:</p>
<pre class="brush:c-sharp;">using Core.Class;
namespace MyModel
{
    ClassModel  myClassModel
    {
        Classes = [Customer, Invoice];
    }
    Class Customer
    {
        Name = "Customer";
        Attributes = [Name, Surname];
    }
    Attribute Name
    {
        Name= "Name";
        Type= "string";
    }
    Attribute Surname
    {
        Name= "Name";
        Type= "string";
    }
    Class Invoice
    {
        Name = "Invoice";
        Attributes = [
            Attribute Amount
            {
                Name= "Amount";
                Type= "decimal";
            },
            Attribute InvoiceDate
            {
                Name= "InvoiceDate";
                Type= "date";
            }
        ];
     }
}</pre>
<p>In the sample, a basic declaration of two classes (Customer and Invoice) has been instantiated using the concept <strong>Class</strong> defined in the metamodel. Each metamodel concept is instantiated using it as you would be using a class in Java, C# or C++. Properties are assigned in the natural way one would expect in such languages.</p>
<p>As expected, the <strong>using</strong> operator imports the metamodel to be employed.</p>
<p>In the lines 26-37 you can see how properties can be also defined inline for list contexts.</p>
<p>Under the curtains, the tool is providing code completion, syntax colorization, error management and real-time parsing as you could expect from a modern IDE.</p>
<p>Essential uses DSL text for serialization but also XML can be derived. This XML document is conformant with an XSD derived from the corresponding metamodel.</p>
<h2>Intended usage</h2>
<p>Consider now, a basic DB metamodel:</p>
<pre class="brush:c-sharp;">namespace Meta.Database
{
    class Schema
    {
		string Name;
		composition List&lt;Table&gt; Tables;
    }
    class Table
    {
		string Name;
		composition List&lt;Column&gt; Columns;
    }
    class Column
    {
		string Name;
		string SqlType;
    }
}</pre>
<p><img src="http://yuml.me/diagram/scale:90/class/[Schema]+1-Tables&gt;*[Table], [Table]++1-Columns&gt;*[Column]." alt="" /></p>
<p>With this base in mind, you can define a business model containing (Customers, Invoices, etc.) based on a class metamodel and then, look for ways to transform your class model in, for example, a DB model representation. This is called, a M2M transformation (<em>Model to Model</em>). Essential will provide specialized languages to do that.</p>
<p>After that, your derived DB model can again be generated to final code, for example SQL DDL scripts in a given certain dialect. This is generally called a M2T transformation (<em>Model to Text</em>) and again Essential provides tools to describe the transformations.</p>
<p>Basically, to complete all this stuff, we need to introduce two more specialized languages: one for applying transformations, and another one for templates to be converted to final text.</p>
<p>I will focus on templates side on the next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/02/modelling-with-essential/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concrete: a Web modeling editor</title>
		<link>http://pjmolina.com/metalevel/2010/02/concrete-a-web-modeling-editor/</link>
		<comments>http://pjmolina.com/metalevel/2010/02/concrete-a-web-modeling-editor/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 19:47:11 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[web editor]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=462</guid>
		<description><![CDATA[Martin Thiede has released a video-demo about his last project: Concrete.
It is an original web based meta-model and model editor.
Take a look on it, it makes worthy!
]]></description>
			<content:encoded><![CDATA[<p><a title="Martin Thiede" href="http://www.modeldrivensoftware.net/profile/MartinThiede" target="_blank">Martin Thiede</a> has released a <a title="Concrete" href="http://modeldrivensoftware.net/profiles/blogs/concrete-a-lightweight?xg_source=activity" target="_blank">video-demo</a> about his last project: <a title="Concrete Project" href="http://github.com/mthiede/concrete">Concrete</a>.</p>
<p>It is an original web based meta-model and model editor.</p>
<p>Take a look on it, it makes worthy!</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/02/concrete-a-web-modeling-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential namespace collision</title>
		<link>http://pjmolina.com/metalevel/2010/02/essential-namespace-collision/</link>
		<comments>http://pjmolina.com/metalevel/2010/02/essential-namespace-collision/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 23:47:09 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=450</guid>
		<description><![CDATA[Surfing the Web, I just found this Essential Project. At the same time, I&#8217;m working in an MDD tool called Essential.
The first one is related to Enterprise Architecture. The second one is a tool for applying MDD. Both projects are not related in any way. But it&#8217;s curious how we collide choosing the same name.
I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/popilop/331357312/sizes/m/"><img class="alignright" style="margin-left: 15px;" title="Do not duplicate. By Sam UL via flickr.com" src="http://farm1.static.flickr.com/128/331357312_893ef9e791_m.jpg" alt="" width="240" height="180" /></a>Surfing the Web, I just found this<a title="Essential Project (EA)" href="http://www.enterprise-architecture.org/about" target="_blank"> Essential Project</a>. At the same time, I&#8217;m working in an MDD tool called <a title="Essential MDD" href="http://pjmolina.com/metalevel/essential/">Essential</a>.</p>
<p>The first one is related to Enterprise Architecture. The second one is a tool for applying MDD. Both projects are not related in any way. But it&#8217;s curious how we collide choosing the same name.</p>
<p>I don&#8217;t want to confuse people and fortunately the name is not the key part of our work. So, probably, a rename for our side (as the newcomers) would be gentle an a good choice. I&#8217;m open to suggestions for a new name. <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/02/essential-namespace-collision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential.Meta: A concise DSL for metamodeling</title>
		<link>http://pjmolina.com/metalevel/2010/02/essential-meta-a-concise-dsl-for-metamodeling/</link>
		<comments>http://pjmolina.com/metalevel/2010/02/essential-meta-a-concise-dsl-for-metamodeling/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 22:05:07 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[metamodeling]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=432</guid>
		<description><![CDATA[
In my previous post, I introduced Essential, a custom-developed tool for doing Model Driven Development.
As promised, in this post I will describe the primitives of the first language of the tool: Essential.Meta. This meta-language is helpful to describe the structural aspects of a metamodel.
The input requirements for the language are:

Usable for meta-structure description
Human readable/maintainable
Concise as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/ifovea/222773226/sizes/l/in/set-72157594257593068/"><img class="aligncenter" title="L'umbracle, Valencia. Photo by iFovea under CC license." src="http://farm1.static.flickr.com/61/222773226_668c065d2b.jpg" alt="L'umbracle, Valencia, from the Collection: Life on Mars? By iFovea via flickr.com" width="500" height="333" /></a></p>
<p>In my <a title="Searching for the essential building bricks of MDD" href="http://pjmolina.com/metalevel/2010/01/searching-for-the-essential-building-bricks-of-mdd/">previous post</a>, I introduced <a title="Essential" href="http://pjmolina.com/metalevel/essential/">Essential</a>, a custom-developed tool for doing Model Driven Development.</p>
<p>As promised, in this post I will describe the primitives of the first language of the tool: <strong>Essential.Meta</strong>. This meta-language is helpful to describe the structural aspects of a metamodel.</p>
<p>The input requirements for the language are:</p>
<ol>
<li>Usable for meta-structure description</li>
<li>Human readable/maintainable</li>
<li>Concise as possible</li>
<li>Easy to understand</li>
<li>Object oriented</li>
<li>Technology agnostic</li>
<li>Textual</li>
<li>Extensible</li>
<li>Scalable</li>
<li>Reusable definitions</li>
</ol>
<p>Ok, that was the initial wish list. Now, let’s review how we can cope with it and show a short example of how it looks like:</p>
<pre class="brush:c-sharp;">namespace Meta.TownModel
{
    enum Sex  {  Male, Female }

    class Town
    {
        string Name;
        List&lt;Person&gt; Habitants;
        composition List&lt;House&gt; Houses;
    }

    class Person
    {
        string Name;
        string? MiddleName;
        string Surname;
        Sex Sex;
        int? Age;
        List&lt;Person&gt; Children;
        House Home;
    }

    class House
    {
        string Address;
        composition List&lt;Room&gt;0..* Rooms opposite 1..1 House;
    }

    class Room
    {
        string Name;
        decimal? Dimensions;   //In square meters
    }
}</pre>
<p>The sample describes a meta-model for describing a town, with its buildings (houses) and inhabitants (persons). Nothing complex, nothing weird if assuming I am using a C/C++/Java/C# syntax and this doesn’t suppose a problem for you. I selected a C-like syntax instead a Pascal or VB flavour due to its less verbosity and a probably biased to what we used get to.</p>
<p>The namespace defines a scope for naming. All of our definitions are enclosed in a namespace. Therefore names of concepts should not collide inside a namespace. Same names are allowed in different namespaces.</p>
<p>As you can see, the main concepts in this language are classes and enumerations.</p>
<p>Enumerations define closed sets of named values helpful to describe domains. Classes on the other hand, have the classical meaning and properties or attributes can be defined for each class.</p>
<p>As usual in object languages each property has a type that could be primitive, an enum, a class type or a composed type.</p>
<p>The primitive data types supported are: string, bool, int, long, decimal, char, date, time &amp; datetime. That should be more than enough, for the moment.</p>
<p><em>A note to readers: data types here are <strong>platform neutral</strong>, they are not java string for example, neither a C# string. It was horrible for me to see in a lot of diagramming UML tools whose names I will not cite, early mapping types to implementation languages like java:string and similar things… I sure you understand me. Such feature could be nice if you are doing reverse engineering or documenting code (a bit late BTW). But definitely horrible to see when doing conceptual modelling and haven’t chosen yet the final implementation platform. </em></p>
<p>Another relevant feature of the language is the cardinality operators. Each property has a cardinality attached to it. Following a <strong><a title="Convention over Configuration" href="http://en.wikipedia.org/wiki/Convention_over_configuration">Convention over Configuration</a></strong> approach, simple properties like <code>string Name;</code> has an implicit cardinality <code>1..1</code>. You can also write to make it explicit in the language: <code>string 1..1 Name;</code></p>
<p>List of things, on the contrary has an implicit cardinality of <code>0..*</code> (zero to many). However you can further constraint it to <code>1..*</code> (compulsory multi-valued) or arbitrarily to any pair of minimal and maximal values <code>List&lt;Holes&gt; 18..24 GolfCampHoles;</code></p>
<p>The next feature to review is the <code>composition </code>keyword. A composition indicates that the property can’t exist alone, without its container. If the container is destroyed, the composed children will disappear also. Containment should be unique for each object; it cannot be contained in two direct containers at the same time. However, transitive containment it’s allowed.</p>
<p>There are some times, when we will be interested not only in one side of the relation between two classes, but also in the others’ end. That’s the case of the Children property. How about reaching the parents? To express it, the language introduces the <code>opposite</code> keyword. In our small sample it can be fully expressed (cardinalities included) as:</p>
<p><code>List&lt;Person&gt;0..* Children opposite 0:2 Parents;</code></p>
<p>Make sense, isn&#8217;t it? A person can have 0 or many children and let’s say zero, one or two well known parents.</p>
<p>I am still considering if the keyword <code>List&lt;T&gt;</code> could be also removed from the language. One can argue that cardinalities can be more than enough to express the same. However, I am still considering including other composed ADTs (abstract data types) in the future like <code>Set&lt;T&gt;</code> or <code>Stack&lt;T&gt;</code> to cite some of them. So, doors are still open to reconsider it.</p>
<p>Another feature we wanted to add is extensibility: If you are using this metamodel but needs to extend it for your own needs, the language is prepared to allow it. Just add another definition like this in another file and you got it:</p>
<pre class="brush:c-sharp">namespace Meta.TownModel
{
    class Town
    {
        Person Mayor;
    }
    class Person
    {
        List&lt;Person&gt;0..* Friends opposite 0..* Friends;
    }
    class City : Town   //&lt;--Inheritance sample
    {
        //extra city properties…
    }
}</pre>
<p>Now, your town must have a mayor and persons can have friends!</p>
<p>The language allows <strong>partial definitions</strong> in the same or different files. If the namespace and class name matches, the properties of the Town class and Person class are extended by merging partial definitions.</p>
<p>From the cardinality point of view, <code>Friends</code> is a curious symmetric relation. It is a many-to-many relation but both ends  (the roles) are normally called <code>Friends</code> and not: <code>MyFriends</code> and <code>OthersGuysConsideringMeAFriend</code> but how knows! }:)</p>
<p>As briefly seen, this language is useful to impose rules over data. It constrains the objects/concepts we can describe and the allowed properties.</p>
<h1>Intended usage</h1>
<p>OK. Some of you are probably thinking: and what in hell it this useful for?</p>
<p>The mail goal is to use the language to describe the domain in which we are planning to apply MDD. With this description, we will describe the concepts, properties and relations of the problem domain we are interested in.</p>
<p>If you are really, really pragmatic, and the analysis and design of the domain for the joy of it doesn’t satisfy you, well, consider then that we can derive (manually or better 100% generated if you prefer) some other interesting and more earthly artefacts:</p>
<ol>
<li>UML class models (structure), XMI, etc.</li>
<li><a title="XML Schema" href="http://en.wikipedia.org/wiki/XML_Schema_(W3C)" target="_blank">XML Schema</a> (XSD),</li>
<li><a title="Sql Schema" href="http://en.wikipedia.org/wiki/SQL" target="_blank">SQL Schema</a> (relational tables to persist the data),</li>
<li>Classes in Java (<a title="POJO" href="http://es.wikipedia.org/wiki/Plain_Old_Java_Object" target="_blank">POJOs</a>), C# (<a title="POCO" href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object" target="_blank">POCOs</a>), or any other language implementing a pure <a title="Domain Model" href="http://en.wikipedia.org/wiki/Domain_model" target="_blank">Domain Model</a></li>
<li>XML de/serialization code to read/save XML documents been conformant with (2)</li>
<li>Data Access code (<a title="Data Access Object" href="http://es.wikipedia.org/wiki/Data_Access_Object" target="_blank">DAO</a>) to connect (3) with (4).</li>
<li>Maps to your favorite <a title="Object Relational Mapping" href="http://en.wikipedia.org/wiki/Object-relational_mapping" target="_blank">ORM</a> tool to connect again (3) &amp; (4)</li>
<li>Etcetera, see <a title="Domain Driven Design" href="http://en.wikipedia.org/wiki/Domain-driven_design" target="_blank">Domain Driven Design</a> and other approaches.</li>
</ol>
<p>That’s all for today! This was the first DSL implemented in Essential targeting metamodeling. For more details, a full reference of the Essential.Meta language is <a title="Essential.Meta full language reference" href="http://pjmolina.com/metalevel/essential/essential-metamodel-ds">described here</a>.</p>
<p>On the next post, we will talk about a second DSL in Essential: the model (object level) language used to instantiate the concepts we just have created.</p>
<p>Thanks for reading! And please share your thoughts about it!</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/02/essential-meta-a-concise-dsl-for-metamodeling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Searching for the essential building bricks of MDD</title>
		<link>http://pjmolina.com/metalevel/2010/01/searching-for-the-essential-building-bricks-of-mdd/</link>
		<comments>http://pjmolina.com/metalevel/2010/01/searching-for-the-essential-building-bricks-of-mdd/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:41:58 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=403</guid>
		<description><![CDATA[
A title like this could sound utopian and probably it is in the extreme, but at the same time provides two advantages:

a suggestive title brings more blogs readers  , and
these kind of Quests keep me active developing and testing my ideas about MDD.

Sorry for 1, the joke. But Let me explain 2 a little [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.flickr.com/photos/cybergabi/2967324927/"><img class="alignnone" title="Red Brick Wall. Photo by Cibergabi via Flickr.com" src="http://farm4.static.flickr.com/3239/2967324927_5d4016ef2c.jpg" alt="Red Brick Wall. Photo by Cibergabi via Flickr.com" width="500" height="332" /></a></p>
<p>A title like this could sound utopian and probably it is in the extreme, but at the same time provides two advantages:</p>
<ol>
<li>a suggestive title brings more blogs readers <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , and</li>
<li>these kind of Quests keep me active developing and testing my ideas about MDD.</li>
</ol>
<p>Sorry for 1, the joke. But Let me explain 2 a little further if you are interested:</p>
<p><a href="http://www.flickr.com/photos/cybergabi/2967324927/"></a></p>
<p>Some months ago, I started to develop a new tool for doing Model Driven Development. I always start new developments with contained expectatives. I consider most of them throw away propotypes just to test a new way of doing the same thing, but luckily, with less effort and better productivity. But when you found the way, you follow it again whenever you need it, isn’t it?</p>
<p>So, this time is one of those moments: I am quite happy with the results, and I will continue building on the top of it to make it grow.</p>
<p>Today (almost?) everyone agrees on code generation can make your life notably easier as long as you have:</p>
<ol>
<li>a stable domain,</li>
<li>a clear knowledge of your domain (domain expert) and,</li>
<li>tools: modelling editors, model checkers, and code generator adapted to your domain and your chosen target architecture and language.</li>
</ol>
<p>The trickiest one to get is, not surprisingly, the third one. And this issue: the quality and the applicability of the MDD tools is the main stopper when considering applying MDD for a software development project.</p>
<p>So, my motivation during years is not only to create code generators one more time, but do it in a way that it will be cheaper to obtain results in next projects. Therefore, reducing the requirements for the entry level will help the MDD adoption to gain speed.</p>
<p><em>Ok, wait a minute, are you reinventing the wheel again? Building another meta-code-generator?</em></p>
<p>Yes I know, there are very good and mature tools for doing MDD: such as EMF/GMF, XText, ATL, TextUml, Metacase, MS DSL Tools, etc.</p>
<p>However, guided by my intuition and the experiences in the domains I have worked in, I have a strong opinion on of how some things should be done and for the moment I didn’t found the perfect tool to satisfy my needs.</p>
<p>But, instead of complain, I decided to take to the action and add my two cents implementing my view about MDD tool support: taking the good ideas of the standards available and reinventing the parts that don’t fit.</p>
<h2>The tool</h2>
<p>After this introduction, the name of the tool is not going to surprise you. It is named <strong><a title="Essential " href="http://pjmolina.com/metalevel/essential/">Essential</a></strong>.</p>
<p>The goals of the project are following ones:</p>
<ul>
<li>to declaratively describe metamodels, models, templates, and transformations using textual DSLs</li>
<li>to provide a comfortable editor for each of these four pillars,</li>
<li>to provide model checkers to assure the integrity of the four, and</li>
<li>to build code generators and transformation interpreters to achieve the output we are looking for.</li>
</ul>
<p>In the next posts I will depict the DSLs used in Essential and some architectural choices. This will help us to discuss the essence of the problems found in MDD.</p>
<p>I want to thanks Javier Hernandez for his constant help, good discussions and counterpoints about choosing design alternatives for Essential. And also to <a title="Niko's Mini Factory Blog" href="http://nikofactory.blogspot.com/" target="_blank">Nicolas Cornaglia</a> and Ángel Marín for their active beta testing as early adopters and providing good test fields.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/01/searching-for-the-essential-building-bricks-of-mdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forward engineering with MDD: A proof of concept</title>
		<link>http://pjmolina.com/metalevel/2009/12/forward-engineering-with-mdd-a-proof-of-concept/</link>
		<comments>http://pjmolina.com/metalevel/2009/12/forward-engineering-with-mdd-a-proof-of-concept/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 00:11:03 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=382</guid>
		<description><![CDATA[Hello everybody!
I want to share with you a set of videos to show what I understand when talking about Forward Engineering applied to MDD.
First of all, a legal disclaimer: my apologies for the quality of the videos and for my rusty English: I am starting to play with video editing tools and recording software so [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody!</p>
<p>I want to share with you a set of videos to show what I understand when talking about <strong>Forward Engineering</strong> applied to <strong>MDD</strong>.</p>
<p>First of all, a legal disclaimer: <em>my apologies for the quality of the videos and for my rusty English: I am starting to play with video editing tools and recording software so I expect to improve my recording and editing skills on the way. Anyway, I found (I hope) they have enough quality to explain the main ideas. So seeing it is totally up to you! You have been warned!  <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p><em>Also note: see the videos in High Quality mode (HQ) in Youtube. Otherwise, details of the samples probably will not be visible.</em></p>
<p>In a <a title="Scaling MDD for production" href="http://pjmolina.com/metalevel/2009/06/scaling-mdd-for-production/" target="_blank">previous post</a> I introduced a sample of the code that can be generated from a very basic conceptual model. I have created three videos to show you the main steps involved.</p>
<ol>
<li><strong>Modeling (<a title="Forward engineering with MDD: 1/3 Modeling" href="http://www.youtube.com/watch?v=T8seerYgHwc&amp;fmt=6" target="_blank">Video 1/3</a></strong><strong>)</strong>. The first video uses a minimalistic class model created inside Visual Studio 2005 with Microsoft DSL Tools. The sample creates a basic blog structure in less than 5 minutes. Note that in the specification there are no technological choices (neither the types are bind to a concrete language representation).
</li>
<li><strong>Code Generation (<a title="Forward engineering with MDD: 2/3 Code generation" href="http://www.youtube.com/watch?v=ZhUeYXsR7G8&amp;fmt=6" target="_blank">Video 2/3</a>)</strong>. A quick step: Selecting a code generation (selecting a target architecture), fixing the design choices offered by the code generation and pressing the red button: Generate! A full .NET Solution is generated in less than 5 seconds ready to compile.
</li>
<li><strong>A quick code review of the generated code (<a title="Forward engineering with MDD: 3/3 A quick review to the generated code" href="http://www.youtube.com/watch?v=o-md-41irDA&amp;fmt=6" target="_blank">Video 3/3</a>)</strong>. Finally, I am sure you have curiosity to take a look to the output code, don’t you? This third video shows a walkthrough to show:
<ul>
<li>DB Scripts (table creation, foreign keys,  drop scripts)</li>
<li>Database creation</li>
<li>Logic layer: POCOs (Plain Old CLR objects), NHibernate mappings and a Business Service Layer with fully functional CRUD operations.</li>
</ul>
</li>
</ol>
<p>So this is it. It is a proof of concept of how fast and direct MDD tools can be starting from a minimalistic model.</p>
<p>When talking about using or buying modeling &amp; code generation products my advice is:</p>
<ul>
<li>Don’t use models just for documentation. They will be outdated soon or later. On the contrary, a living (generating) model is always in sync with its target application.</li>
<li>Don’t resign yourself to just using code generation of skeletons. As you just have seen the current technology allows you to generate much more.</li>
<li>Don’t be content if anyone try to sell you a model too close or tied in any way to a given target language. Today we have just generated C#, but tomorrow may be we prefer Ruby? Python?</li>
<li>Don’t resign yourself to use a tool married with a specific database. You know, technology changes faster that we usually expect.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2009/12/forward-engineering-with-mdd-a-proof-of-concept/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Conceptual Map for MDD</title>
		<link>http://pjmolina.com/metalevel/2009/11/conceptual-map-for-mdd/</link>
		<comments>http://pjmolina.com/metalevel/2009/11/conceptual-map-for-mdd/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 17:48:47 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[MDD]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=367</guid>
		<description><![CDATA[When talking about Model Driven Development (MDD), code generation and related technologies, the key terms, its meanings and usage could not be clear enough to the involved audience due to our different backgrounds and the use of overloaded terms in several specific jargons.
A good way to avoid such confusion is to make explicit a short [...]]]></description>
			<content:encoded><![CDATA[<p>When talking about <strong>Model Driven Development</strong> (MDD), code generation and related technologies, the key terms, its meanings and usage could not be clear enough to the involved audience due to our different backgrounds and the use of overloaded terms in several specific jargons.</p>
<p>A good way to avoid such confusion is to make explicit a short clear definition of the terms used.</p>
<p>Following this idea, today I want to share the Conceptual Map I traditionally use to explain the areas involved in code generation. This map helps me to explain how more complex interactions and natural dependences and properties arise in this domain. See embedded <a title="Conceptual Map for MDD" href="http://www.youtube.com/watch?v=JWgyyUqBcNI" target="_blank">video</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/JWgyyUqBcNI&amp;hl=es_ES&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/JWgyyUqBcNI&amp;hl=es_ES&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>We will start considering MDD using two orthogonal dimensions:</p>
<ul>
<li>Types/Classes vs Instances &amp;</li>
<li>Two levels of abstraction: Programs/code (technology dependent, concrete)  vs Models (technology independent, abstract).</li>
</ul>
<h2>Key concepts</h2>
<ol>
<li>Model: A description of the problem to be solved.</li>
<li>Metamodel: A type description for providing the modeling language.</li>
<li>Template: A pattern representation of the code you want to create.</li>
<li>Transformation: Application of an algorithm to transform one or more models in one o more outputs.</li>
<li>Output: Your target asset: source code, doc or models again.</li>
</ol>
<h2 style="font-size: 1.5em;">Additional concepts</h2>
<ul>
<li>Mappings = Template to Metamodel item bindings</li>
<li>Architecture Know How = Mappings + Templates (embedding best practices and patterns)</li>
<li>Business Know How  = Metamodel + Model</li>
<li>Model Checker = Validation of Model with respect to Metamodel</li>
<li>Generator = Transformation(Templates, Mappings, Model) &#8211;&gt; Output</li>
</ul>
<p>A pair of properties to mention.</p>
<p><strong>Stability:</strong></p>
<ol>
<li>Metamodel: Quite stable once developed.</li>
<li>Model: Stable till the business change (requirements change).</li>
<li>Template: Stable till not changing or evolving the technology (2-3 years cycle?).</li>
<li>Transformation: Impacted by technology or metamodel changes.</li>
<li>Output (Source code): Regenerated as needed. Discardable.</li>
</ol>
<p><strong>Dependences:</strong></p>
<ol>
<li>Metamodel: Not dependent of third parties.</li>
<li>Model: Altered if metamodel changes.</li>
<li>Template: Not dependent of third parties (just the technology).</li>
<li>Transformation: Impacted by template changes, mapping changes and  metamodel changes.</li>
<li>Output (Source code): Impacted by everything. Regeneration is a good property as seen before. But now is a necessity.</li>
</ol>
<p>Changes in the formers will cascade to the latter.</p>
<h2 style="font-size: 1.5em;">Strong Separation of Concerns &amp; skills</h2>
<p>Apart of the classical advantages provided by MDD approaches such as quality, productivity, time to market, &amp; technology independence; one of the good properties no so times recalled is the <strong>strong separation of skills </strong>that this method of software engineering provides:</p>
<ul>
<li><strong>Business </strong>analyst can concentrate efforts in using modeling editors to describe the business and provide feedback to enhance metamodels (when needed)</li>
<li>On the other side, Software Architects and <strong>technology </strong>gurus can concentrate in tuning the technical architecture to achieve the most performing implementations they can provide.</li>
</ul>
<p>One you achieve this stage, you can start thinking of reusing and evolving your business models and architectures <em>at speeds that most of traditional SW developers never seen before</em>.</p>
<p>There is one famous quote from Grady Booch saying:</p>
<blockquote><p><em>“The entire history of software engineering is one of rising levels of abstraction (abstraction is the primary way we as humans deal with complexity).&#8221;  <strong><a title="Grady Booch site" href="http://www.booch.com/architecture/index.jsp" target="_blank">Grady Booch</a></strong></em></p></blockquote>
<p>As many others, I think that MDD is the next step to adopt in such direction. When it will happen globally is just a question of achieving the critical mass:</p>
<ul>
<li>having good enough tools,</li>
<li>and having practitioners enough and success cases to prove the value in the “not so new” way of working.</li>
</ul>
<p>I&#8217;m optimistic about it. We are in the way and getting speed…</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2009/11/conceptual-map-for-mdd/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SOA and MDD with Oslo</title>
		<link>http://pjmolina.com/metalevel/2009/11/soa-and-mdd-with-oslo/</link>
		<comments>http://pjmolina.com/metalevel/2009/11/soa-and-mdd-with-oslo/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 11:49:24 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[MD SOA]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=330</guid>
		<description><![CDATA[In the issue #21 of the Microsoft Architecture Journal, Cesar de la Torre talks about implementing SOA using an MDD aproach supported with Oslo: Model Driven SOA with Oslo.
In the economic crisis scenario, some voices argues about the death of SOA (more, more and more) just even before few organizations has already started to adopt [...]]]></description>
			<content:encoded><![CDATA[<p>In the issue <a title="Issue #21, Microsoft Architecture Journal" href="http://msdn.microsoft.com/en-us/architecture/aa699437.aspx" target="_blank">#21</a> of the <a title="Microsoft Architecture Journal" href="http://msdn.microsoft.com/en-us/architecture/bb410935.aspx" target="_blank">Microsoft Architecture Journal</a>, <a title="Cesar de la Torre blog" href="http://blogs.msdn.com/cesardelatorre/default.aspx" target="_blank"><strong>Cesar de la Torre</strong></a> talks about implementing SOA using an MDD aproach supported with Oslo: <a title="Model Driven SOA with Oslo" href="http://msdn.microsoft.com/en-us/architecture/aa699436.aspx" target="_blank">Model Driven SOA with Oslo</a>.</p>
<p>In the economic crisis scenario, some voices argues about the <a title="SOA is dead" href="http://apsblog.burtongroup.com/2009/01/soa-is-dead-long-live-services.html" target="_blank">death of SOA</a> (<a title="InfoQ on SOA death" href="http://www.infoq.com/news/2009/01/is-soa-dead" target="_blank">more</a>, <a title="Kurt Cagle" href="http://broadcast.oreilly.com/2009/01/soa-is-dead-its-about-time.html" target="_blank">more</a> and <a title="Debate on SOA death" href="http://blogs.zdnet.com/service-oriented/?p=2023" target="_blank">more</a>) just even before few organizations has already started to adopt it.</p>
<p>However, the SOA approach has <a title="Defining SOA as an architectural style, IBM" href="http://www.ibm.com/developerworks/architecture/library/ar-soastyle/" target="_blank">valuable principles</a> for Enterprise Software organization for the long term maintenance, integration and minimizing the <a title="Total Cost of Ownership" href="http://en.wikipedia.org/wiki/Total_cost_of_ownership" target="_blank">TCO</a>.</p>
<p>Johan den Haan has a nice post about it: <a title="SOA is dead; long live Model-Driven SOA" href="http://www.theenterprisearchitect.eu/archive/2009/01/26/soa-is-dead-long-live-model-driven-soa" target="_blank">SOA is dead; long live Model-Driven SOA</a>.</p>
<p>As a supporter of MDD, <strong>I agree</strong> with Cesar and Johan, <strong>MD SOA</strong> could be a way to deliver the good principles behing SOA.</p>
<p>SOA is always a tough topic to explain for first time visitors. To help to introduce it I will link a superb presentation about it: <a title="Meet Mike..." href="http://www.slideshare.net/ehildebrandt/meet-mike-presentation" target="_blank">Meet mike&#8230;</a> (credits for <a title="Eduard Hildebrandt" href="http://www.slideshare.net/ehildebrandt" target="_blank">Eduard Hildebrandt</a>).</p>
<div class="wp-caption aligncenter" style="width: 471px"><img class="  " title="MDD with Oslo" src="http://i.msdn.microsoft.com/aa699437.a2f5(en-us,MSDN.10).png" alt="MDD with Oslo" width="461" height="300" /><p class="wp-caption-text">MDD with Oslo</p></div>
<p>On the other hand, as Cesar pointed, Microsoft Oslo project has/had (after the rebranding) potential to be a good platform for domain modelling with textual DSL (<em>MGrammar</em>) and visual DSL (<em>Quadrant</em>).</p>
<p>As commented in the previous posts, it&#8217;s a pity that for the moment modeling efforts at Microsoft has been focused too much into one particular tree &#8220;the SQL Server scope&#8221; and loose the full forest vision.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2009/11/soa-and-mdd-with-oslo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The end of the MDD promise in OSLO</title>
		<link>http://pjmolina.com/metalevel/2009/11/the-end-of-the-mdd-promise-in-oslo/</link>
		<comments>http://pjmolina.com/metalevel/2009/11/the-end-of-the-mdd-promise-in-oslo/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 22:26:39 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[oslo]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=356</guid>
		<description><![CDATA[Sadly, Microsoft OSLO has died!
Via Jorge Ubeda I received the bad news. Accordingly to Douglas Purdy&#8217;s post, Microsoft OSLO is going to be rebranded to SQL Server Modeling CTP.
The people in the MDD community using .NET technologies has put a strong believe in Microsoft promise of delivering a big step forward in MDD with the [...]]]></description>
			<content:encoded><![CDATA[<p>Sadly, Microsoft <strong>OSLO has died</strong>!</p>
<p>Via <a href="http://cuartageneracion.blogspot.com/2009/11/oslo-el-parto-de-los-montes.html" target="_blank">Jorge Ubeda</a> I received the bad news. Accordingly to <a href="http://www.douglaspurdy.com/2009/11/10/from-oslo-to-sql-server-modeling/" target="_blank">Douglas Purdy&#8217;s post</a>, <strong>Microsoft OSLO</strong> is going to be rebranded to <strong>SQL Server Modeling CTP</strong>.</p>
<p>The people in the MDD community using .NET technologies has put a strong believe in Microsoft promise of delivering a big step forward in MDD with the OSLO project. At least, that what Microsoft sell us in the first CTP.</p>
<p>Now, in its new reincarnation: the M language, Quadrant and the Repository will still provide value for the database colleagues, for sure. But for the MDD community, this time, Microsoft has lost totally the point. That is quite different respect to the initial selling proposition we all bought at <a href="http://www.modelsremixed.com/" target="_blank">www.modelsremixed.com</a> for example!</p>
<p>Model Driven Development is about increasing the level of abstraction, it is about technology and architecture independence. Tying the models with a database provides no help in achieving such objectives.</p>
<p>And what about MGrammar? It is a great tool for doing textual DSLs in the .NET environment. Any plans to support and improve it as a product or will end also tied to a database?</p>
<p>As Jorge points <a href="http://www.ebpml.org/blog/204.htm" target="_blank">JJ. Dubray</a> seems to be in the right path when anticipating the results.</p>
<p>It is a pity, a great opportunity to empower MDD with the right tools has been lost. Anyway, others tools will come and do the job instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2009/11/the-end-of-the-mdd-promise-in-oslo/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Code Generation 2010: Call for Speakers is open</title>
		<link>http://pjmolina.com/metalevel/2009/10/code-generation-2010-call-for-speakers-is-open/</link>
		<comments>http://pjmolina.com/metalevel/2009/10/code-generation-2010-call-for-speakers-is-open/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 19:35:08 +0000</pubDate>
		<dc:creator>pjmolina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=345</guid>
		<description><![CDATA[


The call for speakers of Code Generation 2010 is now open.


If you are a practitioner, researcher or a tool maker in the MDD arena this is your conference.
You have till January 15th 2010 to send your submission.


See you there!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codegeneration.net/cg2010/speak.php"><img class="alignleft" title="Code Generation 2010 Logo" src="http://www.codegeneration.net/cg2010/images/CG2010logo250x64.gif" alt="" width="250" height="64" /></a><br />
<br/><br/><br/></p>
<p>
The <a title="Call for speakers CG2010" href="http://www.codegeneration.net/cg2010/speak.php" target="_blank">call for speakers of Code Generation 2010</a> is now open.
</p>
<p>
If you are a practitioner, researcher or a tool maker in the MDD arena this is your conference.<br />
You have till January 15th 2010 to send your submission.
</p>
<p>
See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2009/10/code-generation-2010-call-for-speakers-is-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
