<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Software Voices - Generative programming</title>
    <link>http://www.softwarevoices.com/</link>
    <description>Perspectives from commercial developers of consumer software</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0 - http://www.s9y.org/</generator>
    <pubDate>Tue, 15 Aug 2006 18:38:41 GMT</pubDate>

    <image>
        <url>http://www.softwarevoices.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Software Voices - Generative programming - Perspectives from commercial developers of consumer software</title>
        <link>http://www.softwarevoices.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Steve Kelley Heart Model-to-model Transforms ... Not</title>
    <link>http://www.softwarevoices.com/archives/49-Steve-Kelley-Heart-Model-to-model-Transforms-...-Not.html</link>
            <category>Generative programming</category>
    
    <comments>http://www.softwarevoices.com/archives/49-Steve-Kelley-Heart-Model-to-model-Transforms-...-Not.html#comments</comments>
    <wfw:comment>http://www.softwarevoices.com/wfwcomment.php?cid=49</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://www.softwarevoices.com/rss.php?version=2.0&amp;type=comments&amp;cid=49</wfw:commentRss>
    

    <author>nospam@example.com (Jollymorphic)</author>
    <content:encoded>
    A short while ago, I posted an &lt;a href=&quot;http://www.softwarevoices.com/archives/42-Out-of-one-tyranny,-into-the-next.html&quot;&gt;article&lt;/a&gt; here arguing that model-to-model transformations (or rather, modularity features based on them) are necessary to escape a new &quot;tyranny of the dominant decomposition&quot; in model-driven programming.  Well, what should arrive in my electronic mailbox a few days ago but a newsletter from &lt;a href=&quot;http://www.metacase.com/&quot;&gt;MetaCase&lt;/a&gt; wherein the first big headline reads, provocatively, &quot;Model-To-Model Transformations: A Recipe for Trouble.&quot;  Oh my!&lt;br /&gt;
