<?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 &#187; Code Generation</title>
	<atom:link href="http://pjmolina.com/metalevel/tag/code-generation/feed/" rel="self" type="application/rss+xml" />
	<link>http://pjmolina.com/metalevel</link>
	<description>Abstraction based levitation</description>
	<lastBuildDate>Tue, 17 Jan 2012 20:22:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>¡Hola Sevilla!</title>
		<link>http://pjmolina.com/metalevel/2012/01/hola-sevilla/</link>
		<comments>http://pjmolina.com/metalevel/2012/01/hola-sevilla/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 19:30:04 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[Icinetic]]></category>
		<category><![CDATA[Sevilla]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=767</guid>
		<description><![CDATA[&#160; Model Driven Development is one of my favourite research topics. That’s why when the Icinetic guys contacted and offer me to join them to work together I had few arguments to resist the temptation and enroll. Therefore, today I’m moving to Sevilla, in the south of Spain, to start a new phase of my life to [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 510px"><img title="Plaza de España, Sevilla" src="http://farm2.staticflickr.com/1351/5158639564_79ed587a54.jpg" alt="" width="500" height="327" /><p class="wp-caption-text">Plaza de España, Sevilla (By CCSA Tom Raftery)</p></div>
<p>&nbsp;</p>
<div>
<p><strong>Model Driven Development</strong> is one of my favourite research topics. That’s why when the <a href="http://www.icinetic.com/">Icinetic</a> guys contacted and offer me to join them to work together I had few arguments to resist the temptation and enroll.</p>
<p>Therefore, today I’m moving to <strong>Sevilla</strong>, in the south of Spain, to start a new phase of my life to work as the Chief Research Officer. Icinetic is an young MDD tool-maker and consultancy company.</p>
<p>I am quite excited to have the chance, the tools and the right team (both with the required business vision and the technical background) to focus on innovation and to create cool MDD &amp; code generation tools.</p>
<p>We are going to enjoy it, for sure!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2012/01/hola-sevilla/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Essential on Alt.Net Hispano</title>
		<link>http://pjmolina.com/metalevel/2011/07/essential-on-alt-net-hispano/</link>
		<comments>http://pjmolina.com/metalevel/2011/07/essential-on-alt-net-hispano/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 08:46:15 +0000</pubDate>
		<dc:creator>Pedro J. Molina</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=723</guid>
		<description><![CDATA[The Alt.NET Hispano group has published my VAN about Code generation with Essential. The recording was done in Spanish. La comunidad Alt.NET Hispano ha publicado la VAN (desconferencia) sobre Generación de código con Essential que tuvimos el pasado dia 11 de junio. Si estás interesado en MDD, generación de código y como aplicarlo con Essential, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Alt.NET Hispano" href="http://altnethispano.org">Alt.NET Hispano</a> group has published my VAN about <a title="Generación de Código con Essential" href="http://altnethispano.org/wiki/van-2010-05-28-generacion-de-codigo-con-essential.ashx">Code generation with Essential</a>. The recording was done in Spanish.</p>
<p>La comunidad Alt.NET Hispano ha publicado la VAN (desconferencia) sobre <a title="Generación de código con Essential" href="http://altnethispano.org/wiki/van-2010-05-28-generacion-de-codigo-con-essential.ashx">Generación de código con Essential</a> que tuvimos el pasado dia 11 de junio. Si estás interesado en MDD, generación de código y como aplicarlo con Essential, este video grabado para la comunidad en español es un buen punto de partida.</p>
<p>Mi agradecimiento a Alt.NET Hispano por el interés en la materia y la invitación a divulgarlo.</p>
<p><a title="Descarga directa: Essential Video" href="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/van-2011-06-11.flv?downloadOnly=true">Descarga directa del video</a> (562 Mb).</p>
<p>&nbsp;</p>
<p><span id="more-723"></span></p>
<p><object id="scPlayer" width="700" height="468" data="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/flvplayer.swf" type="application/x-shockwave-flash"><param name="movie" value="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/flvplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/FirstFrame.jpg&amp;containerwidth=800&amp;containerheight=468&amp;analytics=UA-21341284-1&amp;content=http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/van-2011-06-11.flv&amp;blurover=false" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/" />Unable to display content. Adobe Flash is required.</object></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2011/07/essential-on-alt-net-hispano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/van-2011-06-11.flv&amp;amp" length="589272873" type="video/x-flv" />
<enclosure url="http://content.screencast.com/users/AltNetHispano/folders/VAN/media/512cfc98-8e47-48a2-8781-a22bf3f40af9/van-2011-06-11.flv?downloadOnly=true" length="589272873" type="video/x-flv" />
		</item>
		<item>
		<title>Code Generation 2011: a personal review</title>
		<link>http://pjmolina.com/metalevel/2011/05/code-generation-2011-a-personal-review/</link>
		<comments>http://pjmolina.com/metalevel/2011/05/code-generation-2011-a-personal-review/#comments</comments>
		<pubDate>Tue, 31 May 2011 10:50:17 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[cg2011]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[language workbench]]></category>
		<category><![CDATA[lwc]]></category>
		<category><![CDATA[report]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=702</guid>
		<description><![CDATA[Once again, back home after the most exciting till date edition of the Code Generation conference in the latest years. The co-allocation of the Language Workbenches Competition has been a great incentive to attract all of us to join and present alternatives to a great challenge in the domain of modeling and code generation. In [...]]]></description>
			<content:encoded><![CDATA[<p>Once again, back home after the most exciting till date edition of the <a title="CG2011" href="http://www.codegeneration.net/cg2011/index.php">Code Generation conference</a> in the latest years. The co-allocation of the <a title="LWC2011" href="http://www.languageworkbenches.net/">Language Workbenches Competition</a> has been a great incentive to attract all of us to join and present alternatives to a great challenge in the domain of modeling and code generation.</p>
<p>In this long post, I want to share my personal view about these days, and for sure, take note it could be partial and subjective. So, be kind to review also the comments as seen by others like <a title="Johan LWC2011 review" href="http://www.theenterprisearchitect.eu/archive/2011/05/26/language-workbench-competition-2011">Johan den Haan</a>, <a title="Markus on LWC2011" href="http://voelterblog.blogspot.com/2011/05/language-workbench-competition-2011.html">Markus Völter</a>, <a title="Angelo LWC &amp; CG report" href="http://www.hulshout.nl/blog/2011/05/29/language-workbench-competition-2011-code-generation-2011/">Angelo Hulshout</a>, <a title="Marco on LWC2011 and CG2011" href="http://www.modeldrivenstar.org/2011/05/highlights-from-lwc-2011-language.html">Marco Bambrilla</a>, or <a title="About modeling workbenches" href="http://mariot-thoughts.blogspot.com/2011/05/about-modeling-workbenches.html">Mariot Chauvin</a> to cite a few and more expected to come. Find the majority of the pointers at the <a href="http://modeldrivensoftware.net/">http://modeldrivensoftware.net</a></p>
<p>In this edition, the conference has been deeply covered via twitter using <a title="CG2011" href="http://twitter.com/#!/search/%23cg2011">#cg2011</a> and <a title="LWC11" href="http://twitter.com/#!/search/%23lwc11">#lwc11</a></p>
<p>As expected, I will be only be able to comment about the sessions I personally have attended. Running three tracks in parallel always force us to choose one and miss two other great sessions.</p>
<p><span id="more-702"></span></p>
<h2>Day 0. The Language Workbenches Competition</h2>
<p>Ten tools were presented in a marathonian session exactly allocating 40 minutes per tool. The Angelo’s egg-timer was implacable: Whenever it rang reaching the agreed time, the speakers suddenly stopped talking unable to end a simple phrase.</p>
<p>The challenge was a competition without a winner or loser, mainly because there was no prize to win (may be next year a generous sponsor could change that). The main objective is to <strong>compare </strong>how different tools are able to complete a common problem facing modeling, model transformations and code generation to multiple platforms.</p>
<p>Johan den Haan has prepared a detailed report of the tools presented. <a title="Johan on LWC2011" href="http://www.theenterprisearchitect.eu/archive/2011/05/26/language-workbench-competition-2011">Take a look on it</a>.</p>
<p>From my side, I have created a <a title="LWC2011 feature matrix" href="https://spreadsheets.google.com/spreadsheet/ccc?key=0AoxxO-Frx5JsdFcwMGQtdzBjNzhfQUxZT1dJSWdtYXc&amp;hl=es">feature matrix</a> for comparing the different approaches stressing what I see as different in each tool. It is not complete: some information is missing and some other not yet contrasted so take it as a beta version to be improved.</p>
<p>With respect to my beloved tool <a title="Essential" href="pjmolina.com/essential">Essential</a>, I have to say that I received a very nice feedback from the audience. See a sample of the twitted comments:</p>
<p style="padding-left: 30px;"><strong>kthoms:</strong> @pmolinam Has a high voltage notebook &#8211; projector crashed on plugging in. Now let&#8217;s see how he could improvise the situation #lwc11</p>
<p style="padding-left: 30px;"><strong>stevekmcc</strong>:  @pmolinam Showing #Essential: major theme is separation of concerns, so opposite to Rascal #lwc11</p>
<p style="padding-left: 30px;"><strong>stevekmcc:</strong> #Essential looks very clean compared to other text or text-projection workbenches #lwc11</p>
<p style="padding-left: 30px;"><strong>delphinocons:</strong> RT @stevekmcc: #Essential looks very clean compared to other text or text-projection workbenches #lwc11 &lt;== I agree. Relaxing to the eyes.</p>
<p style="padding-left: 30px;"><strong>delphinocons:</strong> #lwc11 The Essential metamodel is smaller than EMFs, and a little larger than MetaEdit+&#8217;s</p>
<p style="padding-left: 30px;"><strong>meinte37:</strong> @pmolinam is the first to finish before the egg timer at #lwc11. That&#8217;s because he cuts down to the Essential-s <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="padding-left: 30px;"><strong>JohanDenHaan:</strong> @pmolinam nice presentation and demo, good mix of slides and demo. Great timing!</p>
<p style="text-align: center;"><img class="aligncenter" title="LWC 2011 family photo." src="http://i233.photobucket.com/albums/ee316/angelopa/DSC00667.jpg" alt="" width="500" /></p>
<p style="text-align: center;">&nbsp;</p>
<h2>Day 1. Code Generation 2011 starts</h2>
<p>I started the day giving an initial talk about <strong>Introduction to Model Driven Software Development</strong>.</p>
<div style="width:425px" id="__ss_8150087"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/pjmolina/introducing-mdsd" title="Introducing MDSD">Introducing MDSD</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8150087" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/pjmolina">Pedro J. Molina</a> </div>
</p></div>
<p>Later on, Obeo guys (Mariot Chauvin &amp; Stéphane Begaudeau) presented how to use Obeo Designer to create sensible graphical DSL tools on the top of the Eclipse framework. Obeo uses model interpretation over the EMF models to create in runtime GMF based editors.</p>
<p><strong>Panel: Build or Buy &#8211; who should develop and own your DSLs and generators?</strong></p>
<p>We played a nice game with the following roles:</p>
<ul>
<li>Juha-Pekka Tolvanen (MetaCase), the moderator</li>
<li>Jos Warmer (Independent) , the homegrow tool maker</li>
<li>Pedro J. Molina (Capgemini) , the consultant</li>
<li>Johan den Haan (Mendix), the tool vendor</li>
</ul>
<p>More soon than later, Andrew Watson and Markus Völter join with the rest of the audience in the discussion. Of course, there is not an easy answer to that question and depends a lot of the particular context and requiring thinking about, but not only on:</p>
<ul>
<li>the experience of the in-house developers with MDD</li>
<li>the level of criticality of the process for the business to be automated (core or non -core to business)</li>
<li>the existence of tools able to provide the requested features</li>
<li>the need to split the business process from the current technology</li>
</ul>
<p>&nbsp;</p>
<p><strong>Type Systems for DSLs.</strong></p>
<p>Markus Völter presented a nice library he has been creating to help with the type checking in expressions of DSLs. After a gentle introduction to type checking, he introduced three different approaches to the problem:</p>
<ul>
<li>recursive type-checkers,</li>
<li>union based (a la MPS) and</li>
<li>table driven (a declarative way of the first one).</li>
</ul>
<p>&nbsp;</p>
<h2>Day 2. Getting speed</h2>
<p><strong>Terrence Parr Keynote</strong> was one of the more awaited talks in the conference. Many of us use their tools on a daily basis like <a title="ANTLR" href="http://antlr.org/">ANTLR</a> and <a title="StringTemplate" href="http://stringtemplate.org/">StringTemplate</a>. So having him here is quite special. In his keynote titled “Why program by hand in five days what you can spend five years of your life automating?” he let us some pearls like the following ones highly twitteable:</p>
<ul>
<li>“XML is not for humans beings, just for machines.” (Donald Knuth, the father of TeX support this, and I am not going the one to contradict this)</li>
<li>“Programmers are lazy.” Yes, we are. We don’t like repetition of tasks, trivial or not, because we get bored, so we always try to automate things. And this is our main driver and source of fun.</li>
<li>“Automate the things more prone to human errors”. Automate the tedious work!</li>
<li>Running a test does not increase the quality of the code.</li>
</ul>
<p><strong> </strong></p>
<p><strong>MetaEdit+ Hands On</strong></p>
<p>MetaCase MetaEdit+ was of my pending tools to try from previous editions of CG. I had the tool, I had the chances but not the inline tutor to allow me to get advantage of the tool. Risto, Steven and Juha-Pekka did a great work in the “hands on” session been able to not to left away any of the practitioners. They have did this lots of time and they are good teaching it.</p>
<p>Definitely, the learning curve of MetaEdit is not big, but for sure, you need the initial proper training to get the grasp of the tool to start creating your own graphical DSLs. Been a tool implemented in Smalltalk and using a repository, MetaEdit provided an edition experience quite different to the ones more used to edit traditional files.</p>
<p><strong>Generating Graphical DSLs</strong></p>
<p>Marko Boger, one of the fathers of the Poseidon tool, presented his work about applying DSLs to describe graphical DSLs. The idea was well received, and later on in the local pub called The Castle Inn an informal Birds of a Feather session was settled to create the Spray project to join forces and create a common core DSLs to help in generating graphical DSLs.</p>
<p><strong>Modeling the UI</strong></p>
<p>To end the day I gave a talk about how we take in account to model the User Interface of a business application. The topic is important because the IU is not always pondered as it should be. The UI is the only aspect the user will see from any system we build. Approaches to modeling and code generation based in a pattern based approach were presented with the help of briefs live demos using Essential and Io tools.</p>
<div style="width:425px" id="__ss_8150041"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/pjmolina/modelling-the-user-interface" title="Modelling the User Interface">Modelling the User Interface</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8150041" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/pjmolina">Pedro J. Molina</a> </div>
</p></div>
<p><span style="font-size: 20px; font-weight: bold;">Day 3. Closing a great edition</span></p>
<p><strong>Ed Merks Keynote</strong></p>
<p>Ed is the leader of the<a title="EMF" href="http://www.eclipse.org/modeling/emf/"> Eclipse Modeling Framework</a> based in Montreal and now working also for Itemis. In his keynote he remarked some of the prejudices people use to have against code generation and (UML) modeling, leaving also some great quotes:</p>
<ul>
<li>“Resistance is futile: Best practices will be assimilated by code generators.”</li>
<li>“XMI sucks because XML sucks. XMI sucks for transitivity.”</li>
</ul>
<p>Ed talks reinforces my idea that, talking about software, Europeans are usually more instructed in the university in formal methods and theories where Americans uses to be quite more practical and take a more empirical approach to software engineering or computer science.</p>
<p>It is interesting to see that mostly all the participants in the LWC with the exception of Intentional are Europeans. Well, Charles Simony (the owner) and Mats Helander (the presenter) both from Intentional are also Europeans. So, there is no interest in Language Workbenches in other continents apart from Europe?</p>
<p><strong> </strong></p>
<p><strong>Goldfish Bowl: “Code Generation as a normal programming practice”</strong></p>
<p>Jos Warmer lead this session were all the interested participants shared thoughts about how to integrate code generation with traditional styles of development.</p>
<p>How to create a good template: Go to your best developers and tell them: “write this DAO code file as it were the last time in your life you are going to write it”. Then abstract it and you got it. If the further in time found a bug, they can always came back and fix the template also.</p>
<p><strong>Final panel: “Models, DSLs, Transformations: The Next 5 years”</strong></p>
<p>In the closing plenary session, future directions and incoming challenges were addresses by the panelist and the audience.</p>
<ul>
<li>Andrew Watson focused on resolving business problems instead of technological problems.</li>
<li>Jos Warmer encourages us to build better tools and better languages.</li>
<li>Johan den Haan pinpointed some incoming trends: Mobile, cloud, social, multi-core and poliglot languages.</li>
<li>Wim Bast commented about the need for parallelization and the best way to achieve it is to move to a more declarative DSLs allowing us to exploit the intrinsic parallelization in the execution of such algorithms. Wim pointed out also about the difficulty of making prediction about the future.</li>
</ul>
<p>So, I put my two cents remembering the genial quote of <a title="Alan Kay" href="http://en.wikipedia.org/wiki/Alan_Kay">Alan Kay</a>: “The best way to predict the future is to invent it”.</p>
<p>My position is that we have the tools, we have the knowledge… so, we should put all our efforts in improving the tools. Good tools will make MDD mainstream soon or later. So, I want to see it happening: let’s improve our tools now better sooner than later.</p>
<h2>Conclusions</h2>
<p>The <strong>LWC</strong> has been a great idea made real. Having the opportunity to compare solutions and styles of tools has been quite productive for all of us. All the participants were happy with the idea of repeating next year and the next edition is looking for the next challenge.</p>
<p><strong>Twitter</strong> this years has expanded the real-time conference far away that the walls of the College. Colleagues like Rui Curado, Xavier Seignard, Jordi Cabot, Angel J. Lopez or the AltNet Hispano group to cite a few I am aware were tracking the conference and taking part via twitter. This enriches the experience and makes it more participative.</p>
<p>Some tools, highly integrated with the Eclipse environment were suffering during the conference live demo failures. This is not an exception, but a warning signal that some task that should be easy are getting complex and complex when the number of dependencies to run a simple task is out of control. The <strong>friction level</strong> of these environments is definitely something to keep as low as possible. Model interpretation versus traditional code generation can be helpful also to reduce startup times and opening another instance of the same environment.</p>
<p>The new born project <strong><a title="Spray project" href="http://code.google.com/a/eclipselabs.org/p/spray/">Spray</a></strong> (as reported by <a title="Karsten on Spray" href="http://kthoms.wordpress.com/2011/05/30/spray-a-quick-way-to-create-graphiti/">Karsten</a>) can be quite helpful as a neutral DSL definition for describing graphical DSL in an technological agnostic way. The risk however is if it is too close to a certain technology stack like GMF or Graphiti it will only be used in such context. To my understanding, a Spray definition should be implementable also in Microsoft DSL Tools  to put a extreme counterpart.</p>
<p>If a contest for the novel tool of the year will have ever existed in CG, IMHO this year had been awarded to <strong>The Whole Plaftorm</strong> by Riccardo Solmi and Enrico Persiani. They have a nice and cool looking projectional tool that was deeply unknown to all of us. So, welcomed to the club!</p>
<p><strong>XML</strong> is definitely not for humans (Terrence Parr) and XMI sucks for XML transitivity (Ed Merks).</p>
<p>Finally <strong>Mark Dalgarno</strong> and <strong>his team</strong> were <strong>superb</strong> organizing all the logistics to make all of this possible. Thanks to everyone and see you there next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2011/05/code-generation-2011-a-personal-review/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>First public Essential 0.4.44 Beta!</title>
		<link>http://pjmolina.com/metalevel/2011/05/first-public-essential-beta/</link>
		<comments>http://pjmolina.com/metalevel/2011/05/first-public-essential-beta/#comments</comments>
		<pubDate>Wed, 11 May 2011 09:11:57 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[language workbench]]></category>
		<category><![CDATA[mdsd]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=681</guid>
		<description><![CDATA[The Code Generation 2011 conference and the Language Workbenches Competition 2011 Workshop are quite close in the calendar. I want to celebrate it with the MDD community sharing my work on Essential (a tool designed for acquiring speed with Model Driven Development). On 11th may 2011, version 0.4.44 has been released as the first public beta. Essential [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-left: 10px;" title="Essential Logo" src="/img/LogoEssential300px.png" alt="Essential Logo" width="180" height="99" /></p>
<p>The <a title="Code Generation 2011" href="http://www.codegeneration.net/cg2011/index.php">Code Generation 2011</a> conference and the <a title="LWC2011 Workshop" href="http://www.languageworkbenches.net/workshop.html">Language Workbenches Competition 2011 Workshop</a> are quite close in the calendar.</p>
<p>I want to celebrate it with the MDD community sharing my work on <strong><a title="Essential - MDD tool" href="http://pjmolina.com/metalevel/essential">Essential</a> </strong>(a tool designed for acquiring speed with Model Driven Development). On 11th may 2011, version 0.4.44 has been released as the<strong> first public beta</strong>.</p>
<p>Essential is a meta-modeling and code generation tool providing specific DSLs to define and consume:</p>
<ul>
<li>Metamodels</li>
<li>Models</li>
<li>Templates (using StringTemplate) &amp;</li>
<li>Transformations (Model2Text and Model2Model)</li>
</ul>
<div>With a strong emphasis on model interpretation, prototyping a code generation can be done in an agile way without the need of generating any infrastructure boilerplate or meta-editor plumbling accessories.</div>
<div>The main goals of the tools is to enable software architects to:</div>
<div>
<div>
<ul>
<li>Prototyping software directly from models in a unexpensive way</li>
<li>Evolve theirs software architectures as fast as possible experimenting with design choices</li>
<li>Benchmarking and comparing architectures</li>
<li>Code generation</li>
</ul>
</div>
</div>
<div>For all of you interested in, feel free to <a title="Essential evaluation version download" href="http://pjmolina.com/essential/download-eval/">try it</a>, enjoy and provide feedback.</div>
<p>Try it also with the sample projects created for the <a title="LWC2011 Essential sample models" href="http://code.google.com/p/lwc11-essential/downloads/list">LWC 2011 challenge</a>.</p>
<p><a title="Essential evaluation version download" href="http://pjmolina.com/essential/download-eval/"><img class="alignnone" title="Download Essential" src="/img/blue-box256.png" alt="" width="100" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2011/05/first-public-essential-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LWC2011 list of participants disclosed</title>
		<link>http://pjmolina.com/metalevel/2011/03/lwc2011-list-of-participants-disclosed/</link>
		<comments>http://pjmolina.com/metalevel/2011/03/lwc2011-list-of-participants-disclosed/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 21:31:59 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[language workbench]]></category>
		<category><![CDATA[lwc]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=667</guid>
		<description><![CDATA[Angelo Hulshout has disclosed the list of participants taking part in the first Language Workbenches Competition to be organized on May 24th, at Cambrigde, UK. Just before the Code Generation annual conference. Finally, I will also be there presenting Essential as a solution to the challenge. It&#8217;s a nice excuse to go there, just in case! Now [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="LWC11 - Essential" src="http://code.google.com/p/lwc11-essential/logo?cct=1298648794" alt="" width="153" height="47" />Angelo Hulshout has disclosed the <a title="LWC workshop" href="http://www.languageworkbenches.net/workshop.html" target="_blank">list of participants</a> taking part in the first <strong>Language Workbenches Competition</strong> to be organized on May 24th, at Cambrigde, UK. Just before the <a title="CG2011" href="http://www.codegeneration.net/cg2011/index.php" target="_blank">Code Generation annual conference</a>.</p>
<p>Finally, I will also be there presenting <a title="Essential" href="http://pjmolina.com/metalevel/essential/" target="_blank">Essential</a> as a solution to the challenge. It&#8217;s a nice excuse to go there, just in case! <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now I can hear in the background the sound of knives being sharpened, nevertheless with an Olympic spirit. }:)</p>
<p>If you want to see the State of the Art of the next generation Software Engineering tools in action, don&#8217;t miss the opportunity and join us. See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2011/03/lwc2011-list-of-participants-disclosed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StringTemplate: a great template engine for code generation</title>
		<link>http://pjmolina.com/metalevel/2010/11/stringtemplate-a-great-template-engine-for-code-generation/</link>
		<comments>http://pjmolina.com/metalevel/2010/11/stringtemplate-a-great-template-engine-for-code-generation/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 00:34:34 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[cg2011]]></category>
		<category><![CDATA[stringtemplate]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=637</guid>
		<description><![CDATA[When building a new tool for modelling and code generation like Essential, one has to rethink again what template engine use to drive all the machinery. In code generation contexts, template engines are a good field for innovation and your choice will be with you probably for the full lifetime of your tool. In this [...]]]></description>
			<content:encoded><![CDATA[<div>
<p><img class="aligncenter" title="Paper Templates, licensed CC Attribution by Edinburgh City of Print" src="http://farm3.static.flickr.com/2581/4203670446_ef6f914933.jpg" alt="Paper Templates, licensed CC Attribution by Edinburgh City of Print" width="500" height="213" /></p>
<p>When building a new tool for modelling and code generation like <a title="Essential / MDD tool" href="http://pjmolina.com/metalevel/essential/" target="_blank">Essential</a>, one has to rethink again what template engine use to drive all the machinery. In code generation contexts, template engines are a good field for innovation and your choice will be with you probably for the full lifetime of your tool.</p>
<p>In this post, I will try to introduce and explain why <a title="StringTemplate" href="http://www.stringtemplate.org/" target="_blank">StringTemplate</a> is a superb engine for doing code generation and why you should consider it if dealing with a code generation scenario.<span id="more-637"></span></p>
<p>As commented before in <a title="Selecting a template engine for code generation" href="http://pjmolina.com/metalevel/2009/06/choosing-a-template-engine-for-code-generation/" target="_blank">other post</a>, I felt in love with StringTemplate in 2005 when I discovered <a title="ANTLR" href="http://www.antlr.org/" target="_blank">ANTLR</a> and StringTemplate during the development of a MDD workbench for a customer. Prior to that date, I had tested many template engines and also developed on my own a pair of them. For one reason or another, I was not comfortable with the language, the coupling of the template with the transformation control, or the maintainability of the templates in the long term. As the time goes by, this last point arises as crucial to maintain and evolve your architecture.</p>
<p>Therefore, one could say that I am being quite loyal to StringTemplate for the last 5 years, and that too much for technology, moreover, for a product software. And such loyalty is definitely not my merit for not been promiscuous in this issue, but a merit of StringTemplate: I’m still looking for new ways for improvement and didn’t find one better to my needs. (<em>Note: this is probably the best compliment I never paid to a piece of good software.</em>)</p>
<p>Some products shine thanks to the many features they provides, StringTemplate sparkles for avoiding adding features in the wrong place. I will elaborate a bit more on that.</p>
<h2><span style="font-weight: normal;">MVC</span></h2>
<p><strong><a title="Model View Controller Pattern" href="http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller" target="_blank">Model View Controller</a></strong> is an old and good “classic” architectural pattern providing a solution to organize the pieces of a user interface. Originally proposed by <a title="Trygve Reenskaug" href="http://en.wikipedia.org/wiki/Trygve_Reenskaug" target="_blank">Trygve Reenskaug</a>, in Smalltalk in 1979. It has been lately again on fashion, especially in the building of web sites, multi-channel user interfaces and promoting UI testability thanks to the application of the principle of <a title="Separation of Concerns" href="http://en.wikipedia.org/wiki/Separation_of_concerns" target="_blank">Separation of Concerns</a> that the pattern provides.</p>
<p>There are many variants or dialects to MVC out there, but the simple one is enough to describe our scenario: code generation.</p>
<p>Code generation can be seen as a classic MVC domain with the three roles easily identifiable:</p>
<ul>
<li><strong>A model</strong>: the variable data in consideration, the metadata to be generated in this case.</li>
<li><strong>A view</strong>: the template with the form of the target language and providing holes or slots to be later being fill in (the output).</li>
<li>And the transformation <strong>controller</strong>: the piece in charge of selecting with model parts should be selected, combine and finally inserted in which template holes/slots to render the final and concrete view.</li>
</ul>
<p>The main problem with traditional template engines is that there are lots of template engines that mix the last two roles (for example all coming from web development in the flavour of JSP or  ASP variants). The view and the transformation controller are intermingled and this situation, in the long time, is not good. I found this strict separation of responsibilities crucial for the maintainability of the templates.</p>
<p>And StringTemplate does exactly that. It syntax and features, although could be strange for the first time, was carefully selected to not allow you to do control choices in the view. It allows to define templates, declare named holes (or slots) and an inline for-each and if statements.</p>
<p>Let’s review a basic sample of StringTemplate syntax:</p>
<pre class="brush:c-sharp;">group mail;

genMail(msg)::=&lt;&lt;
Mail: Subject $msg.Subject$
From: $msg.From:genAddress()$
To: $msg.To:genAddress(); separator=”, “$
&gt;&gt;

genAddress()::=&lt;&lt;$it.Name$ ($it.Email$)&gt;&gt;</pre>
<p>The sample contains two templates: one for a mail, and a second one for each address. Templates can have parameters explicit parameters like name, but also there is an implicit keyword (it) to reference the current iterating context.</p>
<p>Named holes or slots are defined are marked with $expression$ where expression is a constrained expression resolution of the model properties received.</p>
<p>In the sample, genAddress() template will be invoked to resolve the From and To properties. Assuming that <strong>From</strong> is a monovaluated property and that <strong>To</strong> is a list, the template iterates throw the collection received and evaluates the template for each item. Note the separator modifier used to describe how items should be rendered.</p>
<p>That’s all in the template, the view. It’s forbidden to compute any value inside the template. The idea is that only read operations are going to be done into the model to get the data needed to fill the template.</p>
<h2>How to consume the template?</h2>
<p>From the transformation side (the controller) consuming a template is something such straightforward as the following one:</p>
<pre class="brush:c-sharp;">//1. Select the template
StringTemplate tlp = group.InstanceOf(“genMail”);
//2. Set parameters
tlp.setAttribute(“msg”, message);
//3. Get the result
string result = tlp.ToString();</pre>
<p>It is frequent to find people complaining StringTemplate about not having enough freedom for example to call functions from the inside. But this is not a missing feature, this done on purpose to assure no side effects of such computations. The motto is; if you need to compute something, do it the transformation stage.</p>
<p>This only has covered a very basic intro to StringTemplate. If you are interested you can browse for more contents in the main documentation of StringTemplate.</p>
<p>Of course, <a title="Essential" href="http://pjmolina.com/metalevel/essential/" target="_blank">Essential</a> uses StringTemplate!</p>
<h2>ST &amp; ANTRL on Code Generation 2011</h2>
<p>By the way, the father of StringTemplate and the superb meta-compiler tool called ANTLR is <a title="Terrence Parr" href="http://www.antlr.org/wiki/display/~admin/Home" target="_blank">Terrence Parr</a>. He teaches compiler construction in the <a title="University of San Francisco" href="http://www.cs.usfca.edu/" target="_blank">University of San Francisco</a>.</p>
<p>I was planning to prepare this post for some months, but in the meanwhile, <a title="Mark Dalgarno's blog" href="http://blog.software-acumen.com/" target="_blank">Mark Dalgarno</a> (the main organizer of Code Generation Conferences) has surprises us announcing the next keynote for CG2011.</p>
<p>I am quite happy to see that, as announced by Mark, that in the next edition of <a title="Terrence Parr" href="http://www.codegeneration.net/cg2011/keynotes.php" target="_blank">Code Generation 2011 Terrence is going to be present as one of the invited keynotes</a>!</p>
<p>So, if you are interested in all of these topics, join us and meet Terrence on May 25-27, 2011 in Cambridge, UK on <a title="Code Generation 2011" href="http://www.codegeneration.net/cg2011/" target="_blank">Code Generation 2011</a>.</p>
<p><a title="Call for spekers" href="http://www.codegeneration.net/cg2011/speak.php" target="_blank">The call for speakers for CG2011</a> is open till January 15<sup>th</sup> 2011.</p>
<p><strong>To know more:</strong></p>
<ol>
<li><a title="Enforing String MV in template engines" href="http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf" target="_blank">Enforcing Strict Model-View Separation in Template Engines</a>, Terrence Parr</li>
<li><a title="StringTemplate" href="http://www.stringtemplate.org" target="_blank">StringTemplate</a></li>
<li><a title="ANTLR" href="http://www.antlr.org" target="_blank">ANTLR</a></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/11/stringtemplate-a-great-template-engine-for-code-generation/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Hello World with Essential, the video</title>
		<link>http://pjmolina.com/metalevel/2010/07/hello-world-with-essential/</link>
		<comments>http://pjmolina.com/metalevel/2010/07/hello-world-with-essential/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 15:19:47 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Essential]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[mde]]></category>
		<category><![CDATA[mdsd]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=612</guid>
		<description><![CDATA[The Hello World sample is a nice starting point to show the syntax and capabilities of every new language. This test is also useful for code generators and Domain Specific Languages (DSLs) also as a proof of concept. Following this honorable tradition, I have created a video showing the capabilities of Essential: the tool I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin-left: 10px;" title="Essential Logo" src="/img/LogoEssential300px.png" alt="Essential Logo" width="180" height="99" /></p>
<p>The <a title="Hello World" href="http://en.wikipedia.org/wiki/Hello_world_program" target="_blank">Hello World sample</a> is a nice starting point to show the syntax and capabilities of every new language. This test is also useful for code generators and Domain Specific Languages (DSLs) also as a proof of concept.</p>
<p>Following this honorable tradition, I have created a video showing the capabilities of <strong><a title="Essential" href="http://pjmolina.com/metalevel/essential/">Essential</a></strong>: the tool I am working on for doing agile Model Driven Development.</p>
<p>In this 10 minutes video you will get a general idea of the DSL the language provides to create:</p>
<ul>
<li>metamodels</li>
<li>models</li>
<li>templates</li>
<li>and control transformations</li>
</ul>
<p>In order to see the details, jump to Vimeo, activate the High Definition mode (HD) and set full screen (sorry embebed version is not good enough).</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="281" 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://vimeo.com/moogaloop.swf?clip_id=13587681&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="500" height="281" src="http://vimeo.com/moogaloop.swf?clip_id=13587681&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/13587681">Essential IDE &#8211; Hello World sample</a> from <a href="http://vimeo.com/user3817869">Pedro J. Molina</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>More info about it and 12 usage scenarios in the last Code Generation 2010 presentation about <a title="Tailored Code Generators" href="http://pjmolina.com/metalevel/2010/06/tailored-code-generators-at-cg2010/">Tailored Code Generators</a>.</p>
<p>Share your impressions!</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/07/hello-world-with-essential/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Language Workbench Competition 2011</title>
		<link>http://pjmolina.com/metalevel/2010/07/language-workbench-competition-2011/</link>
		<comments>http://pjmolina.com/metalevel/2010/07/language-workbench-competition-2011/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 20:02:45 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[language workbench]]></category>
		<category><![CDATA[lwc2011]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=617</guid>
		<description><![CDATA[Language Workbenches, as defined originally by Martin Fowler, are tools aiming to cope with DSL creation and code generation to increase the level of abstraction of software development. Currently, the main efforts on MDD, MDE, MDSD (model-driven-whatever you prefer&#8230;) are focused in the development of this kind of tools perceived as a hot research area for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Language Workbenches</strong>, as defined originally by <a href="http://martinfowler.com/articles/languageWorkbench.html" target="_blank">Martin Fowler</a>, are tools aiming to cope with DSL creation and code generation to increase the level of abstraction of software development.</p>
<p>Currently, the main efforts on MDD, MDE, MDSD (model-driven-<em>whatever you prefer</em>&#8230;) are focused in the development of this kind of tools perceived as a hot research area for Software Engineering.</p>
<p>In this scenarion, Cambridge, at <a title="Code Generation 2010" href="http://www.codegeneration.net/cg2010/index.php">Code Generation 2010</a> was the perfect place for sparkling the idea of promoting a contest to show and compare the advances of different language workbenches.</p>
<p>The <strong><a title="Language Workbench Competition 2011" href="http://www.languageworkbenches.net/" target="_blank">Language Workbench Competition</a></strong> born with the objective to serve as a point of comparison between different tools in this exciting and fast moving area.</p>
<p>The competition is now open to the public. So anyone interested can enroll and implement the <a title="LWC2011 Challenge" href="http://www.delphino-consultancy.nl/lwc/LWCTask-1.0.pdf" target="_blank">proposed challenge</a> just published.</p>
<p>On the other hand, if you want to know more about Language Workbenches, modeling and code generation add this <a title="Language Workbench Competition" href="http://www.languageworkbenches.net/">page</a> to you bookmarks and come back in few months to see some proposals.</p>
<p>The promoters of the idea are: <a title="Markus Völter" href="http://www.voelter.de/" target="_blank">Markus Völter</a>, <a title="Eelco Visser" href="http://blog.eelcovisser.net/" target="_blank">Eelco Visser</a>, <a title="Steven Kelly" href="http://www.metacase.com/blogs/stevek/blogView" target="_blank">Steven Kelly</a>, <a title="Angelo Hulshout" href="http://www.hulshout.nl/" target="_blank">Angelo Hulshout</a>, <a title="Jos Warmer" href="http://www.modeldrivensoftware.net/profile/JosWarmer" target="_blank">Jos Warmer</a>, <a title="Bernhard Merkle" href="http://www.modeldrivensoftware.net/profile/BernhardMerkle" target="_blank">Bernhard Merkle</a>, <a title="Karsten Thoms" href="http://kthoms.wordpress.com/" target="_blank">Karsten Thoms</a> and <a title="Pedro J. Molina" href="http://pjmolina.com/metalevel/about/" target="_blank">myself</a>.</p>
<p>So this a <em>call to arms</em> but with sportsmanship!</p>
<p><a title="Angelo Hulshout" href="http://www.hulshout.nl/?p=491" target="_blank">Angelo</a> and <a title="Markus Völter" href="http://voelterblog.blogspot.com/2010/07/language-workbench-competition-2011.html" target="_blank">Markus</a> has already started the calling.</p>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/07/language-workbench-competition-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing MDSD</title>
		<link>http://pjmolina.com/metalevel/2010/06/introducing-mdsd-in-cg2010/</link>
		<comments>http://pjmolina.com/metalevel/2010/06/introducing-mdsd-in-cg2010/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 07:51:09 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=595</guid>
		<description><![CDATA[My yesterday talk slides in Code Generation 2010 about Introducing Model Driven Software Development: CG2010 Introducing MDSD View more presentations from Pedro J. Molina.]]></description>
			<content:encoded><![CDATA[<p>My yesterday talk slides in <a title="Code Generation 2010" href="http://www.codegeneration.net/cg2010/index.php" target="_blank">Code Generation 2010</a> about <a title="Introducing MDSD" href="http://www.codegeneration.net/cg2010/sessioninfo.php?session=101" target="_blank">Introducing Model Driven Software Development</a>:</p>
<div id="__ss_4523046" style="width: 425px;"><strong><a title="CG2010 Introducing MDSD" href="http://www.slideshare.net/pjmolina/cg2010-introducing-mdsd">CG2010 Introducing MDSD</a></strong><object id="__sse4523046" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" 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://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cg2010introducingmdsd-100617020657-phpapp02&amp;rel=0&amp;stripped_title=cg2010-introducing-mdsd" /><param name="name" value="__sse4523046" /><param name="allowfullscreen" value="true" /><embed id="__sse4523046" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cg2010introducingmdsd-100617020657-phpapp02&amp;rel=0&amp;stripped_title=cg2010-introducing-mdsd" name="__sse4523046" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/pjmolina">Pedro J. Molina</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/06/introducing-mdsd-in-cg2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Balancing Variability &amp; Commonality</title>
		<link>http://pjmolina.com/metalevel/2010/03/balancing-variability-commonality/</link>
		<comments>http://pjmolina.com/metalevel/2010/03/balancing-variability-commonality/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:53:45 +0000</pubDate>
		<dc:creator>Pedro J. Molina</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Code Generation]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[MDD]]></category>
		<category><![CDATA[commonality]]></category>
		<category><![CDATA[metamodeling]]></category>
		<category><![CDATA[variability]]></category>

		<guid isPermaLink="false">http://pjmolina.com/metalevel/?p=532</guid>
		<description><![CDATA[When creating a DSL (Domain Specific Language) one of the most important choices is to decide about what items in your domain are going to be considered variable, changeable and which ones are going to be considered fixed, carved in stone. The former need to be specified in your DSL, in your design or may [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/pinksherbet/233228813/sizes/l/"><img class="aligncenter" title="Free Child Walking on White Round Spheres Balance CC via Pink Sherbet at Pink Sherbet." src="http://farm1.static.flickr.com/93/233228813_ae74d9ec1d.jpg" alt="" width="500" height="229" /></a></p>
<p>When creating a DSL (Domain Specific Language) one of the most important choices is to decide about what items in your domain are going to be considered variable, changeable and which ones are going to be considered fixed, carved in stone.</p>
<p>The former need to be specified in your DSL, in your design or may be coded. The latter are considered immutable and will remain static for all your derived applications for ages.</p>
<p>Considering that everything is static it is obviously useless. On the contrary, considering every aspect variable drives to another no-end getting nothing tangible again as a result. Therefore, in the middle we will have to search for the virtue.</p>
<p>The main issue here is to study a domain and ponder between variable parts and fixed parts. It is not a trivial thing to do from the very beginning. Experience in DSL construction and specially, experience in the domain helps to train your smell, but there are not clear rules for it, nevertheless.</p>
<p>It is not only about knowing your requirements. It is about trying to predict how your requirements will change across time and what types of requirements have more likelihood and tendency to change.</p>
<h2>Adding variability</h2>
<p>A variable part could be, for example, the background color of your application. If so, you need to add syntax and semantics to your DSL to capture such property. Let’s say you can express somewhere in your specification:  <code>{ background-color = peach; }</code></p>
<p>We can select the peach color for app1, and may be ivory for app2.</p>
<p>However, nothing is for free and this freedom comes with the followings possible drawbacks:</p>
<ul>
<li>You need to increase the size of your language (DSL), editors, model checkers, compilers and code generation or interpreters.</li>
<li>Users have to provide a value for such property unless you have also provided a sensible default value in case of missing information.</li>
<li>Homogeneity across applications vanishes with respect to background-color. Now it’s a user choice (the one in control of the modeling tool).</li>
<li>Specs are more complex.</li>
</ul>
<h2>Adding commonality</h2>
<p>On the other hand, if you consider the background of your application should be always the same because you are following, for example, a user interface style guide then, the background color is a fixed issue. Its value is provided by design by a style guide, by an architect, or design choice and the user modeling has no control over it.</p>
<p>In this scenario, the DSL is smaller. No need to specify the background color, it is implicit, it is no included in the model/specification.</p>
<p>With this kind of choice, we are betting for standardization. A shared library, a runtime framework or an interpreter will take care of supplying the right color in the right moment.</p>
<ul>
<li>Users can not change the background color, specs are smaller.</li>
<li>Standardization is improved across applications.</li>
<li>User has no control on the feature.</li>
</ul>
<h2>But, what is the right choice?</h2>
<p>It depends. There is no right choice with the information given till the moment. To answer the question we need to consider if the background color is a fundamental feature in our domain and it is needed to be different from application to application or may be, on the contrary, the color should be used in an homogeneous way following a predefined style guide.</p>
<p>Again, the domain imposes the rules to follow. Studding the domain and its variability is crucial to create a consistent DSLs focused in gathering the key features of the domain in a model: <strong>the important and variable ones</strong>. The important and fixed ones must be also identified but they shouldn’t be included into the model, but into the framework or the runtime.</p>
<h2>Standards, policy assurance, compliance</h2>
<p>Everything related to standard procedures, compliance and in-house stile guidelines are first-class candidates for standardization. If done in that way, your developers will not have to remember all that weird standard and compliance rules when developing a specific artifact.</p>
<p>A code generator will provide the right value for them. It will do it silently, without errors neither oversights. All the boring code dedicated to plumbing applications like: naming guidelines, service publication, serialization, persistence, adapters, proxies, skeletons, stubs, DAO code are driven by strict standards and best practices and are natural candidates for strong automation by code generators.</p>
<p>Moreover, if the regulation or the standard changes, the change will have impact in the following assets:</p>
<ul>
<li>a single change to a framework will be enough</li>
<li>or a change to a code generator and then forcing a regeneration process and redeploy.</li>
</ul>
<p>In both cases, it is cheaper that manually reviewing a set of in-production applications.</p>
<p>For example, think about replacing your data-layer access code from a DAO pattern and SQL to an ORM based approach like Hibernate.</p>
<h2>Business Know-How</h2>
<p>The core of the business Know-How is the important and the variable parts we are interested in to be collected in a specification. Such features need to be modeled, and if possible, abstracted from the technology that will implement it.</p>
<p>If we do it in this way, the model can survive the current technology.</p>
<p>Why we could be interested in do it in such a way?</p>
<p><strong>Just because technology evolves like fashion.</strong> Today everyone likes red T-shirts, tomorrow blue jeans will be sublime! Basic, Cobol, C, Java, C#, Ruby… what is the next language to use in 5 years time?</p>
<p>Use your best bet, whatever platform better fulfills your requirements, but I it could be nice to see the business process surviving the technology. <img src='http://pjmolina.com/metalevel/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   We don’t know in which direction, but technology will evolve, and will change for sure.</p>
<h2>Maintaining a language or a DSL</h2>
<p>When a DSL or a language needs a review you will be probably considering adding new features to the language.</p>
<p>Each new feature will increase the variability and increase the complexity of the language. Before deciding to add a new modeling feature make a cost/benefits analysis and double check that the valued added by the improvement is greater than the cost of implementing it.</p>
<p>I like to follow the golden rule proposed by <a title="Gordon S. Novak" href="http://userweb.cs.utexas.edu/users/novak/" target="_blank">Gordon S. Novak</a><strong> </strong>about automatic programming:</p>
<blockquote><p><em>“Automatic Programming is defined as the synthesis of a program from a specification. If automatic programming is to be useful, the specification must be smaller and easier to write than the program would be if written in a conventional programming language.”</em></p></blockquote>
<h2>Conclusion</h2>
<p>Whenever is possible:</p>
<ul>
<li><strong>Business Know-How</strong> should be captured by models, specs, DSLs.</li>
<li><strong>Technical Know-How</strong> should be captured by code generators, model interpreters, best practices and patterns.</li>
</ul>
<p>So, at the end of the day I like the following pair of quotes to sum up about what to include in a model:</p>
<ul>
<li>The Spanish writer <a title="Baltasar Gracián" href="http://en.wikipedia.org/wiki/Baltasar_Graci%C3%A1n" target="_blank">Baltasar Gracián</a> in the XVII century said <em>“Lo bueno si breve, dos veces bueno.”</em> (a literal translation from Spanish could be: <em>“Good things if brief, twice good.”</em>)</li>
<li>On the other side, <a title="Albert Einstein" href="http://en.wikipedia.org/wiki/Albert_Einstein" target="_blank">Albert Einstein</a> (XX century) counterpoints <em>“Things should be as simple as possible, but not simpler.”</em></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pjmolina.com/metalevel/2010/03/balancing-variability-commonality/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

