<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>Matthew Scott - code++</title>
	<link>http://blog.mattscott.net</link>
	<description>Developing An Easier World</description>
	<pubDate>Tue, 11 Nov 2008 15:42:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Creating Modular Flex Applications</title>
		<link>http://blog.mattscott.net/2008/05/04/creating-modular-flex-applications/</link>
		<comments>http://blog.mattscott.net/2008/05/04/creating-modular-flex-applications/#comments</comments>
		<pubDate>Sun, 04 May 2008 23:12:15 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.mattscott.net/2008/05/04/creating-modular-flex-applications/</guid>
		<description><![CDATA[&#160;
Recently as I continued my miserable everyday struggle with Flex and it&#8217;s incredibly slow IDE Flex Builder, I have made yet another discovery that of course is not documented about Flex. I am involved in building high end flash sites everyday and thus far on all of them I have created them as modular style Flex [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal">&nbsp;</p>
<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal"><font face="Calibri">Recently as I continued my miserable everyday struggle with Flex and it&#8217;s incredibly slow IDE Flex Builder, I have made yet another discovery that of course is not documented about Flex. I am involved in building high end flash sites everyday and thus far on all of them I have created them as modular style Flex applications using Flash to provide some very crafty assets. On one of the most recent sites I was working on I eventually ran into a huge problem.</font></p>
<p><strong><font face="Calibri">The Problem:<o></o></font></strong></p>
<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal"><font face="Calibri">The site had a major memory link throughout the modules. I had ultimately determined that this leak was caused by Flex&#8217;s mx.controls.VideoDisplay class since I use it in the majority of the modules of the site. The overall problem is that I couldn&#8217;t force the unloading of the modules while using the ModuleLoader class. Now this wouldn&#8217;t be that big of a deal because I could just not unload each module and instead let the ModuleLoader class retain each module&#8217;s instance in memory for later use when loaded again. Well here is where the next big problem came into play, for reasons I still haven&#8217;t pen pointed while sorting through the module system&#8217;s source code, the ModuleLoader class creates a new instance out of the loaded module every time you call it to be loaded and it does this with the assumption that the old module would always successfully unload first. This assumption has rendered the ModuleLoader class useless when you are experiencing a memory leak within a module that you cannot get rid of. What the result of this problem was is a high end flash site that perpetually grows in memory every time you visit a section of the website, regardless if you have already loaded it once. After browsing this site and hitting random sections for about 10 minutes this would bump Internet Explorer&#8217;s running RAM usage up to about 350 to 400 mbs which was clearly unacceptable for it would have kept climbing if I didn&#8217;t stop. Also to mention the many other problems this caused with reference less modules floating around in memory still doing their &#8220;own damn thing&#8221; as they please because they were attached to some globally controlled events.</font></p>
<p><strong><font face="Calibri">The Solution:<o></o></font></strong></p>
<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal"><font face="Calibri">As this major problem needed a solution and a solution quick I took full and manual control of the loading and handling of the modules by dropping the ModuleLoader class and using the ModuleManager class instead. This nifty class allows to you directly work with the IModuleInfo interface&#8217;s that handle the loading and creation of each module used. What I did with this was store a reference to the IModuleInfo instance for each module I loaded in an object using the module&#8217;s url as a key/value pair map. This way I could check the status of each module I was trying to load and create one and one instance only of each when it was loaded which I then stored the actual display objects generated from the IModuleInfo in a map of their own allowing me to call them up at anytime I needed to. My ending result was a website that took no more than 150 mbs in RAM once all the modules have been loaded once. Not to mention the performance increase as well when you aren&#8217;t recreating a new instance of a module every time you want to use it.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattscott.net/2008/05/04/creating-modular-flex-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex &#038; Flash &#124;&#124; Flex vs. Flash?</title>
		<link>http://blog.mattscott.net/2008/02/15/flex-flash-flex-vs-flash/</link>
		<comments>http://blog.mattscott.net/2008/02/15/flex-flash-flex-vs-flash/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 02:54:34 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.mattscott.net/2008/03/03/flex-flash-flex-vs-flash/</guid>
		<description><![CDATA[&#160;
I found myself asking the same question over and over lately as I get in to doing more full flash sites. Why is it that there has to be so many differences in the way that Flex and Flash operate and operate together at that. At the moment I will always choose Flex before flash [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in 0in 10pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal"><font face="Calibri">I found myself asking the same question over and over lately as I get in to doing more full flash sites. Why is it that there has to be so many differences in the way that Flex and Flash operate and operate together at that. At the moment I will always choose Flex before flash for building full flash sites because of the ease of use it provides when it comes to fluid layouts and other such handy containers and controls. If things like the Box class which is a super class to the HBox and VBox classes were available for use in Flash CS3 then the layout of Flash sites would not be near as difficult.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattscott.net/2008/02/15/flex-flash-flex-vs-flash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RemoteObject for Flash CS3</title>
		<link>http://blog.mattscott.net/2008/02/10/remoteobject-for-flash-cs3/</link>
		<comments>http://blog.mattscott.net/2008/02/10/remoteobject-for-flash-cs3/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 21:53:57 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.mattscott.net/2008/03/02/remoteobject-for-flash-cs3/</guid>
		<description><![CDATA[&#160;
Like a few other people I found myself dealing with the headache of transition to Flash CS3 applications from Flex every now and again and the one thing that gives me the most trouble is not having the same ActionScript 3 wrappers in Flash CS3 that I do in Flex such as the RemoteObject class [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in 0in 10pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0in 0in 10pt; text-indent: 0.5in" class="MsoNormal"><font face="Calibri">Like a few other people I found myself dealing with the headache of transition to Flash CS3 applications from Flex every now and again and the one thing that gives me the most trouble is not having the same ActionScript 3 wrappers in Flash CS3 that I do in Flex such as the RemoteObject class for server remoting. There have been a few semi easy frameworks created out there for enabling this type of functionality in Flash CS3 but they just didn&#8217;t meet my standards so I wrote one that mirrors the functionality of the RemoteObject class in Flex to a basic level. It is a basic and easy to use wrapper for the NetConnection class in ActionScript 3. You may use the documentation provided by Adobe for Flex 3 Language Reference for the RemoteObject class to better understand this wrapper.</font></p>
<p><o></o></p>
<p style="margin: 0in 0in 10pt" class="MsoNormal"><font face="Calibri">You may download this package <a href="http://blog.mattscott.net/wp-content/uploads/2008/03/remoteobject.zip" title="Flash CS3 RemoteObject">here</a>.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mattscott.net/2008/02/10/remoteobject-for-flash-cs3/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
