<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Unable to access /var/www/html/rogue-development/blog2/wp-content/advanced-cache.php in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Warning</b>:  include(/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Notice</b>:  add_option was called with an argument that is <strong>deprecated</strong> since version 2.3 with no alternative available. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3468</b><br />
<br />
<b>Notice</b>:  register_sidebar_widget is <strong>deprecated</strong> since version 2.8! Use wp_register_sidebar_widget() instead. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3382</b><br />
<br />
<b>Notice</b>:  register_widget_control is <strong>deprecated</strong> since version 2.8! Use wp_register_widget_control() instead. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3382</b><br />
<?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>Marc's Musings &#187; catalyst</title>
	<atom:link href="http://www.rogue-development.com/blog2/category/catalyst/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rogue-development.com/blog2</link>
	<description>Comments and thoughts on technology from Marc Hughes</description>
	<lastBuildDate>Tue, 29 Mar 2011 00:04:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Why I like my proposed catalyst workflow</title>
		<link>http://www.rogue-development.com/blog2/2009/06/why-i-like-my-proposed-catalyst-workflow/</link>
		<comments>http://www.rogue-development.com/blog2/2009/06/why-i-like-my-proposed-catalyst-workflow/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 14:39:25 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[catalyst]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=488</guid>
		<description><![CDATA[I&#8217;ve been an advocate of compiling from Catalyst to a swc in a two previous blog posts.  (A Flash Catalyst / Builder workflow method , Compiling FXP-&#62;SWC, a Catalyst workflow) I&#8217;m hoping to explain why I prefer that workflow here.  With big pretty pictures! First, let us look at the catalyst workflow that&#8217;s been all [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been an advocate of compiling from Catalyst to a swc in a two previous blog posts.  (<a title="Permanent Link to &quot;A Flash Catalyst / Builder workflow method&quot;" rel="bookmark" href="../2009/06/a-flash-catalyst-builder-workflow-method/">A Flash Catalyst / Builder workflow method</a> , <a title="Permanent Link to &quot;Compiling FXP-&gt;SWC, a Catalyst workflow&quot;" rel="bookmark" href="../2009/06/compiling-fxp-swc-a-catalyst-workflow/">Compiling FXP-&gt;SWC, a Catalyst workflow</a>) I&#8217;m hoping to explain why I prefer that workflow here.  With big pretty pictures!</p>
<p>First, let us look at the catalyst workflow that&#8217;s been all the rage in the demos online that introduce catalyst (<a href="http://gotoandlearn.com/">like this one</a>).  Refer to the diagram below.</p>
<p><img class="alignnone size-full wp-image-489" title="workflow1" src="http://www.rogue-development.com/blog2/wp-content/uploads/2009/06/workflow1.png" alt="workflow1" width="639" height="500" /></p>
<p>Pros:</p>
<ul>
<li>Super simple</li>
</ul>
<p>Cons:</p>
<ul>
<li>Limited to one designer and one developer</li>
<li>Limited to a single catalyst project</li>
<li>Developer can&#8217;t start until designer is finished</li>
<li>Once the designer has handed off the file, they can&#8217;t make edits.</li>
</ul>
<p>If your software development process can handle those cons, this &#8220;super simple&#8221; option will rock for you.  But for anything beyond the most trivial of projects, those restrictions will be a deal breaker.  I consider this workflow similar to editing Actionscript in keyframes on the timeline in Flash.  It works, it&#8217;s simple, sometimes it might be the right way of doing things, but most of the time it&#8217;s like shooting yourself in the foot.</p>
<p>Something that hasn&#8217;t been as widely discussed, but that is still part of the official offering from Adobe goes something like this diagram:</p>
<p><img class="alignnone size-full wp-image-490" title="workflow2" src="http://www.rogue-development.com/blog2/wp-content/uploads/2009/06/workflow2.png" alt="workflow2" width="638" height="817" /></p>
<p>In this scenario, the developer creates a plain old Flash Builder project.  While he&#8217;s doing that, the designer creates a .FXPL file.  The developer takes that .FXPL and imports it as a Flex <strong>Library</strong> project, which he then references from his main project.  (Just import the .fxpl like a .fxp, the correct type of project is auto-created) Later, the designer can make changes in Catalyst.  Then the designer exports a new .FXPL file and the developer can re-import it (re-import steps below).</p>
<p>Optionally, the developer can move the classes into a package structure inside Flash Builder.  If there will be more than a single .fxpl imported, this is required since there will be name conflicts.  Currently, the refactor in Flash Builder doesn&#8217;t work 100% for this as the skin references aren&#8217;t updated, hopefully that&#8217;s just a beta-bug and will be fixed.</p>
<p>This is a huge improvement over the previous workflow and will probably work out great for most people.</p>
<p>Pros:</p>
<ul>
<li>Developer and Designer time can overlap</li>
<li>You can have multiple designers and developers (by repeating that middle bit in the diagram</li>
<li>Can use a package structure</li>
<li>An &#8220;official&#8221; Adobe method</li>
</ul>
<p>Cons:</p>
<ul>
<li>Developer is not allowed to edit the Flex Library project that is imported, he can only use classes/assets from it in his main project.</li>
<li>Every time a new .FXPL comes out, the developer must (I bet some of this could be automated!):
<ol>
<li>Delete the current Flex Library project</li>
<li>Import the new .FXPL</li>
<li>Modify the main project to reference this newly imported project</li>
<li>Move the classes in the Flex Library project into a new package structure</li>
<li>Rebuild the swc</li>
<li>Rebuild the app</li>
</ol>
</li>
<li> Does not retain the Main class from catalyst, so all work must be done in sub-components</li>
</ul>
<p>That&#8217;s doing a lot better in the scalability department.  It&#8217;s doing a bit worse in the complexity department.</p>
<p>What if we could automate some of the process of turning a .FXPL into a .swc?  Or even better, what if we could turn a .FXP into a .swc?  Then we&#8217;d have something that looks very similar to the previous workflow, but with one important difference:</p>
<p><img class="alignnone size-full wp-image-491" title="workflow3" src="http://www.rogue-development.com/blog2/wp-content/uploads/2009/06/workflow3.png" alt="workflow3" width="627" height="822" /></p>
<p>Pros:</p>
<ul>
<li>Developer and Designer time can overlap</li>
<li>You can have multiple designers and developers</li>
<li>The script automatically converts the Main catalyst component from an Application object to a Group object so you can use it in your project.  (Coming Soon!  The next version of my script will)</li>
<li>Automatically uses a package structure</li>
</ul>
<p>Cons:</p>
<ul>
<li>Developer is not allowed to edit the Flex Library project that is imported, he can only use classes/assets from it in his main project. (But he only ever sees a swc now, so no worries)</li>
<li>Every time a new .FXP comes out, the developer must somehow get the new .swc (more on this below)</li>
<li>Requires a script to run (requiring whatever environment that script was written in)</li>
</ul>
<p>That may seem like a fairly minor difference, but imagine how much better it scales.</p>
<p>Instead of a single developer and a single designer, picture a whole team of them.  If every developer needs to go modify their workspace every time any designer makes a new .FXPL, they&#8217;ll end up spending too much of their time just managing their build environment.  The more people you add, the worse it gets.</p>
<p>If that script can be run through a command line script, it can be automated.</p>
<p>Most teams that consisting of more than a couple people use a version control system.  That system can be used to distribute .swcs that are generated from the catalyst projects.  Many version control systems have hooks integrated into them so they run a script whenever a certain file or directory is modified.  If yours doesn&#8217;t have than a simple scheduled job could do it.  This can simplify the process even further to:</p>
<ol>
<li>Designer checks .FXP into version control</li>
<li>Script runs, automatically generating the .swc</li>
<li>Developers sync up, getting the new .swc</li>
</ol>
<p>That means, once it&#8217;s set up there is <strong>no</strong> additional work that needs to be done.  The designer works in his tool.  The developer works in his.  Assets are magically propogated.</p>
<p>If you don&#8217;t use a version control system, scheduled jobs and a shared network folder could do the same thing.</p>
<p>This solves the scalability problem.</p>
<p><img class="alignnone size-full wp-image-492" title="workflow4" src="http://www.rogue-development.com/blog2/wp-content/uploads/2009/06/workflow4.png" alt="workflow4" width="394" height="774" /></p>
<p>All that is good-and-well, but that script to generate the .swcs must be awfully hard to do, right?  Wrong.  It was easy.  It&#8217;s done.  Go give it a try.</p>
<p><a href="http://www.rogue-development.com/blog2/2009/06/compiling-fxp-swc-a-catalyst-workflow/">Blog post describing the script</a>.<br />
Download: <a href="http://www.rogue-development.com/uploads/fxp2swc.rb">fxp2swc.rb </a></p>
<p>Any windows based Ruby developers want to take a crack at updating the script to work correctly on windows?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rogue-development.com/blog2/2009/06/why-i-like-my-proposed-catalyst-workflow/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Compiling FXP-&gt;SWC, a Catalyst workflow</title>
		<link>http://www.rogue-development.com/blog2/2009/06/compiling-fxp-swc-a-catalyst-workflow/</link>
		<comments>http://www.rogue-development.com/blog2/2009/06/compiling-fxp-swc-a-catalyst-workflow/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:59:59 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[catalyst]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=466</guid>
		<description><![CDATA[The other day, I blogged about an alternate workflow to Catalyst. It was somewhat confusing with a few steps involved. Towards the end of the post I had a couple wishes including: Let me select a package that components get created in. Export a swc with everything in it so we don’t have to go [...]]]></description>
			<content:encoded><![CDATA[<p>The other day, I blogged about <a href="http://www.rogue-development.com/blog2/2009/06/a-flash-catalyst-builder-workflow-method/">an alternate workflow to Catalyst</a>.  It was somewhat confusing with a few steps involved.  Towards the end of the post I had a couple wishes including:</p>
<ol>
<li>Let me select a package that components get created in.</li>
<li>Export a swc with everything in it so we don’t have to go through most of this.</li>
</ol>
<p>Last night I wrote a ruby script capable of doing exactly those two things.  I call it <a href="http://www.rogue-development.com/uploads/fxp2swc.rb">fxp2swc.rb</a>.</p>
<p>Using the script is simple.  First open it up and set the two variables at the top.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="re1">@flex_dir</span> = <span class="st0">&quot;/Applications/Adobe<span class="es0">\\</span> Flash<span class="es0">\\</span> Builder<span class="es0">\\</span> Beta/sdks/4.0.0&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">@default_package</span> = <span class="st0">&quot;com.roguedevelopment.catalyst&quot;</span>;</div>
</li>
</ol>
</div>
<p>The flex_dir just tells the script where your Flex SDK is.  The default_package tells it what package you want your catalyst based components made in.</p>
<p>After you edit that, put the script in the same directory as your .fxp files.  Run the script and you should see output like this:</p>
<pre>$ ./fxp2swc.rb
=== FCTest.fxp
 Extracting to FCTest.fxp.tmp
 Creating directory FCTest.fxp.tmp/src/com
 Creating directory FCTest.fxp.tmp/src/com/roguedevelopment
 Creating directory FCTest.fxp.tmp/src/com/roguedevelopment/catalyst
 Creating directory FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Copying Main.mxml
 Copying FCTest.fxp.tmp/src/components/Background.mxml -&gt; FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Copying FCTest.fxp.tmp/src/components/CustomComponent1.mxml -&gt; FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Copying FCTest.fxp.tmp/src/components/LoginButton.mxml -&gt; FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Copying FCTest.fxp.tmp/src/components/LoginForm.mxml -&gt; FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Copying FCTest.fxp.tmp/src/components/TextInput1.mxml -&gt; FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest
 Removing old source locations
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/Background.mxml
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/CustomComponent1.mxml
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/LoginButton.mxml
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/LoginForm.mxml
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/Main.mxml
 Fixing package names in FCTest.fxp.tmp/src/com/roguedevelopment/catalyst/FCTest/TextInput1.mxml
 Creating swcconfig.xml
 Invoking compc -load-config+=swcconfig.xml
Loading configuration file /Applications/Adobe Flash Builder Beta/sdks/4.0.0/frameworks/flex-config.xml
Loading configuration file /Users/mhughes/Dropbox/fxg2swc/swcconfig.xml
/Users/mhughes/Dropbox/fxp2swc/FCTest.swc (1463574 bytes)
Deleting temp dir
Done!</pre>
<p>You now have a one .swc for every .fxp file!  As easy as that!</p>
<p>Take the swc, and plop it into the &#8220;libs&#8221; folder of you Flash Builder project, and you can start using the components from it.  They&#8217;ll be in a package that starts with your default_package variable and ends with the name of the .fxp you compiled.  So for my example FCTest.fxp, the package is: com.roguedevelopment.catalyst.FCTest</p>
<p>Here&#8217;s a quick example of what it looks like to use one of those components:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;utf-8&quot;</span><span class="re2">?&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;s:Application</span> <span class="re0">xmlns:fx</span>=<span class="st0">&quot;http://ns.adobe.com/mxml/2009&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="re0">xmlns:s</span>=<span class="st0">&quot;library://ns.adobe.com/flex/spark&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="re0">xmlns:mx</span>=<span class="st0">&quot;library://ns.adobe.com/flex/halo&quot;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;<span class="re0">minWidth</span>=<span class="st0">&quot;1024&quot;</span> <span class="re0">minHeight</span>=<span class="st0">&quot;768&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="re0">viewSourceURL</span>=<span class="st0">&quot;srcview/index.html&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="re0">xmlns:FCTest</span>=<span class="st0">&quot;com.roguedevelopment.catalyst.FCTest.*&quot;</span><span class="re2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;FCTest:Background</span> <span class="re0">verticalCenter</span>=<span class="st0">&quot;0&quot;</span> <span class="re0">horizontalCenter</span>=<span class="st0">&quot;0&quot;</span> <span class="re2">/&gt;</span></span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;/s:Application<span class="re2">&gt;</span></span></span></div>
</li>
</ol>
</div>
<p>You can still use the composition or inheritance methods of using those components that <a href="http://www.rogue-development.com/blog2/2009/06/a-flash-catalyst-builder-workflow-method/#useAssets">I blogged about</a> the other day.  Here&#8217;s an <a href="http://rogue-development.com/uploads/catalystWorkflow2/FCTest.html">example showing that with view-source enabled</a>.</p>
<p>I&#8217;m on OSX using Ruby v1.8.6 with this script.  Your mileage may vary on other platforms.  Two things that will likely need to change for Windows users:</p>
<ul>
<li> The compc call should use compc.exe</li>
<li>It uses the unzip command line utility, not sure if that&#8217;s a standard tool on Windows</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.rogue-development.com/blog2/2009/06/compiling-fxp-swc-a-catalyst-workflow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

