<?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>digitaldogbyte.com &#187; code generation</title>
	<atom:link href="http://www.digitaldogbyte.com/tag/code-generation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitaldogbyte.com</link>
	<description>powered by kilobits n' bytes</description>
	<lastBuildDate>Sat, 16 Jul 2011 03:01:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>UML &amp; ActionScript 3.0 Code Generation</title>
		<link>http://www.digitaldogbyte.com/2008/02/18/uml-actionscript-30-code-generation/</link>
		<comments>http://www.digitaldogbyte.com/2008/02/18/uml-actionscript-30-code-generation/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 03:34:01 +0000</pubDate>
		<dc:creator>Herm Wong</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[code generation]]></category>
		<category><![CDATA[UML]]></category>

		<guid isPermaLink="false">http://www.digitaldogbyte.com/?p=3</guid>
		<description><![CDATA[I&#8217;m currently architecting an ActionScript 3.0 Framework that will take advantage of OOP principles &#38; a MVC design pattern. In an attempt to automate as much of the work as possible, I started looking for tools that could generate AS3.0 code from UML diagrams. I found an excellent blog post by Sean Moore, with a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently architecting an ActionScript 3.0 Framework that will take advantage of OOP principles &amp; a MVC design pattern.</p>
<p>In an attempt to automate as much of the work as possible, I started looking for tools that could generate AS3.0 code from UML diagrams. I found an excellent <a href="http://seantheflashguy.com/blog/2007/11/20/actionscript-30-uml-and-code-generation-tools/" target="_blank" title="ActionScript 3.0 UML and Code Generation Tools">blog post</a> by Sean Moore, with a listing of several UML diagramming tools with AS3.0 code generation.</p>
<p>I decided to use <a href="http://staruml.sourceforge.net/en/download.php" target="_blank" title="Download StarUML">StarUML</a>, which was mentioned in one of the comments. To enable AS3.0 code generation in StarUML, you will need to <a href="http://www.flashfocus.nl/forum/showthread.php?t=37074" title="Download AS3.zip">download the AS3.zip</a> file &amp; then copy the contents of the AS3.zip file to this directory location C:\Program Files\StarUML\modules\staruml-generator\templates\.</p>
<p>The template.cot file is a JavaScript file that StarUML uses to generate the AS3.0 code. I noticed that the AS3.0 code being generated did not include the package namespace of the parent class or the implemented interfaces, so I modified the template.cot file so that it generates the import statements of the missing namespaces. My colleague also made some revisions to the template.cot file so that it would not include the access control modifiers for the operations created in the interface AS files.</p>
<p>To install the modified template.cot file you can simply overwrite the C:\Program Files\StarUML\modules\staruml-generator\templates\AS3 folder with the contents of this <a href="http://www.digitaldogbyte.com/downloads/AS3.zip" title="Modified AS3.zip">AS3.zip</a> file.</p>
<p>Here are the steps that you&#8217;ll need to follow to generate the AS3.0 code once you have the AS3.zip contents installed.</p>
<p>1. When you start StarUML, it will ask you for the approach you wish to use. Leave it as Default Approach and press OK.</p>
<p><img src="/images/staruml_as3/staruml_as3_01.jpg" /></p>
<p>2. Once you have created your UML diagrams and want to generate the AS3.0 code, go to the Tools menu and select &#8220;StartUML Generator &#8230;&#8221;.</p>
<p><img src="/images/staruml_as3/staruml_as3_02.jpg" /></p>
<p>3. You will be presented with a dialog asking for the template type that StarUML should use for code generation; check the AS3.0 template and click Next.</p>
<p><img src="/images/staruml_as3/staruml_as3_03.jpg" /></p>
<p>4. Select the destination directory that StarUML will place the generated AS3.0 code and then press Next.</p>
<p><img src="/images/staruml_as3/staruml_as3_04.jpg" /></p>
<p>5. Press the Generate button to begin the code generation.</p>
<p><img src="/images/staruml_as3/staruml_as3_05.jpg" /></p>
<p>6. Presto! Code generation complete. Click on Finish and then go to the destination folder that you specified in Step 4 to view your results.</p>
<p><img src="/images/staruml_as3/staruml_as3_06.jpg" /></p>
<p>Here is a <a href="/downloads/staruml_as3_example.zip" title="StarUML Sample Files">sample project</a> that I created that you can use as a starting reference point.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitaldogbyte.com/2008/02/18/uml-actionscript-30-code-generation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

