<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Tom Sugden</title>
      <link>http://blogs.adobe.com/tomsugden/</link>
      <description></description>
      <language>en</language>
      <copyright>Copyright 2010</copyright>
      <lastBuildDate>Fri, 16 Apr 2010 10:16:48 +0000</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=4.261</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
         <title>Optimizing the Flex DataGrid for Frequent Updates</title>
         <description><![CDATA[<p>The default behaviour of a Flex DataGrid is to redraw itself entirely when an item in its data provider changes. This makes good sense in some cases, since the item renderers might need to grow or shrink in response, but at other times it can be problematic. If subsets of the data provider change frequently, like in a real-time price grid, excessive redrawing and increased CPU can occur. This blog post explains a simple technique for overriding the default behaviour to support frequent updates with reduced CPU.</p>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2010/04/optimizing_the_flex_datagrid_f.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2010/04/optimizing_the_flex_datagrid_f.html</guid>
         <category>Components</category>
         <pubDate>Fri, 16 Apr 2010 10:16:48 +0000</pubDate>
      </item>
      
      <item>
         <title>How to Unload Modules Effectively</title>
         <description><![CDATA[<p>It's well known that unloading modules in Flex can be tricky. The principle is simple: remove all references to the module and it will become eligible for garbage collection. The harder part is that those references can exist in unexpected places. Did you know that the code generated by the Flex 3 MXML compiler when processing a CSS stylesheet can sometimes cause a module to be pinned in memory? There are a number of causes of memory leaks like this, but they can be avoided by following certain practices. </p>

<p>This blog post demonstrates how to unload a Flex 3 module effectively that is styled and localized. It applies several of the techniques described in Alex Harui's earlier post, <a href="http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html">What We Know About Unloading Modules</a>. Note that Flex 4 (<strong><a href="http://blogs.adobe.com/flex/">out now!</a></strong>) and Flash Player 10.1 both bring improvements in the area of memory management, such as the modular styles sub-system in Flex 4, so not all of the points below are applicable to Flex 4 projects.</p>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2010/02/how_to_unload_modules_effectively.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2010/02/how_to_unload_modules_effectively.html</guid>
         <category>Modules</category>
         <pubDate>Mon, 22 Feb 2010 21:58:49 +0000</pubDate>
      </item>
      
      <item>
         <title>The Flexible Configuration Options of Parsley</title>
         <description><![CDATA[<p>One of the nice design decisions taken by Jens Halm when he created the <a href="http://www.spicefactory.org/parsley/">Parsley Application Framework</a> was to separate the configuration mechanism from the core of the framework, so different forms of configuration can be used as required. This idea in itself is not new, since Martin Fowler advocated it in his 2004 paper, "Inversion of Control Containers and the Dependency Injection pattern":</p>

<blockquote>
  <p>"My advice here is to always provide a way to do all configuration easily with a programmatic interface, and then treat a separate configuration file as an optional feature. You can easily build configuration file handling to use the programmatic interface. If you are writing a component you then leave it up to your user whether to use the programmatic interface, your configuration file format, or to write their own custom configuration file format and tie it into the programmatic interface" - <em>Martin Fowler</em></p>
</blockquote>

<p>The application of this design principle is particularly effective in Parsley. While some frameworks are restricted to specific configuration mechanisms, Parsley provides programmatic interfaces for synchronous and asynchronous configuration, and several out-of-the-box implementations. These interfaces provide an  extension-point so developers can plug-in their own configuration processors when the need arises.</p>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2010/02/the_flexible_configuration_opt.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2010/02/the_flexible_configuration_opt.html</guid>
         <category>Parsley</category>
         <pubDate>Tue, 09 Feb 2010 22:25:38 +0000</pubDate>
      </item>
      
      <item>
         <title>Writing Genuinely Reusable Flex Components</title>
         <description><![CDATA[<p>On larger projects and within enterprises, there's often a case for extracting a set of reusable components into a Flex library project. In theory, the same components can be reused across modules and sub-applications of multiple Flex or AIR clients, bringing greater consistency and more rapid development. However, in practice there are some common mistakes that limit the reusability of components. This post explains what makes a component genuinely reusable and highlights some techniques from the Flex SDK that can be applied to your own components to make them more reusable.</p>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/12/writing_genuinely_reusable_fle.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/12/writing_genuinely_reusable_fle.html</guid>
         <category>Components</category>
         <pubDate>Thu, 10 Dec 2009 09:18:58 +0000</pubDate>
      </item>
      
      <item>
         <title>Modularity in Flex Applications</title>
         <description><![CDATA[<p>There has been talk recently about the <a href="http://blogs.adobe.com/tomsugden/2009/07/the_trend_towards_inversionofc.html">trend towards inversion-of-control frameworks</a> in Flex. In addition to this, a higher-level movement can be seen towards <em>modularity frameworks</em>. Such an approach to architecture can bring many benefits, particularly in enterprise settings with larger teams and formal release processes. This post explains what modularity means in the context of Flex and discusses some of the benefits and options available for implementation.</p>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/11/modularity_in_flex_application.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/11/modularity_in_flex_application.html</guid>
         <category>Frameworks</category>
         <pubDate>Mon, 23 Nov 2009 22:32:56 +0000</pubDate>
      </item>
      
      <item>
         <title>Vote for Morgan Stanley Matrix!</title>
         <description><![CDATA[<p>Morgan Stanley Matrix has reached the finals for a MAX Award in the Enterprise Productivity category. You can view the vignettes and cast your vote at:</p>

<ul>
	<li><a href="http://max.adobe.com/awards/finalists/">http://max.adobe.com/awards/finalists/</a></li>
</ul>

<p>Public voting has started and the voting will be live until Tuesday, October 6, when the winners will be announced at the event. For more info about Morgan Stanley Matrix, see my <a href="http://blogs.adobe.com/tomsugden/2009/09/morgan_stanley_matrix_at_max.html">earlier blog post</a> or come to the <em>Building Morgan Stanley Matrix</em> session at MAX next week.</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/09/vote_for_morgan_stanley_matrix.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/09/vote_for_morgan_stanley_matrix.html</guid>
         <category></category>
         <pubDate>Tue, 29 Sep 2009 13:59:03 +0000</pubDate>
      </item>
      
      <item>
         <title>Morgan Stanley Matrix at MAX</title>
         <description><![CDATA[<p>Next month at <a href="http://max.adobe.com/">Adobe MAX 2009</a> in Los Angeles, <a href="http://www.borrewessel.com/">Børre Wessel</a> (<a href="http://lab49.com/">Lab49</a>) and myself will be presenting Matrix, the next-generation sales and trading platform from Morgan Stanley. </p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/09/morgan_stanley_matrix_at_max.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/09/morgan_stanley_matrix_at_max.html</guid>
         <category>Flex</category>
         <pubDate>Mon, 21 Sep 2009 21:40:05 +0000</pubDate>
      </item>
      
      <item>
         <title>Coming Soon: Cairngorm 3</title>
         <description><![CDATA[<p>Cairngorm is about to undergo a transformation that will broaden its scope and increase its value to clients and partners. Instead of centering around a specific implementation of the Model-View-Controller pattern, Cairngorm 3 will consist of a set of best practices, tools and libraries, many of which apply across frameworks. This is the knowledge gathered by the Adobe Technical Services organization and partners over the last five or six years, condensed and presented to help others to deliver successful Flex projects in the enterprise.</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/09/coming_soon_cairngorm_3_1.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/09/coming_soon_cairngorm_3_1.html</guid>
         <category>Cairngorm</category>
         <pubDate>Sun, 13 Sep 2009 20:57:30 +0000</pubDate>
      </item>
      
      <item>
         <title>Eliminate Common Bad Practices with FlexPMD</title>
         <description><![CDATA[<p>Adobe Technical Services are pleased to release <a href="http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD">FlexPMD</a> to the community. FlexPMD is a new open-source tool for improving code quality. It works by analyzing ActionScript and MXML source files to identify common bad practices, like over-long classes or functions, reliance on magic strings, unused parameters, and many other programming mistakes or misjudgments. It can even spot code that might be causing performance problems, and furthermore, the ruleset can be customized and extended, to include rules specific to the coding conventions of your own project.</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/09/eliminate_common_bad_practices.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/09/eliminate_common_bad_practices.html</guid>
         <category>FlexPMD</category>
         <pubDate>Fri, 04 Sep 2009 07:21:51 +0000</pubDate>
      </item>
      
      <item>
         <title>Applying the Presentation Model in Flex</title>
         <description><![CDATA[<p><big>Introduction</big></p>

<p>The purpose of the Presentation Model design pattern is simple to grasp: it’s a way of moving state and logic out of a view component and into another class, where it can be developed, comprehended and unit tested more easily. The pattern promotes a clean separation of concerns, helping to keep MXML views as structural definitions, free from Script-block logic. However, there are several ways to apply presentation models in Flex. Some of these can help us to build simpler, more testable systems, while others may lead towards entanglement and maintenance difficulties.</p>

<p>For a comprehensive introduction to the Presentation Model pattern and a comparison between it and other presentation patterns, please refer to <a href="http://blogs.adobe.com/paulw/archives/2007/10/presentation_pa_3.html">Paul Williams' blog series</a> on the topic. At Adobe Professional Services, we have found the Presentation Model to be well suited to Flex, since it takes advantage of language features like bindings and in-line event handlers, while side-stepping some of the difficulties of unit testing display objects.</p>

<p>This article discusses two approaches to applying the Presentation Model -- hierarchical and componentized -- and makes a recommendation in favour of the latter.</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/08/applying_the_presentation_mode.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/08/applying_the_presentation_mode.html</guid>
         <category>Patterns</category>
         <pubDate>Mon, 24 Aug 2009 21:32:51 +0000</pubDate>
      </item>
      
      <item>
         <title>Best Practices for the Flex Logging Framework</title>
         <description><![CDATA[<h2>Introduction</h2>

<p>The Flex Logging Framework is easy to learn and flexible to use. It supports many different scenarios, from helping developers to debug their code, to sending the details of production application errors over the wire to a remote server for monitoring. To learn the basics of the Logging Framework refer to the latest Flex Developer Guide and the Flex Logging Framework chapter of <a href="http://www.amazon.com/Professional-Adobe-Flex-Wrox-Programmer/dp/0470223642/ref=sr_1_1?ie=UTF8&s=books&qid=1249979369&sr=8-1">Professional Flex 3</a>. This document describes some best practices for applying the Logging Framework on enterprise projects.</p>

<p>The APIs provided by the Logging Framework are simple, but they need to be used properly to get the best out of them. If care is not taken, the benefits that logging can provide for debugging and monitoring an application in production can be lost. Performance problems can even be created. This article provides a set of best practices to keep the developers in your team on the right track.<br />
</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/08/best_practices_for_the_flex_lo.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/08/best_practices_for_the_flex_lo.html</guid>
         <category>Logging</category>
         <pubDate>Tue, 11 Aug 2009 09:15:34 +0000</pubDate>
      </item>
      
      <item>
         <title>A Declarative Approach to Flex Popups</title>
         <description><![CDATA[<p><a href="http://blogs.adobe.com/yderidder">Yaniv De Ridder</a> and myself have developed a small Flex library for opening and closing popups. Instead of using the <tt>PopUpManager</tt> directly and writing script-block logic to manage their creation and removal, a pair of simple MXML tags are available for declaring within view components. Here's the "Hello World" of declarative popups:</p>

<pre>
&lt;popup:PopUpWrapper open="{model.openPopUp}"&gt;
   &lt;mx:Label text="Hello World"/&gt;
&lt;/popup:PopUpWrapper&gt;
</pre>

<p>The <tt>PopUpWrapper</tt> tag is a non-visual component that manages opening and closing the popup. When its <tt>open</tt> property is set to true, a popup is opened containing the component wrapped by the tag; in this case a <tt>Label</tt>. When the <tt>open</tt> property is set back to false, the popup closes again. Alternatively, the component may dispatch an <tt>Event.CLOSE</tt> event, which will be handled by the <tt>PopUpWrapper</tt> itself.</p>

<p>This approach helps to keep MXML views components clean and free from ActionScript logic, whilst removing duplicated code wherever the <tt>PopUpManager</tt> is needed. The opening and closure can be controlled conveniently through bindings, as above, which plays nicely with <a href="http://martinfowler.com/eaaDev/PresentationModel.html">presentation models</a>. There are also simple ways to control the life-cycle of the popup and to apply special behaviors, such as effects that play while it opens and closes.</p>

<p>The remainder of this post covers the two components available -- <tt>PopUpWrapper</tt> and <tt>PopUpFactory</tt> -- explaining the differences between them. The library, source code, unit tests and a sample application are available for download here:</p>

<ul>
<li><tt><a href="http://blogs.adobe.com/tomsugden/2009/07/19/FlexPopUpWrapper.swc">FlexPopUpWrapper.swc</a></tt> - the SWC library compiled with Flex 3.3.</li>
<li><tt><a href="http://blogs.adobe.com/tomsugden/2009/07/19/FlexPopUpWrapper.zip">FlexPopUpWrapper</a></tt> - a Flex library project containing the source for the two components.</li>
<li><tt><a href="http://blogs.adobe.com/tomsugden/2009/07/19/FlexPopUpWrapperExample.zip">FlexPopUpWrapperExample</a></tt> - a Flex application project containing a sample application.</li>
<li><tt><a href="http://blogs.adobe.com/tomsugden/2009/07/19/FlexPopUpWrapperUnitTests.zip">FlexPopUpWrapperUnitTests</a></tt> - a Flex application project containing the unit test runner for the FlexPopUpWrapper library.</li>
</ul>
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/07/a_declarative_approach_to_flex.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/07/a_declarative_approach_to_flex.html</guid>
         <category>Flex</category>
         <pubDate>Sat, 18 Jul 2009 22:07:34 +0000</pubDate>
      </item>
      
      <item>
         <title>The Trend Towards Inversion-of-Control Frameworks in Flex</title>
         <description><![CDATA[<p>Last year I wrote three chapters about the Cairngorm MVC framework for a new Flex book, <a href="http://www.amazon.com/Professional-Adobe-Flex-Wrox-Programmer/dp/0470223642/ref=sr_1_1?ie=UTF8&s=books&qid=1246894407&sr=8-1">Professional Flex 3</a>, published by Wrox Press. Cairngorm has been widely adopted on enterprise projects, so it was important to explain its workings and cover the best practices and common pitfalls. If you’re a developer who moves between clients and projects, this is important knowledge to have. However, with more time and pages, I’d have liked to devote similar attention to the other Flex frameworks now available.</p>

<p>Over the last few years, the Flex framework space has become well served with alternatives to Cairngorm, each offering their own take on the challenges of RIA development. While Cairngorm is rooted in design patterns from the Java enterprise world, some of the newer framework creators have taken a fresh approach, reflecting on the language features and special capabilities of ActionScript and the Flex SDK, then building from the ground up, taking advantage of features like event bubbling, declarative MXML and metadata.</p>]]></description>
         <link>http://blogs.adobe.com/tomsugden/2009/07/the_trend_towards_inversionofc.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2009/07/the_trend_towards_inversionofc.html</guid>
         <category>Frameworks</category>
         <pubDate>Mon, 06 Jul 2009 08:35:31 +0000</pubDate>
      </item>
      
      <item>
         <title>EventfulTestCase: a FlexUnit extension for testing event dispatching</title>
         <description><![CDATA[<p>
<b>
NOTE: The extension described in this post has now been incorporated into FlexUnit 3. The syntax has changed slightly, but the concepts described in this post remain. This feature is not yet available in FlexUnit 4, which is a major update, but work is underway to provide even better support for unit testing the event dispatching behavior of your classes.
</b> 
</p>

<h3>Introduction</h3>

The events that a class dispatches form an important part of its contract with clients, yet for one reason or another they are seldom tested. Perhaps this is because event declarations are optional in Flex and specified as metadata, or perhaps it is because the FlexUnit assertions were mostly ported from JUnit and not tailored specifically to Flex. In either case, programming mistakes and design flaws in event logic can have far-reaching consequences, effecting any dependent event listeners and the classes beyond them.
]]></description>
         <link>http://blogs.adobe.com/tomsugden/2008/01/eventfultestcase_a_flexunit_ex.html</link>
         <guid>http://blogs.adobe.com/tomsugden/2008/01/eventfultestcase_a_flexunit_ex.html</guid>
         <category>FlexUnit</category>
         <pubDate>Fri, 11 Jan 2008 22:28:02 +0000</pubDate>
      </item>
      
   </channel>
</rss>
