<?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>Luminis Software Development</title>
	<atom:link href="http://lsd.luminis.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://lsd.luminis.eu</link>
	<description></description>
	<lastBuildDate>Sun, 03 Mar 2013 08:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>nl</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OSGi Configuration Admin command line client</title>
		<link>http://lsd.luminis.eu/osgi-configuration-admin-command-line-client/</link>
		<comments>http://lsd.luminis.eu/osgi-configuration-admin-command-line-client/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 20:52:42 +0000</pubDate>
		<dc:creator>Peter Doornbosch</dc:creator>
				<category><![CDATA[OSGi]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1838</guid>
		<description><![CDATA[OSGi Configuration Admin command line client restored
It has been lost for a long time, but i finally restored the Luminis OSGi Config Admin command line client!
I can here you think. &#8220;Restored? Lost? What was this guy doing?&#8221;
It&#8217;s a long story, and I don&#8217;t even know all the ugly details myself, but we (Luminis) used to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>OSGi Configuration Admin command line client restored</strong></p>
<p>It has been lost for a long time, but i finally restored the Luminis OSGi Config Admin <a href="https://bitbucket.org/pjtr/net.luminis.cmc">command line client</a>!</p>
<p>I can here you think. &#8220;Restored? Lost? What was this guy doing?&#8221;</p>
<p>It&#8217;s a long story, and I don&#8217;t even know all the ugly details myself, but we (Luminis) used to host our open source projects on a separate server, with all that nice Atlassian collaboration tools like Confluence and Jira. It was a hosted environment, so we didn&#8217;t have to manage anything. Well, that&#8217;s what we thought.</p>
<p>One of my favorite oneliners is: &#8220;the fact that the chances are low, doesn&#8217;t means it&#8217;s never happening&#8221;. How true. The server crashed and it turned out there was no backup. Oops, that hurts.</p>
<p>Of course, i&#8217;m lazy, so the latest source was still on my laptop. But only the latest. Not a big deal, but I hate losing history. Worse: i never checked-in the documentation, because I&#8217;d written it right into Confluence; after all, that&#8217;s what a wiki is for, right? You know the feeling when your word processor crashes and makes you lose work: yes, you can recreate it, but you always end up with the nasty feeling that the original version was better written. I hate that too.</p>
<p>It took me a few hours of digging the internet, but finally i found some traces of my docs in Google&#8217;s cache; enough to restore it quite easily. The source history is lost forever, but well, what the hack.</p>
<p>I swore this will never happen again, so i made two promises. </p>
<p>One: i&#8217;ll never use subversion again. I was already using Git now and then, but I never realized that having the whole repository on each system has more advantages than just speed and being able to work offline.<br />
Two: i&#8217;d better keep the documentation with the source.</p>
<p>You can find the source and the renewed docs on <a href="https://bitbucket.org/pjtr/net.luminis.cmc">bitbucket</a>. All in one git repository. Please clone it, so I&#8217;ll have one more backup when something terrible happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/osgi-configuration-admin-command-line-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Short Argument for Declarative Transformation Development</title>
		<link>http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/</link>
		<comments>http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 12:33:14 +0000</pubDate>
		<dc:creator>Andriy Levytskyy</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[benefit]]></category>
		<category><![CDATA[CHART]]></category>
		<category><![CDATA[CHARTER]]></category>
		<category><![CDATA[declarative]]></category>
		<category><![CDATA[definition]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[MDE]]></category>
		<category><![CDATA[modelling]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[RDT]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[transformation]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1822</guid>
		<description><![CDATA[Due to increasing use of domain specific languages (DSLs), declarative style of modeling is quetly spreading among users of MDE tools. Indeed, it is easy to find examples of declarative DSLs, e.g. at DSM Forums or this blog. There is however a group of users, among which the delarative style of modeling has not managed to spread - transformation developers. There are quite a few good reasons why one would consider using a declarative language for transformation definition. Today I would like to illustrate one of them: reduction of information content in transformation definitions (and hence higher productivity of transformation developers) due to use of a declarative language.]]></description>
			<content:encoded><![CDATA[<p><small>(cross-posted from <a href="http://blog.conceptworks.eu/" target="_blank">blog.conceptworks.eu</a>)</small></p>
<p>Due to increasing use of domain specific languages (DSLs), declarative style of modeling is quetly spreading among users of MDE tools. Indeed, it is easy to find examples of declarative DSLs, e.g. at <a href="http://www.dsmforum.org/cases.html" target="_blank">DSM Forums</a> or this blog. There is however a group of users, among which the delarative style of modeling has not managed to spread &#8211; <em>transformation developers</em>. I am not sure if it has something todo with the group itself or with the fact that the majority of today&#8217;s transformation definition languages (TDL) are still more imperative in style (I am aware of QVT Relations and <a href="http://www.eclipse.org/atl/" target="_blank">ATL</a>, but these are rather exceptions than the norm).</p>
<p>There are quite a few good reasons why one would consider using a declarative language for transformation definition: reduction of information content in transformation definitions (and hence higher productivity of transformation developers), more agile DSL evolution, transformation definitions as models, higher compatibility with parallel computing, etc..</p>
<p>Today I would like to share some practical results that illustrate reduction of information content due to use of a declarative language.</p>
<p><strong>CHART vs. Java</strong></p>
<p>The following examples are kindly provided by Maarten de Mol and Arend Rensink from <a href="http://www.utwente.nl/" target="_blank">University of Twente</a>. In <a href="http://charterproject.ning.com/" target="_blank">CHARTER project</a>, they are working on certifiable transformation technology for development of safety-critical embedded systems.</p>
<p>Before proceeding to the examples, here are a few relevant highlights of their technology:</p>
<ul>
<li>Partially declarative transformation definition language (CHART): based on graph transformation and intended to be useable by Java programmers.</li>
<li>Transformation compiler (RDT): given a transformation definition written in CHART, generates its executable implementation in Java. The produced code runs against and transforms user provided data.</li>
</ul>
<p>Figures in rows of the gallery present transformation rules <em>findRich</em> and <em>addPicture</em> respectively. Figures in columns show these rules written in CHART and Java. The important Java methods are match() and update(), which are the translations of the similarly named blocks in the CHARTER rules.</p>

<a href='http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/figure-1a-findrich_chart/' title='Figure 1: Rule findRich written in CHART'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2012/03/Figure-1a-findRich_CHART-150x150.png" class="attachment-thumbnail" alt="" title="Figure 1: Rule findRich written in CHART" /></a>
<a href='http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/figure-1b-findrich_java/' title='Figure 2: Rule findRich written in Java'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2012/03/Figure-1b-findRich_Java-150x150.png" class="attachment-thumbnail" alt="" title="Figure 2: Rule findRich written in Java" /></a>
<a href='http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/figure-2a-addpicture_chart/' title='Figure 3: Rule addPicture written in CHART'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2012/03/Figure-2a-addPicture_CHART-150x150.png" class="attachment-thumbnail" alt="" title="Figure 3: Rule addPicture written in CHART" /></a>
<a href='http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/figure-2b-addpicture_java/' title='Figure 4: Rule addPicture written in Java'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2012/03/Figure-2b-addPicture_Java-150x150.png" class="attachment-thumbnail" alt="" title="Figure 4: Rule addPicture written in Java" /></a>

<p><em>Figures 1-4: Rules findRich and addPicture written in CHART and Java</em></p>
<p>In Figure 1, a match block counts 10 LOC against 41 LOC in Java (Figure 2), which constitutes a reduction of information content by 75%. In Figure 3, an update block counts 12 LOC against 65 LOC in Java, an 80% reduction.</p>
<p>Both examples show significant reduction of information content in CHART rules. The reduction is even stronger if one takes into account that Java implementations also have to address technical concerns, which do not exist in CHART rules. In this case reduction is 92% (13 LOC vs. 160 LOC for rule <em>findRich</em>).</p>
<p>In experence of another CHARTER partner, who evaluates CHART/RDT in practice, a CHART transformation definition counted 1024 lines of code against 8000 in Java, an 87% reduction of information content [1]. Author&#8217;s own industrial experiences elsewhere with <a href="http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/" target="_blank">AToM3</a> GG rules (declarative) and QVT Operational (imperative) agree with the above results as well.</p>
<p>While exact reduction numbers are certainly arguable, the overal trend in the above experiences is that use of a declarative TDL can result in dramatic reduction of information content and manyfold increase of development productivity.</p>
<p><strong>Conclusion</strong></p>
<p>Despite industrial successes of MDE (which are often <a href="http://twitdoc.com/upload/jonathw/whittle-icse.pdf" target="_blank">hidden</a>), it is my experience that model-driven methods have hard times keeping up as organizations evolve. One factor behing this lag is slow speed of transformation development. Practical industrial experiences such as above, show that declarative languages have potential to significantly improve agility of transformation development.</p>
<p>What are your experiences with declarative TDLs and agile language development? Can you share concrete examples or provide references to declarative TDLs?</p>
<p><strong>References</strong></p>
<p>[1] de Mol, M.J. and Rensink, A. and Hunt, J.J. (2012) Graph Transforming Java Data. In: Proceedings of the 15th International Conference on Fundamental Approaches to Software Engineering (FASE 2012), 26-29 Mar 2012, Talinn, Estonia. Lecture Notes in Computer Science. Springer Verlag.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/a-short-argument-for-declarative-transformation-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Added value of MDE tools: a customer perspective</title>
		<link>http://lsd.luminis.eu/added-value-of-mde-tools-a-customer-perspective/</link>
		<comments>http://lsd.luminis.eu/added-value-of-mde-tools-a-customer-perspective/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 11:40:15 +0000</pubDate>
		<dc:creator>Andriy Levytskyy</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[benefit]]></category>
		<category><![CDATA[CHARTER]]></category>
		<category><![CDATA[customer]]></category>
		<category><![CDATA[mdd]]></category>
		<category><![CDATA[MDE]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[value]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1811</guid>
		<description><![CDATA[(cross-posted from blog.conceptworks.eu)
Recently I came across an interesting article by Jordi Cabot, in which he shares a tool vendor&#8217;s experience of high customer acquisition cost for MDD tools. In my opinion the main reason for this is that MDE is still not a mainstream methodology and hence benefits of MDD tools (and what it takes [...]]]></description>
			<content:encoded><![CDATA[<p><small>(cross-posted from <a href="http://blog.conceptworks.eu">blog.conceptworks.eu</a>)</small></p>
<p>Recently I came across an interesting article by Jordi Cabot, in which he shares a tool vendor&#8217;s experience of <a href="http://modeling-languages.com/very-high-customer-acquisition-cost-for-mdd-tools/" target="_blank">high customer acquisition cost for MDD tools</a>. In my opinion the main reason for this is that MDE is still not a mainstream methodology and hence benefits of MDD tools (and what it takes to reach those benefits) are often not clear to customers. This an issue I&#8217;ve had to deal with in all MDE-projects and currently in the CHARTER project, where Luminis is involved in <a href="http://lsd.luminis.eu/charter-surveillance-use-case-industrial-evaluation/" target="_blank">industrial evaluation of an MDE tool-chain</a>. In this post I would like to look at the problem from the customer perspective.</p>
<p><img class="aligncenter size-full wp-image-1813" title="Screen Shot 2012-02-26 at 12.22.53 PM" src="http://lsd.luminis.eu/wp-content/uploads/2012/02/Screen-Shot-2012-02-26-at-12.22.53-PM.png" alt="Screen Shot 2012-02-26 at 12.22.53 PM" width="449" height="410" /></p>
<p><em>Figure 1: Customer processes and MDE tools</em></p>
<p>Given a large number and diversity of MDE tools (actually too many, one may argue), it is impractical to list added value cited by their vendors. Moreover, added value is per definition subjective to customer&#8217;s opinion. Instead I would like to step back and place these tools in customer&#8217;s context. For this I will use a simple classification model that partitions all customer processes and tools supporting them in four quadrants (see the figure). There are two dimensions: uniqueness (core/context) and technology (problem/solution). Core represents unique processes that are specific to a customer, which is in contrast to generic processes in Context. Customer&#8217;s business processes are found in category Problem. Solution is reserved for IT or Engineering processes supporting the business processes.</p>
<p>The four quadrants in the figure help to reason about the value of customer processes and tools. The most important are the core quadrants as these define the customer itself. Depending on the type of the customer&#8217;s industry, critical processes are found either in the 1st (service-oriented) or the 3rd quadrant (product-oriented). The context quadrants have the least value. Here customers often seek to outsource processes or purchase generic off-the-shelf solutions.</p>
<p>The following is a summary of MDE value for customers, based on my personal experiences in the four quadrants:</p>
<ul>
<li><strong>Q4</strong> is the hardest to sell. The reason for this is that here MDE provides a generic solution for a solution to a business problem. In other words, an unknown (and therefore regarded risky) MDE tool has to compete against multiple possible solutions that customer is more comfortable with. These include alternative mainstream technologies, in-house frameworks and run-time platforms, and even business changes that may cut ground from under the foot a tool vendor might have in the customer&#8217;s door. Warm reception by end users that love tinkering with their own ad hoc productivity solutions, is not guaranteed (not to mention their concern of becoming unneeded). Moreover, any MDE gains achieved in Q4 are likely to be watered down by waste in customer processes elsewhere. Industrial practices show that successful MDE application results in maximum 30%-40% faster overall development. These gains are among the lowest in MDE (compare these with up to 10x acceleration reported in Q1). Moreover, these gains are further relatively reduced when contrasted against alternative solutions. Last but not least, value of the initial gains is the hardest to demonstrate (you may discover that your stakeholders are not even aware of real business problems). The same stakeholders have the weakest influence over budget. It really looks like odds are against MDE tools in this quadrant today. Still, organizations without core processes, e.g. startup customers or customers developing one of a kind systems, may be interested in MDE tools here.</li>
<li><strong>Q2</strong>: MDE tools are typically not found here.</li>
<li><span><strong>Q3</strong>: This is the place of unique processes and numerous stakeholders from various domains: engineering disciplines (software development being one of them), architecturing, system design to name a few examples. Here MDE tools together with process optimizations can produce dramatic overall improvements (especially in </span>product-oriented<span> industries), which can be measured and linked to business needs recognizable by the customer. However, processes here are often knowledge-intensive and free-form, which makes the road towards these improvements longer and more complex compared to Q1, where processes are more structured and information-intensive. Off-the-shelf fixed MDE solutions are at disadvanage here.</span></li>
<li><strong>Q1</strong> is the easiest for customer acquisition. Tool vendors can produce proofs of concepts in really short sprints (typically up to two weeks), deliver never seen before results (e.g. up to 10x faster development), directly relate these results to real business needs (usually falling under the business agility umbrella, but also including the more common T2M and cost reduction benefits) and have the shortest lines to budget holders. It is no wonder that vendors in this quadrant report numerous successes and are even able to grow under currently declining economic conditions.</li>
</ul>
<p>So what kind of MDE tools are found in these four quadrants? Figure 1 illustrates my attempt to classify the tools. (This classification provides sufficient coverage and is by no means exhaustive.) The categories are:</p>
<ul>
<li><strong>CIM</strong> tools are fixed business modelers with interpretation or code generation capabilities. Modifier CIM (Computation Independent Model) stresses that these tools focus on business solutions and isolate users from developing source code. Well-known examples come from <a href="http://www.mendix.com" target="_blank">Mendix</a> and <a href="http://www.outsystems.com/" target="_blank">OutSystems</a>.</li>
<li><strong>OTS</strong> are off-the-shelf applications that support generic business processes. Examples include CRM, ERP, Office and Simulation packages.</li>
<li><strong>DSM</strong> tools are language workbenches that enable customers define their own domain-specific modeling (DSM) and transformation processes. Typical tools in this group are <a href="http://lsd.luminis.eu/metaedit-4-5-review/" target="_blank">MetaEdit+</a>, Obeo Designer, oAW, <a href="http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/" target="_blank">AToM3</a>, etc.. Note that while application of DSL tools in quadrants 1 and 2 is not unimaginable due to adaptability of such tools, there is not much “meta-&#8221; variability and too much integration complexity to justify such application.</li>
<li><strong>PIM</strong> tools are fixed UML modeling tools with (generic) code generators for one or more software technology platforms (e.g. .NET, Java, PHP). Modifier PIM (platform-independent model) indicates that users are <em>at best</em> isolated from details and differences of the platforms. Numerous examples can be found be found <a href="http://modeling-languages.com/uml-tools/" target="_blank">here</a>.</li>
</ul>
<p>Since I&#8217;ve mentioned the CHARTER project, it would be natural to place its tool-chain (aka CTC) in Figure 1 as well, especially because it presents an exception to the above experiences. CTC provides support for Java source code verification, testing and compilation, which are generic processes, thus placing CTC among PIM tools in Q4. However, due to restrictions that safety critical systems impose on those processes, there are no alternatives currently available. This coupled with huge error costs in such systems, significantly increases the tool-chain&#8217;s value for its potential customers.</p>
<p><strong>Conclusion</strong></p>
<p>In conclusion, I agree with Jordi that the cost of customer acquisition is high. However the situation is not the same for all MDE tool vendors. Those behind CIM tools, enjoy impressive interest from business customers. Their successes are responsible for the current breakthrough in popularity of MDE. Life is the most difficult for PIM tool vendors as too many factors may work against their tools in customer context. Moreover, they face competition from more versatile DSM tools. Last but not least, DSM tools can provide impressive benefits in Q3 (especially in product-oriented industries), but require that customer first commits to learning its own often knowledge-intensive processes. In my opinion, this quadrant and DSM tools are the stage for the next MDE breakthrough.</p>
<p>A necessary disclaimer is that the above conclusions are based on my own limited experiences. If you are an MDE tool vendor, customer or MDE professional, I would love to hear your opinion!</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/added-value-of-mde-tools-a-customer-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AToM3 0.2.2 Language Workbench Evaluation</title>
		<link>http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/</link>
		<comments>http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 20:36:50 +0000</pubDate>
		<dc:creator>Andriy Levytskyy</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[AToM3]]></category>
		<category><![CDATA[code generator]]></category>
		<category><![CDATA[DSM]]></category>
		<category><![CDATA[ER]]></category>
		<category><![CDATA[Graph Grammar]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[mdd]]></category>
		<category><![CDATA[MDE]]></category>
		<category><![CDATA[metamodel]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[transformation]]></category>
		<category><![CDATA[visual]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1771</guid>
		<description><![CDATA[AToM3 is a language workbench developed at the Modelling, Simulation and Design Lab (MSDL) in the School of Computer Science of McGill University. The focus of the review is the language workbench capabilities, that is everything related to specification of modeling languages and automated processing of models.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://atom3.cs.mcgill.ca/" target="_blank"></a></p>
<p><a href="http://atom3.cs.mcgill.ca/" target="_blank">AToM3</a> is a language workbench developed at the Modelling, Simulation and Design Lab (MSDL) in the School of Computer Science of McGill University. Please note that the reviewed version is not the latest (0.3).</p>
<p>The focus of the review is the language workbench capabilities, that is everything related to specification of modeling languages and automated processing of models.</p>
<h3>Freeform Multilingual Modeling</h3>
<p>In AToM3, models (and metamodels) are visually described as graphs. There is no support for spatial relationships, such as containment or touch. While position of modeling elements may  seem to imply spatial relationships among them (e.g. among a software component and a port), AToM3 does not recognize, maintain or process such relationships.</p>
<p>Modeling is performed by means of a visual editor: one selects a modeling concept from one of possibly multiple language toolbars (to the left of the canvas) and places (instantiates) it on the canvas. Any language toolbar can be easily removed or added by closing or opening its language-specification file. Furthermore, the toolbar itself is defined by a model in a so-called “Buttons” DSL (see Figure 1). At any time, the modeler is free to edit this model to e.g. arrange buttons in one or multiple rows, remove language concepts or specify additional buttons to launch transformations frequently used with the given language. Both language specification and toolbar files are generated by AToM3 from the language model (aka metamodel). Language independent tools like Edit, Connect, Delete form the general modeling toolbar (above the canvas).</p>
<p>A special feature of AToM3 is a freeform multi-language canvas. AToM3 breaks with the tradition of &#8220;strongly typed&#8221; diagrams that prevent intermixing modeling elements if not explicitly allowed by the diagram&#8217;s metamodel type. AToM3 canvas can be considered a diagram that allows any modeling elements. However, elements can only be connected if their metamodel allows this. Such canvas provides users with a high degree of modeling freedom. (As illustration of this freedom, <a href="http://atom3.cs.mcgill.ca/images/atom3logo.jpg" target="_blank">AToM3 logo</a> itself is a freeform model done using 5-6 DSLs). Furthermore, because models are not fragmented among islands of diagrams, information access is optimal. Another benefit is less effort on the metadeveloper&#8217;s part because a freeform model can be handled by a transformation without the prior need of metamodel integration.</p>
<p>Unfortunately as models grow in size and number, the single canvas does not scale well, nor does AToM3 provide the user with means to manage them.</p>
<p>AToM3 uses this editor and the freeform canvas in a few different contexts. The primary role is a modeling editor, however the same editor is used for metamodeling and specifying transformation definitions. Such reuse reduces the learning curve and more importantly, brings the benefits of a domain specific modeling environment and the freeform canvas to metadevelopers as well.</p>
<h3>Language Specification</h3>
<p>AToM3’s metalanguage is based on the Entity Relationship (ER) formalism. In order to provide complete metamodeling capabilities, concepts Entity and Relationship are extended with constraints and appearance properties (see Figure 2). Property constraints is used to define static semantics. Appearance defines visual presentation or concrete syntax of a language concept.</p>
<p>AToM3 provides overall excellent metamodeling capabilities that enable metadevelopers produce <a href="http://lsd.luminis.eu/measuring-quailty-of-a-metamodel/" target="_blank">level 5 quality metamodels</a>. The following details these capabilities.</p>
<h4>Abstract Syntax</h4>
<p>For this task metadevelopers are equipped with the ER-based metalanguage, which is very close to conceptual modeling techniques, such as <a href="http://www.orm.net/" target="_blank">ORM</a>. This means that there is a minimum gap between conceptual, business world-oriented models and AToM3 metamodels. In fact, AToM3 abstract syntax models are surprisingly simple and void of technical details typical for metamodels, which makes the models very readable by subject experts. Figures 2 and 4 of the <a href="http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/" target="_blank">Curriculum Content Sequencing (CCS) demo</a> illustrate this point.</p>
<h4>Concrete Syntax</h4>
<p>A simple but sufficient editor allows to define a vector presentation for a language concept. Figure 2 shows all that the editor has to offer.</p>
<h4>Static Semantics</h4>
<p>The constraints property contains rules that control how a modeling element can be connected to another element to form a meaningful composition. Such rules can be defined per language concept or a model and triggered by editor events (e.g. edit, save, transformation start) or on demand by user, thus covering all imaginable ways to invoke model checking.</p>
<p>AToM3 constraint language is Python, which is an unusual choice. Indeed, Python is not a constraint language, not formal (in the model-driven sense), and has side effects (AToM3 is written in Python too). However, my experience with AToM3 showed that none of those are real disadvantages in practice: Python is known for a concise and easy to read syntax and as constraint language, is intended for metadevelopers (who know how to deal with side-effects). In this role, Python proved to be powerful, flexible and efficient.</p>
<h4>Dynamic Semantics</h4>
<p>AToM3 uses a common approach to define DSL semantics by translating language concepts to concepts in another target domain with predefined dynamic semantics (e.g, C++, Java). This approach is known as translational.</p>
<p>Another less common approach supported by AToM3, is by modeling the operational behavior of language concepts [1]. The operational semantics approach specifies how models can be directly executed, typically by an interpreter. Such specifications are expressed in terms of operations on the language itself, which is in contrast to translating the language into another form. The advantage is that operational semantics are easier to understand and write. The disadvantage is that interpreters are normally not available for DSLs due to the very specific nature of the latter. (For an AToM3 illustration of how to build a custom interpreter in a model-driven way, please refer to this <a href="http://lsd.luminis.eu/how-to-build-a-custom-model-interpreter-in-a-model-driven-way/" target="_blank">article</a>.)</p>
<p>In AToM3 translational and operational approaches are implemented as transformations.</p>
<h3>Transformation</h3>
<p>AToM3 employes the graph rewriting approach to transform models. Transformations themselves are declaratively expressed as graph-grammar models. My experience with transformation models written in imperative languages (e.g. QVT Operational, MERL) is that more time is spent figuring out <em>how</em> to navigate host model structure to access right information than actually specifying <em>what</em> to do with this information. Declarative approach like that of AToM3, frees the metadeveloper from having to specify navigation, thus drastically reducing complexity of transformation modeling.</p>
<p>To define a transformation in AToM3, one needs to create a graph grammar and specify one of more GG rules. Figure 3 shows a GG model for the export transformation in the CCS demo. Each rule specifies how a (sub)graph of a so-called host graph can be replaced by another (sub)graph. These (sub)graphs are respectively called the left-hand side (LHS) and the right-hand side (RHS). A rule is assigned an order (priority), a condition and an action. In AToM3, conditions and actions are programmed in Python. As in the case with the constraint language, Python performs very well in these roles too.</p>
<p>A special feature of AToM3 is that both LHS and RHS can be modeled with the DSL(s) of the host graph. In fact, the (sub)graph editor is based on the above mentioned model editor, and provides the metadeveloper with the freeform multilingual canvas, customizable language toolbars and transformations. The consequence is that it is very easy to construct sub-graphs and verify them with subject experts.</p>
<p>An interesting feature of AToM3 transformation system is that  it does not feature transformation parameters. This may seem limiting, however an equally effective alternative is to store &#8220;parameter&#8221; information in a model. The AToM3 canvas makes it extremely easy to mix such &#8220;parameter&#8221; model(s) with a host model  and pass them to a transformation. Figure 4 shows a sequencing model from the <a href="http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/" target="_blank">CCS demo</a> together with a repository model (top left corner of the canvas). Given both, an export transformation can access the remote model repository, pass authentication, and store the sequencing model at the repository.</p>
<p>Another interesting feature is that transformation input can be also an element selected by users (unfortunately multiple selection does not work in this version). A promising application thereof is user-defined in-place transformations that automate frequent and routine modeling operations. For example, decomposing a group element into constituent objects (and vice-versa) with a click of a button. Industrial users that often work with large models would really appreciate the resulting reduction of repetitive strain.</p>
<p>Finally, AToM3 supports nearly all transformation kinds known to the author [2, 3]. It is easier to list what is unsupported: text-to-model and text-to-text (which is a consequence of the graphical nature of the language workbench), and the more exotic synchronization and bidirectional kinds. Due to its graph rewriting system, AToM3 is very strong in model-to-model (M2M) and model-to-text (M2T) transformations. A GG-based support for the latter, very popular category, is not obvious and therefore warrants an extra explanation.</p>
<h4>M2T Transformation</h4>
<p>In AToM3 M2T means producing textual structures from graph structures. One way of doing this is via a transformation where the source and the target models are the same. Rules of such transformation do not perform any important rewriting, but use the graphical nature of the source language to traverse and annotate the source model with temporary information that is needed for text generation. Text itself is generated by side-effects encoded in actions of rules, which can access the annotations.</p>
<p>A typical M2T application is code generation. An example of a non trivial code generation made with AToM3 is <a href="http://sourceforge.net/projects/zcase/" target="_blank">ZCase</a>, a software factory for <a href="http://www.zope.org/" target="_blank">Zope</a>. In the <a href="http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/" target="_blank">CCS demo</a>, ZCase is a part of the ER<span style="color: #424037; font-size: 12px; line-height: 21px;"><em>→</em></span>Zope transformation chain.</p>
<h3>Conclusion</h3>
<p>The is no escaping the fact that AToM3 is a research tool and is not suitable for demanding industrial use. The workbench does not scale well for large models (both in terms of performance and user controls) and its tools are basic. There is no reliable support, no up-to-date exhaustive documentation, no collaborative development, no integration with version control and requirement management systems, and naturally plenty of bugs and annoyances. In short, the tool is far from being mature and ready for industrial users.</p>
<p>However, metadevelopers may find the above drawbacks quite tolerable, because they are better prepared to deal with technical issues and metamodels typically do not stress the tool&#8217;s scalability. On the positive side, AToM3 provides simple but optimal tools and set of features that work together to create one of the most robust and powerful language workbenches I know. Thereby AToM3 is extremely suitable for agile, responsive and timely development. Due to the maturity level of the workbench, its application is best limited to proofs of concept. To date, AToM3 is the language workbench of my choice for quick prototyping.</p>
<p>AToM3 is recommended to MDE students, analysts in need of quick prototyping and tool vendors seeking to improve their language workbenches. In my opinion, AToM3&#8217;s metamodeling and transformation technology is nearly optimal, and is still ahead of the larger and more inert commercial workbenches. While its problems are numerous, they are run-of-the-mill and knowledge and technologies to address them are commonly available. If these problems could have been removed, then AToM3 would have been the tool I could have easily recommended to industrial customers too.</p>
<h3>References</h3>
<p>[1] Tony Clark, Andy Evans, Paul Sammut, and James Willans. Applied Metamodelling: A foundation for Language Driven Development. Version 0.1. Xactium Ltd., 2004.</p>
<p>[2] Krzysztof Czarnecki and Simon Helsen. Classification of model transformation ap- proaches. In Jorn Bettin, Ghica van Emde Boas, Aditya Agrawal, Ed Willink, and Jean Bezivin, editors, 2nd OOPSLA Workshop on Generative Techniques in the Context of Model-Driven Architecture, Anaheim, CA, October 2003. ACM Press.</p>
<p>[3] Tom Mens, Krzysztof Czarnecki, and Pieter Van Gorp. Discussion &#8211; a taxonomy of model transformations. In Jean Bezivin and Reiko Heckel, editors, Language Engineering for Model-Driven Software Development, volume 04101 of Dagstuhl Seminar Proceedings, Dagstuhl, Germany, 2005. Internationales Begegnungs- und Forschungszentrum fuer Informatik (IBFI), Schloss Dagstuhl, Germany.</p>

<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/atom3logo/' title='Figure 1'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/atom3logo-150x150.jpg" class="attachment-thumbnail" alt="" title="Figure 1" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-1/' title='Figure 1'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-1-150x150.png" class="attachment-thumbnail" alt="" title="Figure 1" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-2/' title='Figure 2 (a)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-2-150x150.png" class="attachment-thumbnail" alt="" title="Figure 2 (a)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-3/' title='Figure 2 (b)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-3-150x150.png" class="attachment-thumbnail" alt="" title="Figure 2 (b)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-4-1/' title='Figure 3 (a)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-4-1-150x150.png" class="attachment-thumbnail" alt="" title="Figure 3 (a)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-4-2/' title='Figure 3 (b)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-4-2-150x150.png" class="attachment-thumbnail" alt="" title="Figure 3 (b)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-4-3/' title='Figure 3 (c)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-4-3-150x150.png" class="attachment-thumbnail" alt="" title="Figure 3 (c)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-4-4/' title='Figure 3 (d)'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-4-4-150x150.png" class="attachment-thumbnail" alt="" title="Figure 3 (d)" /></a>
<a href='http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/figure-5/' title='Figure 4'><img width="150" height="150" src="http://lsd.luminis.eu/wp-content/uploads/2011/12/Figure-5-150x150.png" class="attachment-thumbnail" alt="" title="Figure 4" /></a>

]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/atom3-0-2-2-language-workbench-evaluation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kennissessie Services op 24 oktober: de videos</title>
		<link>http://lsd.luminis.eu/kennissessie-services-op-24-oktober-de-videos/</link>
		<comments>http://lsd.luminis.eu/kennissessie-services-op-24-oktober-de-videos/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 11:28:52 +0000</pubDate>
		<dc:creator>Richard van der Laan</dc:creator>
				<category><![CDATA[Celix]]></category>
		<category><![CDATA[OSGi]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Apache ACE]]></category>
		<category><![CDATA[Apache Celix]]></category>
		<category><![CDATA[Apache Felix]]></category>
		<category><![CDATA[News Item]]></category>
		<category><![CDATA[Services]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1755</guid>
		<description><![CDATA[Op 24 oktober 2011 vond een kennissessie plaats over services in gedistribueerde en/of embedded omgevingen. Deze sessie was georganiseerd door Luminis in samenwerking met Thales en leden van de Apache community, en ging in op de vraag hoe het toepassen van services kan helpen bij het verbeteren van de flexibiliteit van bestaande systemen.

De video presentaties van deze sessie zijn nu beschikbaar.]]></description>
			<content:encoded><![CDATA[<p>Op 24 oktober 2011 vond een kennissessie plaats over services in gedistribueerde en/of embedded omgevingen. Deze sessie was georganiseerd door Luminis in samenwerking met Thales en leden van de Apache community, en ging in op de vraag hoe het toepassen van services kan helpen bij het verbeteren van de flexibiliteit van bestaande systemen.</p>
<p>De video presentaties van deze sessie zijn nu beschikbaar.</p>
<p><strong>Innovatie, Services en Open Source</strong><br />
<em>Rene van Hees, Technical Authority Software bij Thales</em></p>
<p><a href="http://www.youtube.com/watch?v=2NlzXw37okM&#038;fmt=18">http://www.youtube.com/watch?v=2NlzXw37okM</a></p>
<p><strong>OSGi en Dynamische Services</strong><br />
<em>Marcel Offermans, lid van de Apache Software Foundation</em></p>
<p><a href="http://www.youtube.com/watch?v=bfEOKva1xhc&#038;fmt=18">http://www.youtube.com/watch?v=bfEOKva1xhc</a></p>
<p><strong>Apache Celix en Apache Foundation</strong><br />
<em>Alexander Broekhuis, Software Engineer Luminis, committer Apache Celix</em></p>
<p><a href="http://www.youtube.com/watch?v=FG04jERMznU&#038;fmt=18">http://www.youtube.com/watch?v=FG04jERMznU</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/kennissessie-services-op-24-oktober-de-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import contacts from iPhone to a built-in navigation in your car</title>
		<link>http://lsd.luminis.eu/how-to-import-contacts-from-iphone-to-a-build-in-navigation-in-your-car/</link>
		<comments>http://lsd.luminis.eu/how-to-import-contacts-from-iphone-to-a-build-in-navigation-in-your-car/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 20:16:46 +0000</pubDate>
		<dc:creator>dimitriyk</dc:creator>
				<category><![CDATA[iPhone/ iPad]]></category>
		<category><![CDATA[Auris]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[contacts]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[phone book]]></category>
		<category><![CDATA[Toyota]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1738</guid>
		<description><![CDATA[There are a lot of questions on the Internet concerning how to export contacts from iPhone into a car’s navigation. In particular, I know that many Toyota owners experience this problem. For example, pairing iPhone with my Toyota Auris Executive went well, but when I tied to transfer contacts into the navigation system, I just [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of questions on the Internet concerning how to export contacts from iPhone into a car’s navigation. In particular, I know that many Toyota owners experience this problem. For example, pairing iPhone with my Toyota Auris Executive went well, but when I tied to transfer contacts into the navigation system, I just got a notification that Bluetooth device is not connected.</p>
<p>My car has a build-in navigation system with a car kit, as well as a Bluetooth connection.  I also found information on how to export contacts in the instruction given. But this is not the case for iPhone users, due to the difference in Bluetooth connection systems: the navigation expects pushing of contacts, however iPhone doesn’t send contacts automatically.</p>
<p>Of course, you can always add contacts manually to your navigation system, spending maybe a few hours on that. And you can use another phone, which supports your car’s Bluetooth. For that just copy all your contacts to that other phone or insert your sim there using a micro-sim adapter.</p>
<p>But what to do when you don’t have another phone or micro-sim adapter? Or when you can’t copy your contacts? Or when you don’t have time to add them all manually?</p>
<p>I found my way, which you may found useful: it is exporting contacts from a laptop. In this example I used MacBook Pro with installed MacOS Lion, however I believe it’s also possible to use a laptop running Windows (then you just need to find out where your contacts from iPhone are stored).</p>
<p>With this 10 steps’ guideline you will have all your contacts transferred to the car:</p>
<p><strong>1. </strong>Sync your iPhone with your MacBook (see iTunes tutorials).  Skip this step if already you use your iPhone with that MacBook.</p>
<p><strong>2. </strong>Open <strong>Address Book</strong> (<em>Application-&gt;Address Book</em>). If everything is done correctly, you should see all your iPhone contacts.</p>
<p><strong>3. </strong>Select all contacts (cmd+A).</p>
<p><strong>4.</strong> Go to <em>File-&gt;Export-&gt;Export vCard…</em> and save it for example as <strong>vCards.vcf.</strong></p>
<p><img class="alignnone size-medium wp-image-1739" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/adress-book-300x169.png" alt="adress book" width="300" height="169" /></p>
<p><strong>5. </strong>Now go to your car and pair MacBook with the navigation via Bluetooth.</p>
<p><strong>6. </strong>Select in the navigation <em>Telephone-&gt;Settings-&gt;Transfer data-&gt;Select some group</em>.</p>
<p><img class="alignnone size-medium wp-image-1741" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/IMG_0938-300x224.jpg" alt="IMG_0938" width="300" height="224" /></p>
<p><img class="alignnone size-medium wp-image-1742" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/IMG_0933-300x224.jpg" alt="IMG_0933" width="300" height="224" /></p>
<p><img class="alignnone size-medium wp-image-1743" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/IMG_0934-300x224.jpg" alt="IMG_0934" width="300" height="224" /></p>
<p>You will see on the display that contacts are being imported (but be aware at that moment nothing yet happens).</p>
<p><img class="alignnone size-medium wp-image-1744" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/IMG_0936-300x224.jpg" alt="IMG_0936" width="300" height="224" /></p>
<p><strong>7. </strong>On your MacBook click the Bluetooth icon (on the right -top side of the panel), then select your car’s connection and click <strong>Send file.</strong></p>
<p><strong>8. </strong>Choose <strong>vCards.vcf</strong> file, that you have previously created (see step 4), and click <strong>Send</strong>.</p>
<p><strong>9. </strong>When importing is done, you should see a confirmation message on the navigation display. During the importing process you can see the progress on the MacBook.</p>
<p><strong>10. </strong>Now you can disconnect your MacBook from the navigation.</p>
<p>I hope this tutorial has saved you a few hours of manually adding contacts.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/how-to-import-contacts-from-iphone-to-a-build-in-navigation-in-your-car/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CHARTER Surveillance Use Case &#8211; Industrial Evaluation</title>
		<link>http://lsd.luminis.eu/charter-surveillance-use-case-industrial-evaluation/</link>
		<comments>http://lsd.luminis.eu/charter-surveillance-use-case-industrial-evaluation/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:31:29 +0000</pubDate>
		<dc:creator>Andriy Levytskyy</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[CHARTER]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[evaluation]]></category>
		<category><![CDATA[industry]]></category>
		<category><![CDATA[mdd]]></category>
		<category><![CDATA[MDE]]></category>
		<category><![CDATA[methodology]]></category>
		<category><![CDATA[News Item]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1718</guid>
		<description><![CDATA[This month, Luminis has started development of a surveillance use case. The purpose of the case is industrial assessment and validation of tools and technologies developed in the “Critical and High Assurance Requirements Transformed through Engineering Rigor” project (CHARTER).  The ultimate goal of CHARTER is to ease, accelerate, and cost-reduce the certification of embedded systems. The CHARTER tool-suite employs real-time Java, Model Driven Development (MDD), rule-based compilation and formal verification. The coming series of articles will describe evaluation experiences in the surveillance use case.]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-1719 alignleft" title="Screen shot 2011-10-10 at 4.18.26 PM" src="http://lsd.luminis.eu/wp-content/uploads/2011/10/Screen-shot-2011-10-10-at-4.18.26-PM.png" alt="Screen shot 2011-10-10 at 4.18.26 PM" width="150" height="150" />This month, Luminis has started development of a surveillance use case. The purpose of the case is industrial assessment and validation of tools and technologies developed in the “Critical and High Assurance Requirements Transformed through Engineering Rigor” project (<a href="http://charterproject.ning.com/" target="_blank">CHARTER</a>).  The ultimate goal of CHARTER is to ease, accelerate, and cost-reduce the certification of embedded systems. The CHARTER tool-suite employs real-time Java, Model Driven Development (MDD), rule-based compilation and formal verification. The coming series of articles will describe evaluation experiences in the surveillance use case.</p>
<p>The CHARTER project includes user partners from four key industries: aerospace, automotive, surveillance and medical, each of which develops embedded systems that require high assurance or formal certification in order to meet business or governmental requirements. The four user partners will each validate the CHARTER tools and methodology using industrial applications and actual development scenarios, which will provide feedback for the project and ensure the tools and technologies perform as expected, and deliver the expected improvements in embedded systems development. As part of the evaluation process, metrics will be used to quantify industrial experiences in terms of development effort, cost savings, verification time, etc., to document for others the benefits achieved.</p>
<p>The CHARTER project was established to improve the software development process for developing critical embedded systems. Critical embedded software systems assist, accelerate, and control various aspects of society and are common in cars, aircraft, medical instruments and major industrial and utility plants. These systems are critical to human life and need to be held to the highest standards of performance through formal certification procedures. Improving the quality and robustness of these systems is paramount to their widespread adoption.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/charter-surveillance-use-case-industrial-evaluation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An MDE Example: Curriculum Content Sequencing Application</title>
		<link>http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/</link>
		<comments>http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 19:51:00 +0000</pubDate>
		<dc:creator>Andriy Levytskyy</dc:creator>
				<category><![CDATA[MDD]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[mdd]]></category>
		<category><![CDATA[MDE]]></category>
		<category><![CDATA[metamodel]]></category>
		<category><![CDATA[ontology]]></category>
		<category><![CDATA[process]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1679</guid>
		<description><![CDATA[The best way to explain MDE to someone without any model-driven experience is to involve in an MDE development. The second best, for which blog is a suitable medium, is to show examples. Today I would like to share an example of a simple MDE application and give a glimpse into work items and a process behind its development.]]></description>
			<content:encoded><![CDATA[<p>The best way to explain MDE to someone without any model-driven experience is to involve in an MDE development. The second best, for which blog is a suitable medium, is to show examples. Today I would like to share an example of a simple MDE application and give a glimpse into work items and a process behind its development.</p>
<p>The application in question is an MDE implementation of a sequencing system described in [1]. The purpose of this MDE exercise was to quickly build something concrete that would help <a href="http://www.luminis.eu/" target="_blank">Luminis</a> learn a new vertical domain.</p>
<p><strong>Problem Domain and Demo System</strong></p>
<p>Curriculum content sequencing (CCS) is an important pedagogical service. The purpose of this service is management of learning routes to help students achieve curriculum goals. An emerging trend in education is adaptive learning that is tailored to backgrounds and preferences of individual students. This is in contrast to the traditional way of content sequencing that usually prescribed a single learning route for groups of individuals. Advances in e-learning provide an excellent platform for adaptive content sequencing.</p>
<p><img class="aligncenter size-full wp-image-1683" title="Actors_and_services" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Actors_and_services.png" alt="Actors_and_services" width="598" height="399" /></p>
<p style="text-align: center;"><em>Figure 1: Use case diagram of the demo system</em></p>
<p>A use case diagram in Figure 1 shows actors and important services of a simple content sequencing system. These services are:</p>
<p><span style="text-decoration: underline;">Capture sequencing content</span> provides Sequencing Expert with tools to design content sequencing knowledge necessary to reach a curriculum goal.</p>
<p><span style="text-decoration: underline;">Register learning units</span> enables Materials Provider to connect leaning materials to nodes of content sequencing.</p>
<p><span style="text-decoration: underline;">Suggest a learning route</span> provides Student with a learning route tailored to the student’s curriculum competences, background and preferences. The service also suggests necessary learning units and their substitutions from other providers.</p>
<p><strong>Problem Domain Ontology</strong></p>
<p>Domain ontology is conceptualization of domain knowledge. Figure 2 shows an information model that captures ontology for the CCS domain. The model is created using the <a href="http://www.orm.net/" target="_blank">Object Role Modelling</a> (ORM) methodology. Some readers may be also familiar with ORM&#8217;s close relatives from The Netherlands: NIAM and <a href="http://www.fco-im.nl/" target="_blank">FCO-IM</a>.</p>
<p style="text-align: center;"><img class="size-full wp-image-1692 aligncenter" title="Simple_SSC_ontology" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Simple_SSC_ontology.png" alt="Simple_SSC_ontology" width="551" height="322" /></p>
<p style="text-align: center;"><em>Figure 2: Ontology for the curriculum content sequencing domain</em></p>
<p>At this point a few disclaimers are due:</p>
<p>The model loosely conforms to ORM, namely main principles are followed, used notation is based on more popular UML and ER languages, and not all ORM tools are being employed (an example of an ORM tool in Figure 2 is relationship ‘succession’ that is objectified as an entity).</p>
<p>The model itself is not complete. Moreover, it cannot be claimed correct, as the model was not verified with subject matter experts. However, the model is sufficiently accurate for the purpose of the demo (see above).</p>
<p><strong>Design</strong></p>
<p>The system illustrated in Figure 1 is partitioned in 2 parts: a domain specific modeling environment (DSME) for Sequencing Expert and a web-based CMS for Student and Materials Provider. Both parts can import/export curriculum content sequencing designs from each other. Each part provides the actors with rich environment and enables reuse of generic services that are relevant to the application, e.g. user management, document flow, security, content search. Any application-specific functionality that <em>changes frequently during the application&#8217;s life-cycle</em> was engineered with models, otherwise programmed. Such points of frequent change are known as variation points.</p>
<p>Figure 3 shows the system parts, variation points (shown as boxes) and activities (diamonds) related to changes in the variation points. These are laid over the OMG’s <a href="http://en.wikipedia.org/wiki/Meta-Object_Facility#Overview" target="_blank">four modeling layers</a> (labeled M0-M3). Variations at level M1 are part of the normal application operation. Here Sequencing Expert and Materials Publisher define sequencing designs and learning units (LU) respectively. Variations at level M2 occur when domain definitions (see Figure 2) change, e.g. as developer’s understanding of the CCS domain evolves. These are changes to the system itself and are carried out by developers during development or consequent system updates. Grayed out shapes at M0 and M3 are system and technology related variation points that do not change once chosen.</p>
<p style="text-align: center;"><img class="size-full wp-image-1685 aligncenter" title="CCS_Meta_application_PIM" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/CCS_Meta_application_PIM.png" alt="CCS_Meta_application_PIM" width="523" height="341" /></p>
<p style="text-align: center;"><em>Figure 3: System parts, modeling architecture, variation points and change processes</em></p>
<p>Changes at level M2 are expensive and (given the experimental nature of the demo) frequent. Therefore these are best reduced or avoided. The direction of development activities implies that there is a single source of M2 changes, from which all the others can be derived. MDE is applied to isolate this source of change within a model (see <em>Metamodel</em> in the figure) and automate related development activities by means of transformations.</p>
<p>The following are selected technologies:</p>
<ul>
<li><a href="http://atom3.cs.mcgill.ca/" target="_blank">AToM3</a> ─ a language workbench. AToM3 uses Entity-Relationship (ER) and Graph Grammar (GG) as <em>Metalanguage</em> and <em>Transformation definition language</em> respectively. AToM3 is used as language workbench in (model-driven) development and as domain-specific modeling environment (DMSE) for Sequencing Expert.</li>
<li>Zope ─ a web application server that is typically used as intranet and extranet server, document publishing system, portal server and platform for collaboration. In this application, Zope provides a web-based CMS for Student and Material Provider.</li>
<li><a href="http://sourceforge.net/projects/zcase/" target="_blank">ZCase</a> ─ a model-driven software factory for code generation of Zope document types.</li>
<li>Python for development other than model-driven.</li>
</ul>
<p>With these solutions and technologies in place, the following is left to be developed:</p>
<ol>
<li>Metamodels for sequencing designs and learning units (see Figure 2).</li>
<li>A transformation bridging the gap between AToM3 metamodels and ZCase, thus forming a complete transformation chain <em>Model→Code</em>.</li>
<li>Import/export routine between AToM3 and Zope</li>
<li>Simple web-interfaces and document search for Student and Materials Provider</li>
</ol>
<p>The last two items were trivial to implement. Item 2, while simple, requires introduction of new material (namely ER, Class diagrams, Zope, ZCase, Python) for explanation. For these reasons items 2,3 and 4 will not be covered in the article.</p>
<p><strong>Capturing Sequencing Designs</strong></p>
<p>With the selected technology we can now define a DSL for capturing sequencing designs in AToM3.</p>
<p style="text-align: center;"><img class="size-full wp-image-1691 aligncenter" title="Sequencing DSL metamodel" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Sequencing-DSL-metamodel.png" alt="Sequencing DSL metamodel" width="546" height="414" /></p>
<p style="text-align: center;"><em>Figure 4: CCS metamodel</em></p>
<p>Figure 4 shows a CCS metamodel written in ER. Note, that the screenshot shows only the abstract syntax, but the other aspects (see <a href="http://lsd.luminis.eu/measuring-quailty-of-a-metamodel/" target="_blank">metamodelling quality</a>) are defined as well. The quality of the metamodel is at level 5.</p>
<p>Using language workbench capabilities and the above metamodel, AToM3 configures itself into a dedicated modeling environment for curriculum expert. (This configuration is implemented by AToM3&#8217;s own transformation <em>Generate DSME</em>.)</p>
<p style="text-align: center;"><img class="size-full wp-image-1682 aligncenter" title="A learning sequence example of the first grade mathematics course determined by curriculum experts" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/A-learning-sequence-example-of-the-first-grade-mathematics-course-determined-by-curriculum-experts.png" alt="A learning sequence example of the first grade mathematics course determined by curriculum experts" width="604" height="318" /></p>
<p style="text-align: center;"><em>Figure 5: A learning sequencing design for the first grade mathematics course</em></p>
<p>Figure 5 is a screenshot of the CCS modeling environment at work: Left vertical toolbar contains buttons for every modeling concept defined in the CCS metamodel. Top horizontal toolbar contains generic modeling tools, Edit and Connect in particular. In AToM3 modeling is performed by means of a visual editor: one selects a modeling concept, places it on the canvas and modifies its properties with the Edit tool. Further on, such created instances of modeling concepts can be coupled using the Connect tool. An example of such a visual model is a sequencing design for the first grade mathematics course, shown on the canvas of DSME.</p>
<p><strong>Sequencing Designs in CMS</strong></p>
<p>Given the CCS metamodel, transformation chain ER→Zope generates implementation of the corresponding document types for Zope. Figure 6 shows these document types as seen in CMS (see options in the drop down list). You may recognize the entities and relationships from the metamodel shown in Figure 4.</p>
<p style="text-align: center;"><img class="size-full wp-image-1686 aligncenter" title="CMS Sequencing document types" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/CMS-Sequencing-document-types.png" alt="CMS Sequencing document types" width="536" height="347" /></p>
<p style="text-align: center;"><em>Figure 6: Sequencing document types available in CMS</em></p>
<p>These types allow curriculum experts to build sequencing designs in a web browser. A more convenient way is to transfer sequencing designs from the DSME part. This is achieved by executing an export transformation on a sequencing design in AToM3. The result of this transformation is a fully searchable CCS document stored as graph structure in Zope. For example, given the AToM3 model in Figure 5, export would create a Zope document of type Sequencing multigraph as shown in the figure below.</p>
<p style="text-align: center;"><img class="size-full wp-image-1684 aligncenter" title="Author view on a sequencing model" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Author-view-on-a-sequencing-model.png" alt="Author view on a sequencing model" width="578" height="546" /></p>
<p style="text-align: center;"><em>Figure 7: Sequencing expert view on a CCS document</em></p>
<p>Figure 7 shows the web-interface that represents a CCS document as graph structure, i.e. a set of edges and nodes. (A viewer which can display graph-like structures in HTML web pages would be more appropriate, but is not necessary for this demo.) Note that the structure and properties of the AToM3 model from Figure 5 are transferred without loss of information.</p>
<p>The document shown in Figure 7 can be changed online and downloaded (via export tab seen in the screenshot) as an AToM3 model. Consequently, the downloaded file can be loaded in AToM3 for editing, thus closing the import/export round-trip.</p>
<p><strong>Learning Unit Registration</strong></p>
<p style="text-align: center;"><img class="size-full wp-image-1688 aligncenter" title="Learning Unit model" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Learning-Unit-model.png" alt="Learning Unit model" width="487" height="400" /></p>
<p style="text-align: center;"><em>Figure 8: Learning Unit metamodel</em></p>
<p>Learning Unit is a simple and atomic Zope document type, whose AToM3 metamodel is shown in Figure 8. LU Zope type is generated and its instances are created, searched, read, and modified similar to those of the CCS document types. A simple web interface is sufficient for Material Provider.</p>
<p><strong>Obtaining Learning Routes</strong></p>
<p>Currently, this service has a very basic recommendation mechanism:</p>
<ul>
<li>Sequencing designs are searched to match query parameters.</li>
<li>No account is taken of student’s curriculum competences, background and preferences (and there is no student profile).</li>
</ul>
<p style="text-align: center;"><img class="size-full wp-image-1690 aligncenter" title="Searching for course sequencing" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Searching-for-course-sequencing.png" alt="Searching for course sequencing" width="578" height="546" /></p>
<p style="text-align: center;"><img class="size-full wp-image-1689 aligncenter" title="Reader view on a sequencing model" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Reader-view-on-a-sequencing-model.png" alt="Reader view on a sequencing model" width="578" height="546" /></p>
<p style="text-align: center;"><img class="size-full wp-image-1693 aligncenter" title="Substitutive materials per SD" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/Substitutive-materials-per-SD.png" alt="Substitutive materials per SD" width="578" height="546" /></p>
<p>The above screenshots illustrate the current functionality: The first is the web interface that allows students to define search parameters and displays search results. The next is the web view of the sequencing design previously shown in Figure 5. Selecting any node of the design, will display information about the sequencing node and suggest learning units and their substitutions from alternative materials providers (see the last screenshot).</p>
<p><strong>Summary</strong></p>
<p>In conclusion, I would like to highlight a few points about this MDE application:</p>
<p>The complete development of the application took about 2 man-week. The real power, however is how fast the application can be updated as the knowledge of the application domain evolves: a matter of an hour given even drastic changes in metamodels. This efficiency is possible due to application of the <a href="http://en.wikipedia.org/wiki/Single_Source_of_Truth" target="_blank">SSoT</a> principle, proper abstractions and automation: Effectively, two separate <a href="http://en.wikipedia.org/wiki/Platform-specific_model" target="_blank">PSM</a> developments were replaced by a single <a href="http://en.wikipedia.org/wiki/Platform-independent_model" target="_blank">PIM</a> development, from which code is generated for two platforms (AToM3 and Zope).</p>
<p>In development of this application, off-the-shelf MDE frameworks were reused (namely AToM3 and ZCase) and traditional development process was interwoven with development of missing model-driven assets (metamodels, ER→ZCase transformation). The latter is a software development process too, and as a matter of fact, followed OMG’s CIM/PIM/PSM process architecture.</p>
<p>Naturally, development of model-driven assets has its particularities as well. For one, there is a much stronger isomorphism between objects in the world of application users and domain concepts in model-driven artifacts. Therefore, role of analysis models, such as shown in Figure 2 is more important than in the more requirements-oriented traditional development.</p>
<p>This demo provides extremely simplified service for learning route recommendation. Recommendation algorithm depends on the information structures and is sensitive to changes in those structures as well. The service is in fact a model interpretation, where model is a CCS design and a Student profile. A possible MDE approach to building an application-specific interpreter is described <a href="http://lsd.luminis.eu/how-to-build-a-custom-model-interpreter-in-a-model-driven-way/" target="_blank">here</a> (but be sure to read the approach’s limitations as well).</p>
<p>Developed metamodels reach level 5 of <a href="http://lsd.luminis.eu/measuring-quailty-of-a-metamodel/" target="_blank">metamodeling quality</a>. This topmost level means that all aspects of the language have been modeled, including its semantics. In this demo, semantics of ER was defined by using the translational approach, that is by translating ER concepts to Zope and AToM3 concepts that have precise semantics. Figure 3 shows these translations as <em>Model→Code</em> and <em>Generate DSME</em> activities. This illustrates that a language can have multiple semantics.</p>
<p>The demo also showed that modular transformations can be reused to form new transformation chains. Case in point is how ZCase was integrated in ER to Zope transformation by means of a relatively simple bridge. This is a counterexample to a claim that MDE solutions are inflexible.</p>
<p>Do you have experience with MDE applications within your organization? Can you share these experiences as well?</p>
<p><strong>References</strong></p>
<p>[1] Yu-Liang Chi. 2009. Ontology-based curriculum content sequencing system with semantic rules. Expert Syst. Appl. 36, 4 (May 2009), 7838-7847.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/an-mde-example-curriculum-content-sequencing-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Specific Languages in Groovy</title>
		<link>http://lsd.luminis.eu/domain-specific-languages-in-groovy/</link>
		<comments>http://lsd.luminis.eu/domain-specific-languages-in-groovy/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 17:55:59 +0000</pubDate>
		<dc:creator>daanb</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1553</guid>
		<description><![CDATA[Domain Specific Languages in Groovy demonstrates how Groovy shines when it comes to domain specific languages.
About Domain Specific Languages
A Domain Specific Languages[1] (DSL) is a language tailored to describe a part of a specific domain. An example of a DSL are regular expressions[2]. Regular expressions provide a language that allow a user to specify which [...]]]></description>
			<content:encoded><![CDATA[<p>Domain Specific Languages in Groovy demonstrates how Groovy shines when it comes to domain specific languages.</p>
<p><strong>About Domain Specific Languages</strong></p>
<p>A Domain Specific Languages<a title="Wikipedia on Domain Specific Languages" href="http://en.wikipedia.org/wiki/Domain-specific_language"><sup>[1]</sup></a> (DSL) is a language tailored to describe a part of a specific domain. An example of a DSL are regular expressions<a title="Wikipedia on Regular Expressions" href="http://en.wikipedia.org/wiki/Regular_expression"><sup>[2]</sup></a>. Regular expressions provide a language that allow a user to specify which strings are accepted. Formally the domain for regular expression are finite-state machines<a title="Wikipedia on Finite-state machines" href="http://en.wikipedia.org/wiki/Finite-state_machine"><sup>[3]</sup></a> that accept strings. A regular expression describes a finite-state machine.</p>
<p>A DSL can enhance productivity enormously. By providing an abstraction over a specific domain, DSL&#8217;s allow a user to be more expressive. This expressiveness can cut the development time. A DSL also bridges the communication gap between a developer and a domain expert. The book Domain-specific Languages<a title="Books by Martin Fowler" href="http://martinfowler.com/books.html"><sup>[4]</sup></a> by Martin Fowler and Rebecca Parsons is a great exposition about the subject.</p>
<p><strong>About Groovy</strong></p>
<p>Groovy<a title="The Groovy homepage" href="http://groovy.codehaus.org/"><sup>[5]</sup></a> is a dynamic language running on the Java Virtual Machine (JVM). It takes the power of the JVM and provides a modern programming language for it.  Groovy is inspired by successful languages like Python and Ruby. It rids most of the tedious boilerplate from Java code, replacing it with powerful primitives. You can try Groovy in your browser at <a title="Groovy on Google App Engine" href="http://groovyconsole.appspot.com/">http://groovyconsole.appspot.com/</a>.</p>
<p><strong>DSL&#8217;s in Groovy</strong></p>
<p>Groovy uses a lot of domain specific languages. A notable example is the <code>MarkupBuilder</code><sup>[<a title="Groovy API documentation on MarkupBuilder" href="http://groovy.codehaus.org/api/groovy/xml/MarkupBuilder.html">6</a>]</sup>. This class provides a DSL for the creation of xml. For example, the following code</p>
<pre class="brush: groovy; title: ; notranslate">
new MarkupBuilder().root {
   a( a1:'one' ) {
     b { mkp.yield( '3 &lt; 5' ) }
     c( a2:'two', 'blah' )
   }
 }
</pre>
<p>will produce</p>
<pre class="brush: xml; title: ; notranslate">
&lt;root&gt;
    &lt;a a1='one'&gt;
        &lt;b&gt;3 &lt; 5&lt;/b&gt;
        &lt;c a2='two'&gt;blah&lt;/c&gt;
    &lt;/a&gt;
&lt;/root&gt;
</pre>
<p><strong>Custom DSL</strong></p>
<p>Groovy allows the introduction of custom DSLs. Groovy provides a <code>BuilderSupport</code><sup>[<a title="Groovy API documentation on BuilderSupport" href="http://groovy.codehaus.org/api/groovy/util/BuilderSupport.html">7</a>]</sup> class. By extending this class a DSL like the <code>MarkupBuilder</code> can be created. We will demonstrate the use of <code>BuilderSupport</code> with the following example.</p>
<p>Let&#8217;s assume that we have a <code>Robot</code>. The robot is controlled via the <code>executeCommand</code> method. The <code>executeCommand</code> method accepts command codes. There are three of them <code>0x37</code>, <code>0x51</code> and <code>0x88</code> with the following  interpretation.</p>
<table style="margin: 0 auto; border-style: solid; border-color: black; border-width: 1px" border="0" cellspacing="0">
<thead>
<tr>
<td style="border-style: none none solid none; border-color: black; border-width: 1px">Code</td>
<td style="border-style: none none solid none; border-color: black; border-width: 1px">Command</td>
</tr>
</thead>
<tbody>
<tr>
<td>0&#215;37</td>
<td>Move Forward</td>
</tr>
<tr>
<td>0&#215;51</td>
<td>Turn Left</td>
</tr>
<tr>
<td>0&#215;88</td>
<td>Turn Right</td>
</tr>
</tbody>
</table>
<p>It would be tedious to perform complex movements with this robot. Multiple calls to the <code>executeCommand</code> method, all strung together, are necessary to do something trivial as navigate around a room. Instead, one would rather say something like.</p>
<pre class="brush: groovy; title: ; notranslate">
do(4) {
    forward()
    left()
}
</pre>
<div id="attachment_1648" class="wp-caption alignright" style="width: 414px"><a href="http://lsd.luminis.eu/wp-content/uploads/2011/09/program-class-diagram2.png"><img class="size-full wp-image-1648 " title="Auxiliary Classes" src="http://lsd.luminis.eu/wp-content/uploads/2011/09/program-class-diagram2.png" alt="Auxiliary classes bridging the syntactic gap" width="404" height="229" /></a><p class="wp-caption-text">Auxiliary classes bridging the syntactic gap</p></div>
<p>We can start bridging the syntactic gap by introducing a few auxiliary classes. The following class diagram shows the participants. It combines the composite<sup>[<a title="Wikipedia on Composite pattern" href="http://en.wikipedia.org/wiki/Composite_pattern">8</a>]</sup> pattern with the visitor<sup>[<a title="Wikipedia on Visitor Pattern" href="http://en.wikipedia.org/wiki/Visitor_pattern">9</a>]</sup> pattern.<br />
The contract of the <code>Program</code> interface is to execute itself with a provided visiting <code>Robot</code>. There are two concrete programs types. There are <code>BasicProgram</code>s, one for each command, i.e. <code>ForwardProgram</code>, <code>LeftProgram</code> and <code>RightProgram</code>. These <code>Program</code>s execute the corresponding command on the provided <code>Robot</code>. The other concrete <code>Program</code> is the <code>DoProgram</code>. The <code>DoProgram</code> is composed of other <code>Program</code>s. When a <code>DoProgram</code> is asked to execute with a <code>Robot</code>, it asks it&#8217;s component <code>Program</code>s in turn to execute with the <code>Robot</code>.</p>
<p>The <code>Program</code> interface and its implementations help to express the intention of a user of the<code> Robot</code>. But this convenience comes at a price. There is a lot of boilerplate code necessary to express a program to navigate the robot around a room.</p>
<pre class="brush: groovy; title: ; notranslate">
DoProgram program = new DoProgram(4)
program.add(new ForwardProgram())
program.add(new LeftProgram())
</pre>
<p>This is where DSL&#8217;s step in.</p>
<p><strong>ProgramBuilder</strong></p>
<p>We will now use the power of <code>BuilderSupport</code><sup>[<a title="Groovy API documentation on BuilderSupport" href="http://groovy.codehaus.org/api/groovy/util/BuilderSupport.html">7</a>]</sup> to go the extra mile and close the syntactic gap. We will use <code>BuilderSupport</code> to create a <code>ProgramBuilder</code> class.<br />
The <code>BuilderSupport</code> class has five abstract methods. These methods are subdivided in two categories. On the one hand there are various <code>createNode</code> methods. On the other hand is the <code>setParent</code> method.</p>
<p>The <code>createNode</code> methods only vary in their signature. The all have a <code>name</code> parameter in common. The <code>createNode</code> methods can also sport an  <code>value</code> parameter, an <code>attributes</code> parameter, both parameters or no extra parameter. We chained the various methods to a single method, so we will focus on the <code>createNode(String name)</code> method. </p>
<p>The various <code>createNode</code> methods are called when a method is executed which is not defined. The <code>name</code> parameter is set to the missing method name. For example, in the following code</p>
<pre class="brush: groovy; title: ; notranslate">
new ProgramBuilder().forward()
</pre>
<p>the <code>createNode</code> method is called with the <code>name</code> parameter set to <code>"forward"</code>. A <code>createNode</code> method should return an object. In this case it would return a <code>ForwardProgram.</code></p>
<p>The <code>setParent(Object parent, Object child)</code> method is called when a missing method is called with a closure<sup>[<a title="Wikipedia on Closure" href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29">10</a>]</sup>. First the <code>createNode</code> method should return an object. This object will act as parent parameter for the subsequent calls to <code>createNode</code> from the closure. I.e. every time a <code>createNode</code> method is called, the returned object is the child parameter in a call to <code>setParent</code>.<br />
A code example should clear things up. The call sequence of the following code is determined.</p>
<pre class="brush: groovy; title: ; notranslate">
ProgramBuilder b = new ProgramBuilder()
b.do() {
    b.forward()
}
</pre>
<p>The call sequence will be: <code>createNode("do")</code>, <code>createNode("forward")</code> followed by a call to <code>setParent(parent,child)</code> where <code>parent</code> is the return value of the first call to <code>createNode</code> and <code>child</code> is the return value of the second call to <code>createNode</code>. In this example <code>createNode("do")</code> would return a <code>DoProgram</code>, <code>createNode("forward")</code> would return a <code>ForwardProgram</code> and <code>setParent(parent,child)</code> would call <code>parent.add(child)</code>.</p>
<p>By using the various <code>createNode</code> method on can imagine that the following code can be used to navigate a <code>Robot</code> around a room. If you would like to look into the specifics the code can be found at <a title="Compendium code on GitHub" href="https://github.com/dvberkel/luminis-dsl-in-groovy">GitHub</a>.</p>
<pre class="brush: groovy; title: ; notranslate">
ProgramBuilder b = new ProgramBuilder()

Program program = b.do(4) {
    b.forward()
    b.left()
}

Robot robot = new Robot()
program.executeWith(robot)
</pre>
<p><strong>Conclusion</p>
<p></strong>Groovy offers ample opportunities to introduce domain specific languages in a project. The <code>BuilderSupport</code> class is a great tool to create domain specific languages with. Domain specific languages can bridge the communication gap between a domain expert and a developer.</p>
<p><em>References</em></p>
<ol>
<li><a title="Wikipedia on Domain Specific Languages" href="http://en.wikipedia.org/wiki/Domain-specific_language">http://en.wikipedia.org/wiki/Domain-specific_language</a></li>
<li><a title="Wikipedia on Regular Expressions" href="http://en.wikipedia.org/wiki/Regular_expression">http://en.wikipedia.org/wiki/Regular_expression</a></li>
<li><a title="Wikipedia on Finite-state machines" href="http://en.wikipedia.org/wiki/Finite-state_machine">http://en.wikipedia.org/wiki/Finite-state_machine</a></li>
<li><a title="Books by Martin Fowler" href="http://martinfowler.com/books.html">http://martinfowler.com/books.html</a></li>
<li><a title="The Groovy homepage" href="http://groovy.codehaus.org/">http://groovy.codehaus.org/</a></li>
<li><a title="Groovy API documentation on MarkupBuilder" href="http://groovy.codehaus.org/api/groovy/xml/MarkupBuilder.html">http://groovy.codehaus.org/api/groovy/xml/MarkupBuilder.html</a></li>
<li><a title="Groovy API documentation on BuilderSupport" href="http://groovy.codehaus.org/api/groovy/util/BuilderSupport.html">http://groovy.codehaus.org/api/groovy/util/BuilderSupport.html</a></li>
<li><a title="Wikipedia on Composite Pattern" href="http://en.wikipedia.org/wiki/Composite_pattern">http://en.wikipedia.org/wiki/Composite_pattern</a></li>
<li><a title="Wikipedia on Visitor Pattern" href="http://en.wikipedia.org/wiki/Visitor_pattern">http://en.wikipedia.org/wiki/Visitor_pattern</a></li>
<li><a title="Wikipedia on Closure" href="http://en.wikipedia.org/wiki/Closure_%28computer_science%29">http://en.wikipedia.org/wiki/Closure_(computer_science)</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/domain-specific-languages-in-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GraniteDS and AIR for mobile</title>
		<link>http://lsd.luminis.eu/graniteds-and-air-for-mobile/</link>
		<comments>http://lsd.luminis.eu/graniteds-and-air-for-mobile/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 14:10:51 +0000</pubDate>
		<dc:creator>Walter Treur</dc:creator>
				<category><![CDATA[Flex / AIR]]></category>
		<category><![CDATA[iPhone/ iPad]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mobility]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[graniteds]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[News Item]]></category>

		<guid isPermaLink="false">http://lsd.luminis.eu/?p=1571</guid>
		<description><![CDATA[In this short article I will show how to resolve some obstacles I came across when I developed my first application with AIR for mobile and GraniteDS]]></description>
			<content:encoded><![CDATA[<p>In this article I will briefly show how to resolve some obstacles I came across when I developed my first application with <a href="http://www.adobe.com/devnet/devices.html">AIR for mobile</a> and <a href="http://www.graniteds.org">GraniteDS</a>. The most noteworthy reason of using AIR to create mobile applications is of course the <a href="http://lsd.luminis.eu/introduction-to-air-for-mobile/">multi-platform deployment using a single codebase</a>. Furthermore, with Granite you are able to disclose the services of an existing Java backend to a mobile platform without significant changes to the backend. This offers great potential for enterprises who are struggling with the fragmented mobile market and don’t want to completely rewrite their existing Java backend.</p>
<p>I will assume you have some familiarity with AIR for mobile and Granite. It’s mostly the same as for Flex but there are some things you have to take into account.</p>
<h3>1. Get the right version of Granite</h3>
<p>The latest version of Granite is 2.2.1 GA. However, in the most recent version of AIR and Flex Adobe made some changes in the API which breaks backwards compatibility for some features of Granite. Therefore this release of Granite won’t work using the newest SDK. Refer to <a href="https://groups.google.com/d/msg/graniteds/1avtq0rXezU/0JPcX0wTTWYJ">this post on the Granite form</a> for more info on how to make these changes yourself. If you don’t want be bothered with building Granite yourself just download <a href="http://lsd.luminis.eu/wp-content/uploads/2011/09/graniteds-mobile-air.zip">this version of GraniteDS</a> to get started immediately.</p>
<h3>2. Connecting to the right server</h3>
<p>A problem for AIR applications in general (both desktop and mobile) is setting the right server settings. It is quite simple when running within the browser: The server address is changed with a single reconfiguration of the swf-file and all clients are using the new address on a browser refresh. With AIR it is a bit different and you&#8217;re not always at liberty to ‘hardcode’ the service settings in the AIR distribution package.<br />
Granite offers a method for dynamic server configuration using the server initializer component:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">Tide.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addComponentWithFactory</span><span style="color: #66cc66;">&#40;</span>
  <span style="color: #ff0000;">&quot;serviceInitializer&quot;</span>,
  DefaultServiceInitializer, <span style="color: #66cc66;">&#123;</span>
    contextRoot: <span style="color: #ff0000;">'/my-app'</span>,
    serverName: “10.0.0.1”,
    serverPort: “<span style="color: #cc66cc;">8080</span>”
<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Note that once a connection is made, it is not possible to reconnect with another configuration, because the service initializer is only used once. You have to restart the application to enable the new connection settings or reset Tide’s RemoteObject. Unfortunately Tide’s API doesn’t support this reset. I came up with a small workaround which requires you to extend the EJB class with an extra reset method with the following body:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Ejb <span style="color: #0066CC;">extends</span> org.<span style="color: #006600;">granite</span>.<span style="color: #006600;">tide</span>.<span style="color: #006600;">ejb</span>.<span style="color: #006600;">Ejb</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">/**
   * Reset the Tide Connection to allow new server settings
   */</span>
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> resetConnection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_ro<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      _ro.<span style="color: #006600;">disconnect</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    _ro = <span style="color: #000000; font-weight: bold;">null</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>This method resets Tide’s RemoteObject so the next remote call will force a reinitialization using the current settings of serviceInitializer. Refer to <a href="http://www.graniteds.org/jira/browse/GDS-913">Granite’s issue tracker</a> or <a href="https://groups.google.com/d/msg/graniteds/wITFxXyXTYw/3hMnwH76T6sJ">forum thread</a> for more details.</p>
<h3>3. Automatic logout</h3>
<p>Applications running on mobile platforms are always susceptible to unpredictable interruptions. For example when a phone call or text is received. Mobile AIR applications provide a <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/EventDispatcher.html#event:deactivate">deactivate event</a> which is dispatched when the application is halted somehow. The application I wrote was using Tide’s Identity class for user login. Therefore I added an event handler to automatically logout the user and push the LoginView on top of the navigator stack:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> deactivateHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>identity.<span style="color: #006600;">loggedIn</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    identity.<span style="color: #006600;">logout</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
  navigator.<span style="color: #006600;">popAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// Purge the navigator history to disable back button usage</span>
  navigator.<span style="color: #006600;">pushView</span><span style="color: #66cc66;">&#40;</span>LoginView<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>4. Build, build, build!</h3>
<p>This isn’t directly related to Granite or AIR for mobile. But since they can both be used for enterprise scale applications I thought I&#8217;d mention it shortly: Make sure you have a proper build script. Now, I’ve got an example from <a href="http://www.blackcj.com/blog/2011/04/04/ios-android-and-blackberry-in-a-single-click-with-ant/">Chris Black</a> which provides a good starting point. I’ve only added the metadata compiler options required for Tide and of course a reference to the Granite libraries and generated Actionscript classes.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mxmlc</span> ... <span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- .... --&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- location of generated as classes with gas3 --&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${gen.src.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;compiler.library-path</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${basedir}/libs&quot;</span> <span style="color: #000066;">append</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;granite-essentials.swc&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>   
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;granite.swc&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/compiler.library-path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Bindable&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ChangeEvent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Destroy&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Id&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;In&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Inject&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Managed&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ManagedEvent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Name&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;NonCommittingChangeEvent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Observer&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Out&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;PostConstruct&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Transient&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keep-as3-metadata</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Version&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/mxmlc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h3>One plus one</h3>
<p>I can imagine one must be thinking: ‘Everyone could have figured that out!’ And I totally agree, because that’s exactly what this article is about. With some experience with Flex, a developer can write a mobile application on top of a Java EE backend. It doesn’t take much to utilize an existing backend from a mobile platform. Since the latest release of AIR the performance for iOS and Android is pretty good and together with the <a href="http://www.granitedataservices.com/enterprise-platform-2011/">Granite Enterprise Platform</a> the barrier to emerge an enterprise application to a mobile platform has become much lower.</p>
]]></content:encoded>
			<wfw:commentRss>http://lsd.luminis.eu/graniteds-and-air-for-mobile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