&lt;p&gt;The newsletter links to an &lt;a href=&quot;http://www.codegeneration.net/tiki-read_article.php?articleId=81&amp;PHPSESSID=0e57f1674ef1623769492bd0accd26c7&quot;&gt;article&lt;/a&gt; posted a couple of months ago by &lt;a href=&quot;http://www.metacase.com/blogs/stevek/blogView&quot;&gt;Steve Kelley&lt;/a&gt; on the &lt;a href=&quot;http://www.codegeneration.net/tiki-index.php&quot;&gt;Code Generation Network&lt;/a&gt; site.  In a nutshell, Kelley argues &quot;[o]ur experience is that it is better that generators produce code directly, rather than producing intermediate models that you need to extend during the development process.&quot;  He has a lot more to say than this, of course, and the whole editorial is definitely worth your time.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Whole Article&lt;/h3&gt;&lt;br /&gt;
He spends some time laying out the benefits of code generation for product line development (though he distinguishes this from a one-off project, where &quot;the payback may be little greater than the effort required to automate&quot;).  And he explains why a UML-based approach, or one based on any &quot;general-purpose design language&quot; for that matter, is doomed to the same fate as those products of yesteryear that have &quot;taught many developers to look at code generators with suspicion.&quot;  He argues that only domain-specific languages created by a product line&#039;s architects themselves can appropriately model features of the domain and serve as a basis for handcraft-quality code generation:&lt;br /&gt;
&lt;blockquote&gt;If we wish to raise the abstraction level beyond code, yet still be able to generate fully working code, going domain-specific is the only alternative....  Despite the existence of multiple ways to write code for a certain behavior, vendors usually choose just one of them, which is unlikely the ideal candidate for your specific contingency....  Third-party generators often don&#039;t know enough about an organization&#039;s specific requirements to generate ideal code, so it is not surprising that many have found generated code unsatisfactory.&lt;/blockquote&gt;Kelley then advocates simplicity as a central principle in the development of code generators based on domain-specific models.  &quot;The simpler they are to start with, the simpler it will be to make changes to them later.&quot;  He discusses ways of keeping generators simple (depend on model validation rather than validating input, isolate repeating code patterns into libraries), and he prescribes the use of &quot;a good reference implementation&quot; as a starting point for implementing any model-to-code transformation.  All of this is quite useful and appropriate advice for those using the current generation of tools, and there are many people exploring or working in this blossoming field who would doubtless benefit greatly from it.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Night and Day&lt;/h3&gt;&lt;br /&gt;
As it turns out, though, our seemingly conflicting points of view amount to apples and oranges.  Because when Kelley talks about model-to-model transformations, he&#039;s talking about a different way of automating software development than I am.  He&#039;s talking about a user-modified, bidirectional train wreck that we both find repugnant, and for the same reasons:&lt;br /&gt;
&lt;blockquote&gt;Normally, the idea of model-to-model transformation is that each piece of data in the high-level language gets transformed to more than one piece of data in the lower-level language (let&#039;s say 2 pieces).&lt;/blockquote&gt;We&#039;ve already parted ways here, by the way, as this passage describes the primary purpose of model-to-model transformations as the generation of lower-level models; a strictly downward-directed process.  The kinds of technologies I highlight in my post are concerned with transformations in any direction, and most of the examples are horizontal, not vertical.  I want a modularity strategy for transformations to be just as general as the modularity I&#039;ve enjoyed in OOP languages, which have allowed me to gracefully model relationships that are horizontal, vertical, and everything &quot;in between.&quot;&lt;br /&gt;
&lt;blockquote&gt;This is fine if you never (or rarely) look at the low-level language, and never (or very rarely) edit it. But if you decide to edit it, you are then working with two pieces of data, but clearly they are not totally independent, since they could be produced from one piece. The result of this is that any changes to the higher level would need to map those changes back to lower levels too.&lt;br /&gt;&lt;br /&gt;
Often people say next &quot;and we want to be able to change the high-level models still, and have those changes reflected in the low level models&quot;. That means you are working with 1+2 pieces of information, plus that you need to come up with some way to propagate the changes down to the low-level models correctly. &quot;Correctly&quot; here means: without destroying information manually added to those low-level models; updating the automatically generated parts; creating new generated parts; updating manually added parts to reflect changes in the top-level models (e.g. if the manually added part refers to the name of an element originally from the high level model, and that element&#039;s name has now been changed).&lt;/blockquote&gt;Horrors, indeed!  A setup like this violates a critical characteristic of successful generative methods: the inviolate nature of generated artifacts.  Kelley briefly mentions an example of this characteristic elsewhere in his article, saying, &quot;A DSM generator[&#039;s] output will not normally be edited  or even checked  by hand.&quot;  So, of course, he finds such approaches untenable, as do I.&lt;br /&gt;
&lt;p&gt;If this reflects, as Kelley suggests, the current state of the art in model-to-model transformations, I&#039;d be sad but not surprised.  But I&#039;m also hopeful and eager for the long-term potential presented by some of the technologies currently being nurtured academically.&lt;br /&gt;
&lt;p&gt;And lest you thought Mr. Kelley&#039;s customers stopped there, &lt;em&gt;there&#039;s more...&lt;/em&gt;&lt;br /&gt;
&lt;blockquote&gt;And next, people say &quot;and we want to be able to change the low-level models, and have the high-level models update&quot;. This is even harder.&lt;/blockquote&gt;&lt;strong&gt;I&#039;LL SAY IT IS!&lt;/strong&gt;  Now my earlier sadness has shifted focus from the model business to its customers.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;br /&gt;
Obviously, Kelley and I are talking about different things.  He&#039;s looking at current practice, particularly people who &lt;em&gt;think&lt;/em&gt; they want &quot;model-to-model transformations,&quot; and he&#039;s rightly turning up his nose.  What I&#039;m interested in, on the other hand, are ways of modularizing this new abstraction layer bestowed upon us by generative and model-driven programming, so as to achieve leverage in ways analogous to those with which I&#039;ve been successful using currently popular programming methods.  I think the best way to do this in the new world is the same as the best way in the old: separation of concerns.  And I think those concerns have to be realized in a way that cross-cuts implementations.  The kinds of designs that can accomplish this tend to use model-to-model transformations, but they don&#039;t use them like code generators.  Rather, they generate &quot;intermediate build products&quot; (in terms of current tooling nomenclature) that are inherently inviolate and of interest only to the development software itself, not to humans.&lt;br /&gt;
&lt;p&gt;The only other way in which Kelley&#039;s post can be said to clash with mine is in his emphasis on &quot;[k]eep[ing] it simple&quot; when it comes to transformations in general.  He and I agree that small, domain-specific models yield the best results.  But because of his (and our) bad experiences with CASE technologies and their putrid generated code, he emphasizes the simulation of handcraft as a dominant theme in the design of transformations, proclaiming that ideal generated code &quot;gives a good impression, as it looks familiar, follows the required programming mode, includes appropriate comments and follows the local standards for coding style.&quot;  And this emphasis leads straight to simple, reference-implementation-based transformations.  Naturally!&lt;br /&gt;
&lt;p&gt;But I&#039;m focused on the wider, future potential offered by this new abstraction layer, and the types of modularization of models I&#039;ve &lt;em&gt;already&lt;/em&gt; found that I need, and I see way more powerful ways to automate than the methods undertaken by the people Kelley is talking to.  I&#039;m even willing to sacrifice a little quality in the code that&#039;s ultimately generated, at least in the short term, to get there.  Some may argue that more than a little quality loss must inherently follow from such flights of abstraction, but I disagree.  Sure, we went through an era of Visual BASIC p-code before arriving at &lt;a href=&quot;http://en.wikipedia.org/wiki/Just_In_Time_compilation&quot;&gt;JIT&lt;/a&gt;s, but now &lt;a href=&quot;http://channel9.msdn.com/Showpost.aspx?postid=20487&quot;&gt;everything&#039;s copacetic&lt;/a&gt;.  The problems that need to be solved may be more abstract than those that came before, but I think they&#039;re tractable, and I look forward to seeing how people do it. 
    </content:encoded>

    <pubDate>Tue, 15 Aug 2006 01:04:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.softwarevoices.com/archives/49-guid.html</guid>
    
</item>
<item>
    <title>Out of one tyranny, into the next</title>
    <link>http://www.softwarevoices.com/archives/42-Out-of-one-tyranny,-into-the-next.html</link>
            <category>Generative programming</category>
    
    <comments>http://www.softwarevoices.com/archives/42-Out-of-one-tyranny,-into-the-next.html#comments</comments>
    <wfw:comment>http://www.softwarevoices.com/wfwcomment.php?cid=42</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.softwarevoices.com/rss.php?version=2.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    

    <author>nospam@example.com (Jollymorphic)</author>
    <content:encoded>
    Among the papers related to generative and model-driven programming I&#039;ve read over the last couple of years, one old favorite is &lt;a href=&quot;http://www.sciencedirect.com/science?_ob=ArticleURL&amp;_udi=B75H1-4FW5VYY-3&amp;_coverDate=04%2F11%2F2005&amp;_alid=421277399&amp;_rdoc=1&amp;_fmt=&amp;_orig=search&amp;_qd=1&amp;_cdi=13109&amp;_sort=d&amp;view=c&amp;_acct=C000050221&amp;_version=1&amp;_urlVersion=0&amp;_userid=10&amp;md5=97f312f268c78d6d9f49bfca1b4bf72d&quot;&gt;The Side Transformation Pattern - making transforms modular and re-usable&lt;/a&gt; by Edward Willink (the &lt;a href=&quot;http://www.computing.surrey.ac.uk/research/dsrg/fog/&quot;&gt;FOG&lt;/a&gt; guy) and Phillip Harris.  The full text is no longer available for free on-line, unfortunately, so I&#039;ll attempt to summarize, quoting the authors:&lt;br /&gt;
&lt;blockquote&gt;Transformation is often presented as a complete activity.  This impression is particularly prevalent in today&#039;s &quot;MDA-compliant&quot; tools, which perform a one-stage rewrite of source ... concepts.  Such an approach ... offers little opportunity for evolution through progressive transformation.&lt;br /&gt;&lt;br /&gt;Where a single stage approach satisfies the user&#039;s requirements, it can offer dramatic improvements in productivity, for example in code generator templates that produce Java or C++ source text directly from UML graphical models. Too often however, the one-stage approach inhibits a proper separation of different programming concerns.  The result is a lack of flexibility and visibility in the transformation process, leading to poor opportunities for enhancement or re-use.&lt;/blockquote&gt;They may be talking about &lt;a href=&quot;http://en.wikipedia.org/wiki/Model-driven_architecture&quot;&gt;MDA&lt;/a&gt;, but what they&#039;re saying applies equally to almost every tool in this field and most of the projects in development.  The &lt;a href=&quot;http://www.metacase.com/&quot;&gt;commercial&lt;/a&gt; &lt;a href=&quot;http://msdn.microsoft.com/vstudio/teamsystem/workshop/sf/default.aspx&quot;&gt;tools&lt;/a&gt;, in particular, seem to concentrate most of their design efforts on graphical model editors, and they treat the actual generation of artifacts as a simple, one-stage process, usually taking the form of text template languages.  If you&#039;re lucky, they may incorporate some other rudimentary features, like model validation and repositories.&lt;br /&gt;
&lt;p&gt;This insight into the inadequacy of current approaches is valuable enough on its own, but the really beautiful thing about this paper is that it&#039;s a &lt;em&gt;pattern paper&lt;/em&gt;.  It presents a solution (or, at least, a part of a solution) in the form of an easily understood, straightforwardly replicated design pattern.  How many pattern papers do you see for implementors of these kinds of tools?  This is the only one I&#039;m aware of.&lt;br /&gt;
&lt;blockquote&gt;We therefore look to an approach that involves many small transformations, each dealing with a single aspect of the problem, such that relevant transformations extracted from a large library of re-usable transformations can be exploited to build an apparently custom composite with few truly custom contributions.&lt;/blockquote&gt;They&#039;re talking about leverage in the implementation of the application development tools themselves, here (the &quot;factory,&quot; in Microsoft&#039;s lingo), not just the applications they produce.  And they&#039;re achieving it through modularity and &lt;a href=&quot;http://en.wikipedia.org/wiki/Aspect_%28computer_science%29&quot;&gt;aspectual decomposition&lt;/a&gt;.&lt;br /&gt;
&lt;p&gt;The authors go on to propose a pattern for the modularization of transforms involving forking and merging models, and they demonstrate the pattern in a few credible examples, including the addition of type inference constraints to a model and the insertion of synchronization barriers in a flow graph.  The examples are concrete.  The benefit they convey is tangible.&lt;br /&gt;
&lt;p&gt;Are these guys (and some other folks I&#039;ll get to) onto something?  Is &quot;separation of different concerns[,] ... flexibility and visibility&quot; valuable enough to invest so much in transformation?  More after the fold. &lt;br /&gt;&lt;a href=&quot;http://www.softwarevoices.com/archives/42-Out-of-one-tyranny,-into-the-next.html#extended&quot;&gt;Continue reading &quot;Out of one tyranny, into the next&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 28 Jul 2006 05:50:00 -0500</pubDate>
    <guid isPermaLink="false">http://www.softwarevoices.com/archives/42-guid.html</guid>
    <category>transformation</category>

</item>
<item>
    <title>Chapter 11 is bankrupt</title>
    <link>http://www.softwarevoices.com/archives/9-Chapter-11-is-bankrupt.html</link>
            <category>Generative programming</category>
    
    <comments>http://www.softwarevoices.com/archives/9-Chapter-11-is-bankrupt.html#comments</comments>
    <wfw:comment>http://www.softwarevoices.com/wfwcomment.php?cid=9</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.softwarevoices.com/rss.php?version=2.0&amp;type=comments&amp;cid=9</wfw:commentRss>
    

    <author>nospam@example.com (Jollymorphic)</author>
    <content:encoded>
    For those, like Craig, slogging through the &lt;a href=&quot;http://www.amazon.com/exec/obidos/tg/detail/-/0471202843/102-2673664-5098566?v=glance&quot;&gt;Software Factories&lt;/a&gt; book, a warning:  &lt;em&gt;SKIP CHAPTER 11.&lt;/em&gt;&lt;br /&gt;
&lt;p&gt;The entire chapter is one long, unrelenting series of process diagrams describing, in dreary and repetitive detail, every possible step along the manifold path from requirements to delivery.  It&#039;s like the &quot;begats&quot; in the Old Testament.&lt;br /&gt;
&lt;p&gt;I was pretty excited to be making the progress I was up to that point -- having two small children and a job, the only reading I get done on any given day is usually about two pages in the bathroom before the rest of the family wakes up -- and then came &lt;em&gt;Chapter 11&lt;/em&gt;.  Since I generally don&#039;t skip around in books (including skipping the details of diagrams, which are chock-a-block in this chapter), I felt I had to just square my shoulders and get through it.&lt;br /&gt;
&lt;p&gt;But it was like walking into quicksand.  And when I finally, finally crossed the finish line, I was quite disappointed with the quantity of edification gained versus the cost.  As the authors themselves indicate, no project will ever need to take &lt;em&gt;every one&lt;/em&gt; of these steps.  I picture the author, slogging day after day, himself, to commit &lt;em&gt;all the possibilities&lt;/em&gt; into copy after copy of his Visio diagrams, brainstorming at every step to make sure that &lt;em&gt;every possibility is covered&lt;/em&gt;.  Perhaps, at the end, he read the results from start to finish, maybe recognizing what a trainwreck the whole thing turned out to be.  &quot;Should I abandon it?  Not after all that work!  Reduce?  Summarize?  Ditto.&quot;  So in it went.&lt;br /&gt;
&lt;p&gt;The kind of tedium Craig complains of in this book is, in my opinion, a common phenomenon among technical books that focus more on the information than the reader.  Some authors manage to do an excellent job of servicing both viewpoints, and kudos to them.  But most tend to fall on one side of the scale or the other, and this chapter is an extreme example of the &quot;information dump&quot; approach to pedagogy.&lt;br /&gt;
&lt;p&gt;On the other hand, I&#039;ve been back on track with the book since then, and I&#039;m finding it quite interesting again.  I mean, it ain&#039;t The Great Gatsby, but it &lt;em&gt;is&lt;/em&gt; clearly the product of a great deal of thinking and experimentation in this vital arena by a set of guys who have been at the center of things and have plenty to report.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;p&gt;EDIT:  Looking again at the chapter in question, I am reminded that there is a worthwhile interlude, near the beginning, wherein the authors explore the &lt;a href=&quot;http://www.amazon.com/exec/obidos/ASIN/0201309777/ref=nosim/edazzlenet-20/102-2673664-5098566?dev-t=08FC0AFA9SSP0BEHY8G2&quot;&gt;black &amp;amp; white&lt;/a&gt; guys&#039; latest feature diagram work (the stuff that includes &lt;a href=&quot;http://www.swen.uwaterloo.ca/~kczarnec/etx04.pdf&quot;&gt;cardinality&lt;/a&gt; &lt;small&gt;&lt;small&gt;(PDF)&lt;/small&gt;&lt;/small&gt;), which is definitely worth catching.  Indeed, the further I progressed through the book before this point, the more miffed I was that they hadn&#039;t talked about feature diagrams yet. 
    </content:encoded>

    <pubDate>Fri, 09 Sep 2005 23:08:43 -0500</pubDate>
    <guid isPermaLink="false">http://www.softwarevoices.com/archives/9-guid.html</guid>
    
</item>
<item>
    <title>InfoPath + XSLT = poor mans language workbench</title>
    <link>http://www.softwarevoices.com/archives/7-InfoPath-+-XSLT-poor-mans-language-workbench.html</link>
            <category>Generative programming</category>
    
    <comments>http://www.softwarevoices.com/archives/7-InfoPath-+-XSLT-poor-mans-language-workbench.html#comments</comments>
    <wfw:comment>http://www.softwarevoices.com/wfwcomment.php?cid=7</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.softwarevoices.com/rss.php?version=2.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    

    <author>nospam@example.com (Jollymorphic)</author>
    <content:encoded>
    If you havent read Martin Fowlers article on domain-specific languages (DSLs) and &lt;a href=&quot;http://www.martinfowler.com/articles/languageWorkbench.html&quot;&gt;language workbenches&lt;/a&gt;, then a fog of ignorance hovers over you like the miasma ever poised above Pigpens head.  Mad props to The Martin (and &lt;a href=&quot;http://martinfowler.com/bliki/Broken.html&quot;&gt;get well soon&lt;/a&gt;):&lt;br /&gt;
&lt;blockquote&gt;For a long time there&#039;s been a style of software development that seeks to describe software systems using a collection of domain specific languages. You see this in the Unix tradition of &#039;little languages&#039; which generate code via lex and yacc; you see it in the Lisp community with languages developed inside Lisp, often with the help of Lisp&#039;s macros. Such approaches are much liked by their advocates, but this style of thinking hasn&#039;t caught on as much as many of these  people would like.&lt;br /&gt;
&lt;p&gt;In the last few years there&#039;s been an attempt to support this style of development through a new class of software tool. The earliest and best known of these is Intentional Programming - originally developed by Charles Simonyi while at Microsoft. However there are other people doing similar things too, generating enough momentum to create some interest in this approach.&lt;/blockquote&gt;&lt;br /&gt;
Exciting possibilities abound for the forward-thinking developer, as youll see when you read Fowlers article, but almost all of the tools youll want to explore are, as of yet, still in development.  Without tools, the whole thing looks way too expensive to be realistic.  So whats an architect to do? &lt;br /&gt;&lt;a href=&quot;http://www.softwarevoices.com/archives/7-InfoPath-+-XSLT-poor-mans-language-workbench.html#extended&quot;&gt;Continue reading &quot;InfoPath + XSLT = poor mans language workbench&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 18 Aug 2005 22:02:20 -0500</pubDate>
    <guid isPermaLink="false">http://www.softwarevoices.com/archives/7-guid.html</guid>
    <category>infopath</category>
<category>language oriented programming</category>
<category>language workbenches</category>
<category>xslt</category>

</item>

</channel>
</rss>