<?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>Obecto Training Portal &#187; VMware Flex</title>
	<atom:link href="http://training.obecto.com/category/vmware-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://training.obecto.com</link>
	<description>sharing our knowledge</description>
	<lastBuildDate>Wed, 07 Apr 2010 08:57:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MVC Example &#8211; Refactored</title>
		<link>http://training.obecto.com/2009/07/mvc-example-refactored/</link>
		<comments>http://training.obecto.com/2009/07/mvc-example-refactored/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 15:17:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[model adapter]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[refactore]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=270</guid>
		<description><![CDATA[DOWNLOAD REFACTORED VERSION OF THE MVC EXAMPLE
What&#8217;s included in the re-factored version?

the MVC approach in now demonstrated not only for the module, but also for the item renderer used in the list component
the model adapter pattern is demonstrated too
some other minor refinements

Adapting the Model into a Presentation Model
Let&#8217;s see the Model Adapter pattern in more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/mvcexamplerefactored.zip">DOWNLOAD REFACTORED VERSION OF THE MVC EXAMPLE</a></p>
<p>What&#8217;s included in the re-factored version?</p>
<ul>
<li>the MVC approach in now demonstrated not only for the module, but also for the item renderer used in the list component</li>
<li>the model adapter pattern is demonstrated too</li>
<li>some other minor refinements</li>
</ul>
<h3>Adapting the Model into a Presentation Model</h3>
<p>Let&#8217;s see the Model Adapter pattern in more detail:</p>
<p>The MXML usage of the model adapter is pretty straight-forward &#8211; you can see this in the <em>StatisticsView.mxml</em>:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
&lt;programmerListItemModel:ProgrammerListItemModelAdapter id="modelAdapter"
    source="{model.programmers}"/&gt;
</pre>
<p>And then instead of using the <i>model.programmers</i> you can use <i>modelAdapter.resultCollection</i>:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
&lt;list:CustomLayoutList id="list" styleName="programmersList" width="550"
    layout="{model.inAdvancedView ? verticalLayout : fluidLayout}"
    dataProvider="{modelAdapter.resultCollection}"
    itemRenderer="{new ClassFactory(ProgrammerListItem)}"/&gt;
</pre>
<p>This adaptation is actually in a way demonstration of what means to have a pure abstract model and a presentation model (like in the MVP pattern).</p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/07/mvc-example-refactored/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing Flex Applications</title>
		<link>http://training.obecto.com/2009/05/optimizing-flex-applications/</link>
		<comments>http://training.obecto.com/2009/05/optimizing-flex-applications/#comments</comments>
		<pubDate>Mon, 11 May 2009 09:33:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[allocation]]></category>
		<category><![CDATA[event listener]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[GC]]></category>
		<category><![CDATA[leak]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiler]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=244</guid>
		<description><![CDATA[DOWNLOAD SLIDES
DOWNLOAD SAMPLE WITH MEMORY LEAKS
This is the talk we gave at the Bulgarian FlexCamp this year &#8211; the event was in Bulgarian, and so is the talk:

Basically optimizations affect two areas of non-functional properties of the software &#8211; memory consumption and performance. Since Garbage Collection in Flash affects both memory and performance, it is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/optimizing-flex-applications.pdf">DOWNLOAD SLIDES</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/detectingmemoryleaks.zip">DOWNLOAD SAMPLE WITH MEMORY LEAKS</a></p>
<p>This is the talk we gave at the Bulgarian FlexCamp this year &#8211; the event was in Bulgarian, and so is the talk:</p>
<p><object width="600" height="450"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5349048&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5349048&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="600" height="450"></embed></object></p>
<p>Basically optimizations affect two areas of non-functional properties of the software &#8211; memory consumption and performance. Since <em>Garbage Collection</em> in Flash affects both memory and performance, it is very important to try describe how the GC works as detailed as we can.</p>
<h3>How the GC works?</h3>
<p>The part with the GC is mostly taken from the presentation accompanying the <a href="http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html">Alex Harui&#8217;s Garbage Collection and Memory Leaks blog post</a>. The important things to note in this topic are:</p>
<ul>
<li>how the Flash memory allocation works &#8211; it prefers to allocate big chunks less often, instead of small chunks frequently</li>
<li>the GC is only triggered by allocation</li>
<li>the GC doesn&#8217;t run completely &#8211; there is no guaranty that all unused memory is going to be released (or at least it will not be released in a single pass of the GC)</li>
</ul>
<p>The conclusion you must absolutely remember is that:</p>
<blockquote><p>The GC is not predictable!</p></blockquote>
<h3>How to detect memory leaks?</h3>
<p>Thanks to the Flex profiler now we can easily observe the memory consumption of a Flex or Flash application. We can interactively run the GC when we want and we can compare memory consumption during various stages of the application. The leaking memory consumption pattern is pretty clear. And so is the stable memory consumption. </p>
<h3>Fixing Memory Leaks</h3>
<p>Now that we now whether our application is leaking, we need to take a course of action to fill in the leaking spots. Again we can try using the profiler and its feature to detect loitering objects. When you browse through the list of such objects you need to pay special attention to the usual suspects:</p>
<ul>
<li>Array</li>
<li>Object used as map</li>
<li>Dictionary with strong references</li>
<li>failure to remove event listeners</li>
</ul>
<h3>Which event listeners can cause leaks?</h3>
<p>We&#8217;ll see why children adding listeners to their parents are causing leaks and why there is no such problem in the vice versa situation.</p>
<h3>Unloading Third-Party Content</h3>
<p>When unloading modules and third-party content be sure to:</p>
<ul>
<li>free bitmap memory</li>
<li>stop video streams</li>
<li>stop audio streams</li>
<li>stop all MovieClips from animating</li>
<li>remove event listeners to global list of enterFrame, exitFrame, etc.</li>
<li>stop any downloads (http, sockets, FileReference)</li>
<li> clear any fonts from the font table </li>
</ul>
<p>You can use <strong>Loader.unloadAndStop()</strong> (but only in Flash 10).</p>
<h3>Optimization Rules of Thumb</h3>
<p>The following are performance optimization rules:</p>
<ul>
<li>always compile in strict mode</li>
<li>use typed data structures</li>
<li>use sealed classes instead dynamic classes</li>
<li>avoid globals when code is deeply nested</li>
<li>use <strong>vector<></strong> instead Array (only in Flash 10)</li>
</ul>
<h3>Other optimization techniques</h3>
<p>Important techniques to mention are:</p>
<ul>
<li>object reuse, especially for renderers</li>
<li>avoid the setStyle() method</li>
<li>avoid having too many nested containers</li>
</ul>
<p><a href="http://www.insideria.com/2009/04/51-actionscript-30-and-flex-op.html">LEARN MORE OPTIMIZATION TECHNIQUES AND PRACTICES</a></p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/05/optimizing-flex-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Test Driven Development</title>
		<link>http://training.obecto.com/2009/05/test-driven-development/</link>
		<comments>http://training.obecto.com/2009/05/test-driven-development/#comments</comments>
		<pubDate>Sun, 10 May 2009 14:11:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[fluint]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[unit]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=191</guid>
		<description><![CDATA[DOWNLOAD MVC EXAMPLE WITH TESTS
DOWNLOAD SELENIUM AUTOMATION JAVA PROJECT
In this topic we will cover:

unit testing with fluint
integration testing with fluint
automation testing with Selenium and TestNG
overview of the Flex Automation API

fluint &#8211; Flex Unit and Integration Testing Framework
Based loosely on the concepts of FlexUnit and its ancestor JUnit, fluint provides enhanced asynchronous support, a graphical test [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/MVCExample.zip">DOWNLOAD MVC EXAMPLE WITH TESTS</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/seleniumautomation.zip">DOWNLOAD SELENIUM AUTOMATION JAVA PROJECT</a></p>
<p>In this topic we will cover:</p>
<ul>
<li>unit testing with fluint</li>
<li>integration testing with fluint</li>
<li>automation testing with Selenium and TestNG</li>
<li>overview of the Flex Automation API</li>
</ul>
<h3>fluint &#8211; Flex Unit and Integration Testing Framework</h3>
<p>Based loosely on the concepts of FlexUnit and its ancestor JUnit, fluint provides enhanced asynchronous support, a graphical test runner, integration with continuous build systems and an optional Adobe AIR client for directory watching.</p>
<p><a href="http://code.google.com/p/fluint/">FLUINT HOME PAGE AT GOOGLE CODE</a><br />
<a href="http://code.google.com/p/fluint/wiki/Introduction">INTRODUCTION TO FLUINT</a></p>
<p>The repository of the project is organized in the best way I&#8217;ve seen so far in a Flex open source project. The structure is optimized for fast setup &#8211; you just need to check out a project into your workspace and you&#8217;re ready.</p>
<h3>Unit Testing</h3>
<p>The goal of unit testing is to verify and validate that individual pieces of code fit for use. With fluint you can do a variety of tests:</p>
<ul>
<li>simple assertions</li>
<li>asynchronous tests (testing asynchronous communication and services)</li>
<li>asynchronous test setup (waiting for creation completed before test start)</li>
<li>test visual components</li>
</ul>
<p><a href="http://code.google.com/p/fluint/wiki/BasicTest">WRITING A FLUINT BASIC TEST</a><br />
<a href="http://code.google.com/p/fluint/wiki/AsyncTest">WRITING ASYNCHRONOUS TEST</a><br />
<a href="http://code.google.com/p/fluint/wiki/AsyncSetup">USING ASYNCHRONOUS SETUP</a></p>
<p>If you download the MVC Example you&#8217;ll find the testing code in the <em>src/test</em> directory.<br />
The simple assertion is demonstrated in <a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/services/testCase/TestStatisticsServiceRandomLinesOfCode.as.html">TestStatisticsServiceRandomLinesOfCode.as</a><br />
Simple asynchronous test is demonstrated in <a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/services/testCase/TestStatisticsServiceOperations.as.html">TestStatisticsServiceOperations.as</a><br />
You can see an asynchronous test setup in the following test cases:<br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/customLayoutList/testCase/TestInitialization.as.html">TestInitialization.as</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/customLayoutList/testCase/TestFiltering.as.html">TestFiltering.as</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/customLayoutList/testCase/TestLayoutChange.as.html">TestLayoutChange.as</a></p>
<h3>Some Additions to fluint</h3>
<p>Since we&#8217;re dealing with RIA we must pay a great deal of attention to the interactions. Some interactions can not be automated easily and may require human intervention. Thus we must create some sort of a hybrid between a unit test and a functional test. To initiate the assertions the tester must perform a certain interaction with the unit under test, which is usually a visual component with a complex gesture that&#8217;s difficult to automate. The unit test is still part of a test suite, but the difference is that is should not fail while waiting for the designated interaction to be performed. The current implementation of <strong>asychHandler()</strong> expects a timeout to be specified. I&#8217;ve introduced a slightly modified method that will wait for unspecified period of time:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
/**
 * Same as asyncHandler, but doesn't have a timeout
 */
public function waitingHandler( eventHandler:Function ):Function {
    var asyncHandler:WaitingHandler = new WaitingHandler( this, eventHandler );
    asyncHandler.addEventListener( WaitingHandler.EVENT_FIRED, handleAsyncEventFired, false, 0, true );

    pendingAsyncCalls.push( asyncHandler );

    return asyncHandler.handleEvent;
}
</pre>
<p/>
This method is part of the <strong>CustomTestCase</strong> which inherits the fluint base <strong>TestCase</strong> class. The <strong>WaitingHandler</strong> class inherits the fluint <strong>AsyncHandler</strong>.</p>
<p/>
In order to have visual testing I&#8217;ve modified the sample <strong>TestRunner</strong> and extended it with a visual testing environment. You can take a look at my modifications in the <a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/ui/UITestRunner.as.html">UITestRunner.as</a></p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/MVCTestRunner.html">RUN THE UI TEST RUNNER (FIRST TEST WAITS FOR THE USER TO CHECK THE CHECKBOX)</a></p>
<h3>Integration Testing with fluint</h3>
<p>After components and modules were unit tested (individually tested), the next step is to compose them into a bigger group and test the behavior of the whole group. Integration tests may be a bit more complex than unit tests. For complex test cases fluint provides us with test sequences. </p>
<p><a href="http://code.google.com/p/fluint/wiki/Sequences">READ MORE ON TESTING WITH SEQUENCES</a></p>
<p>Check out my sample test case that&#8217;s using sequences &#8211; <a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/test/customLayoutList/testCase/TestLayoutChange.as.html">TestLayoutChange.as</a></p>
<h3>Automating fluint Unit and Integration Tests</h3>
<p>Automation of unit and integration test is important part of a Continuous Integration build. Currently for fluint an Ant wrapper for the tool is available. </p>
<p><a href="http://code.google.com/p/fluint/wiki/ContinuousIntegration">READ MORE ON CONTINUOUS INTEGRATION WITH FLUINT</a></p>
<h3>Testing Flex Application with Selenium</h3>
<p>Bad news for the QA engineers &#8211; I was able to produce<strong> only manually </strong>Selenium tests in Java for replaying a sequence of user gestures. Right now for testing Flex applications with Selenium there is only one available extension, but it works only with the old Beta 1 of the Selenium IDE  when running only on Firefox 2. I haven&#8217;t tested that configuration. So currently there is no easy way for automatically recording the user gestures taken in the course of using a Flex application. And all my Selenium tests had to be written manually. </p>
<p> <a href="http://training.obecto.com/wp-content/uploads/2009/05/seleniumautomation.zip">DOWNLOAD SELENIUM AUTOMATION JAVA PROJECT</a></p>
<p>For the above project you need a Selenium server and a Selenium remote control.<br />
There are two partial solutions available for testing Flex applications with Selenium.</p>
<h4>Selenium Flex API</h4>
<p>As I&#8217;m writing this I see that today a new version of the API is available and the release notes for this version claim that it should work with the latest beta of Selenium IDE. I really want to check it out but for some reason the ZIP can&#8217;t be downloaded right now.</p>
<p><a href="http://sourceforge.net/projects/seleniumflexapi/">DOWNLOAD SELENIUM FLEX API</a></p>
<p>The Selenium Flex API consists of several components: </p>
<ul>
<li>SWC that you must import to the Flex application with the <em>-include-library</em> compiler switch</li>
<li>JavaScript extension to the Selenium IDE, so you can record user gestures &#8211; this extension works only for Flex applications that have already included the above SWC</li>
<li>Selenium Remote Control client &#8211; I bet the provided class is automatically generated with some tool &#8211; the code contained syntax errors and did not prove as working</li>
</ul>
<h4>Flash-Selenium</h4>
<p>The flash-selenium project aims to extend the Selenium RC clients for adding Flash communication capabilities. It basically adds the capability to invoke Flash functionality through JavaScript and the <strong>ExternalInterface</strong> feature of Flash. I don&#8217;t like this approach, because you need to expose a great deal of functionality as <strong>ExternalInterface</strong> and this approach can&#8217;t be applied for black box testing.</p>
<p><a href="http://code.google.com/p/flash-selenium/">GOOGLE CODE HOME PAGE OF FLASH-SELENIUM</a></p>
<h4>My sample = Flash-Selenium + Selenium Flex API</h4>
<p>My sample uses both the Flash-Selenium remote control client and the Selenium Flex API SWC included in the Flex project. Let&#8217;s look at the code of the test case:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
@BeforeSuite
public void startSeleniumServer() throws Exception {
	seleniumServer = new SeleniumServer();
	seleniumServer.start();
}
</pre>
<p/>
This is TestNG preparation method before starting the test suite. </p>
<p/>
The following is a setup method for each test case. Please, note the way I&#8217;m using Flash-Selenium:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
@BeforeTest
public void startBrowser() throws Exception {
	selenium = new DefaultSelenium("localhost", 4444, "*firefox", BASE_URL);
	selenium.start();
	selenium.open(URL);

	flexApp = new FlashSelenium(selenium, FLEX_APP);
	while (flexApp.PercentLoaded() != 100) {
		Thread.sleep(1000);
	}
	Thread.sleep(5000); // extra assurance that everything is loaded
}
</pre>
<p/>
Now that the Flex application is up and 100% loaded the test is ready to be run. Please, note the way I invoke functionality in the Selenium Flex API SWC through Flash-Selenium:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
@Test
public void checkLayoutUpdate() throws Exception {
	flexApp.call("doFlexClick", "advancedViewCheckbox", "");
	Thread.sleep(5000);

	String isChecked = flexApp.call("getFlexCheckBoxChecked", "advancedViewCheckbox", "");
	Assert.assertEquals(isChecked, "true");

	String listData = flexApp.call("getCustomLayoutListData", "#");
	Assert.assertEquals(listData.split("#").length, 9);

	flexApp.call("doFlexClick", "filterTextInput", "");
	flexApp.call("doFlexType", "filterTextInput", "br");
	Thread.sleep(5000);

	listData = flexApp.call("getCustomLayoutListData", "#");
	String[] items = listData.split("#");
	Assert.assertEquals(items.length, 2);
	Assert.assertTrue(items[0].toLowerCase().contains("br"));
	Assert.assertTrue(items[1].toLowerCase().contains("br"));

	flexApp.call("doFlexDoubleClick", "filterTextInput", "");
	flexApp.call("doFlexType", "filterTextInput", "");
	Thread.sleep(5000);

	listData = flexApp.call("getCustomLayoutListData", "#");
	Assert.assertEquals(listData.split("#").length, 9);
}
</pre>
<p/>
Notice some methods are part of the Selenium Flex API and some methods are exposed on purpose through <strong>ExternalInterface</strong>. The following is part of the <a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/source/component/list/CustomLayoutList.as.html">CustomLayoutList.as</a>:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
// Methods exposed only for Selenium testing purposes:
private function initializeExternalInterface() : void
{
    ExternalInterface.addCallback("getCustomLayoutListData", getCustomLayoutListData);
    ExternalInterface.addCallback("getCustomLayoutListLayout", getCustomLayoutListLayout);
}
</pre>
<p/>
<h3>A More Cleaner Approach</h3>
<p>A more cleaner approach would be to use the Flex Automation API:</p>
<p/>
<a href="http://livedocs.adobe.com/flex/3/html/help.html?content=agents_3.html"><img src="http://livedocs.adobe.com/flex/3/html/images/automation_api.png" alt="adobe-flashplatform-diagram" title="adobe-flashplatform-diagram" width="98%" class="alignnone size-full wp-image-24" /></a></p>
<p/>
An appropriate agent class for Selenium should be created and an appropriate JavaScript extension to the Selenium IDE. </p>
<p><a href="http://livedocs.adobe.com/flex/3/html/help.html?content=agents_3.html">READ MORE ABOUT THE FLEX AUTOMATION APIS</a><br />
<a href="http://www.adobe.com/devnet/flex/samples/custom_automated/">CHECK ADOBE&#8217;S AUTOMATION SAMPLE</a></p>
<p/>
The following illustration shows the initialization process of the SystemManager, AutomationManager and Automation objects:</p>
<p/>
<a href="http://training.obecto.com/wp-content/uploads/2009/05/automation-initialization.png"><img src="http://training.obecto.com/wp-content/uploads/2009/05/automation-initialization.png" alt="automation-initialization" title="automation-initialization" width="98%" class="alignnone size-full wp-image-235" /></a></p>
<p/>
And this is how the automation flow works:</p>
<p/>
<a href="http://training.obecto.com/wp-content/uploads/2009/05/automation-flow.png"><img src="http://training.obecto.com/wp-content/uploads/2009/05/automation-flow.png" alt="automation-flow" title="automation-flow" width="98%" class="alignnone size-full wp-image-236" /></a></p>
<p/>
<h3>Related Articles</h3>
<p><a href="http://www.agimatec.de/blog/2008/11/selenium-flex-tests-with-maven/">Selenium-Flex-Tests with Maven</a><br />
<a href="http://www.blackpepper.co.uk/black-pepper-blog/Flex-acceptance-testing-and-continuous-integration.html">Flex acceptance testing and continuous integration</a></p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/05/test-driven-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MVCS Example</title>
		<link>http://training.obecto.com/2009/05/mvcs-example/</link>
		<comments>http://training.obecto.com/2009/05/mvcs-example/#comments</comments>
		<pubDate>Thu, 07 May 2009 10:24:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[MVCS]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=169</guid>
		<description><![CDATA[DOWNLOAD MVC EXAMPLE
Just as I&#8217;ve promised an example MVC module was demonstrated and discussed in today&#8217;s session. The example is far from perfect but it provides a fundament for discussing various design decisions when we implement an MVC example.
Sample Requirements
The request is to implement a Programmer Statistics Module with the following requirements:

the module should provide [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/MVCExample.zip">DOWNLOAD MVC EXAMPLE</a></p>
<p>Just as I&#8217;ve promised an example MVC module was demonstrated and discussed in today&#8217;s session. The example is far from perfect but it provides a fundament for discussing various design decisions when we implement an MVC example.</p>
<h3>Sample Requirements</h3>
<p>The request is to implement a <strong>Programmer Statistics Module</strong> with the following requirements:</p>
<ul>
<li>the module should provide basic and advanced view for a list of programmers</li>
<li>use text input to filter the list</li>
<li>use checkbox control to switch between the basic and advanced view</li>
<li>in advanced view the user can delete programmers</li>
<li>in advanced view the user can show the programmers statistics</li>
<li>programmers statistics should be represented by a chart showing the lines of code written in a month by the programmer</li>
<li>switching back to basic view should make all expanded items to collapse their statistics view</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/MVCExample.html">RUN THE MVC EXAMPLE</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/05/mvc-bin-release/srcview/index.html">VIEW MVC EXAMPLE SOURCE CODE</a></p>
<p>As you look at the working application, you must be able to isolate the <strong>Model</strong>, the <strong>View</strong>, the <strong>Controller</strong> and the <strong>Services</strong> layers.</p>
<h3>The Model</h3>
<p>What&#8217;s comprising the model?</p>
<ul>
<li>collection of programmers&#8217; data</li>
<li>a flag indicating whether we&#8217;re in advanced view</li>
</ul>
<p>Keep in mind that the list of programmers is pure data &#8211; a single item from the list has only data properties and no representation related properties whatsoever.</p>
<h3>The View</h3>
<p>Among all other controls the View also contains a <strong>List</strong> component. The abstraction of the list component can be explained basically by the following 3 things:</p>
<ul>
<li>data provider &#8211; a collection of data items &#8211; the List observes all changes happening to this collection and reacts correspondingly by adding or removing list items</li>
<li>item renderer &#8211; a factory for creating item renderer components &#8211; the instances created by the factory we call list items</li>
<li>layout strategy &#8211; a strategy for arranging the positions and dimensions of the list items in the list</li>
</ul>
<p>The List component is the only component that communicates directly with the list items. This is how the List adds a single list item:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">private function addItem(itemData : Object) : void
{
    var item : IDataRenderer = itemRenderer.newInstance() as IDataRenderer;
    item.data = itemData;

    listItems.addItem(item);
    dataToItemMap[itemData] = item;

    UIComponent(item).addEventListener(ResizableItemChangeEvent.DIMENSIONS_CHANGE, handleItemDimensionsChange);

    addChild(UIComponent(item));
}</pre>
<p/>
In a way the item&#8217;s <em>data</em> property is the item&#8217;s <em>model</em>, but since we feed the List with a collection of programmers&#8217; data items, which are pure data this brings the following problem:</p>
<blockquote><p>How do we initialize all of the properties in the Model of the item renderers&#8217; instances?</p></blockquote>
<p>One solution to this problem is the application of a pattern called Data Binding Adapter.</p>
<h3>The Data Binding Adapter Pattern</h3>
<p>The data binding adapter pattern is a way of structuring data binding expressions.<br />
Currently the List is initialized in the following way:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">&lt;list:CustomLayoutList id="list" styleName="programmersList" width="550"
    layout="{model.inAdvancedView ? verticalLayout : fluidLayout}"
    dataProvider="{model.programmers}"
    itemRenderer="{new ClassFactory(ProgrammerListItem)}"/&gt;</pre>
<p/>
Let&#8217;s try to adapt the collection:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">&lt;adapter:ProgrammerListItemAdapter id="adaptedModel"
    programmers="{model.programmers}"
    inAdvancedView="{model.isAdvancedView}"/&gt;</pre>
<p/>
The adapter is bound to the properties of the original Model and can take actions when the original Model changes &#8211; e.g. when the <em>inAdvancedView</em> property changes to <em>false</em> the adapter goes through each item of the itemsModels collection and changes the <strong>statisticsShown</strong> property to false:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">public var itemsModels : ArrayCollection /* of ProgrammerListItemModel */

private function set inAdvancedView(value : Boolean) : void
{
    if (!value)
    {
        for each (var model : ProgrammerListItemModel in itemsModels)
        {
            model.statisticsShown = false;
        }
    }
}</pre>
<p>Â
<p/>
And finally we bind the List to the <em>adaptedModel.itemsModels</em> instead of <em>model.programmers</em>:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">&lt;list:CustomLayoutList id="list" styleName="programmersList" width="550"
    layout="{model.inAdvancedView ? verticalLayout : fluidLayout}"
    dataProvider="{adaptedModel.itemsModels}"
    itemRenderer="{new ClassFactory(ProgrammerListItem)}"/&gt;</pre>
<p/>
Tell me what you think about this approach?</p>
<h3>Containers</h3>
<p>Let&#8217;s take a look at the <strong>StatisticsModule.mxml</strong> where all components are wired to each other:</p>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Canvas
    backgroundColor="0xffffff"
    creationComplete="controller.initializeModel();"
    xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:model="module.statistics.model.*" xmlns:view="module.statistics.view.*"
    xmlns:control="module.statistics.control.*" xmlns:service="module.statistics.service.*"&gt;

    &lt;mx:Style source="module/statistics/style/statistics.css"/&gt;

    &lt;model:StatisticsModel id="model"/&gt;

    &lt;view:StatisticsView id="view" width="600" height="100%"
        model="{model}"
        viewModeChange="controller.switchViewMode();"
        deleteButtonClick="controller.deleteListItem(event.target);"
        requestStatistics="controller.loadProgrammerStatistics(event.programmer);"
        filterChange="controller.filterProgrammers();"/&gt;

    &lt;control:StatisticsController id="controller"
        model="{model}" view="{view}"
        programmersService="{services.programmersService}"
        statisticsService="{services.statisticsService}"/&gt;

    &lt;service:Services id="services"/&gt;

&lt;/mx:Canvas&gt;</pre>
<p/>
Notice anything strange or troubling?<br />
The question is:</p>
<blockquote><p>Do I have to wire the Model, View, Controller and Services inside of a Canvas container? Isn&#8217;t it the View, the only View in the MVC? Why is my MVC a container itself?</p></blockquote>
<p>You can do two different things in this case:</p>
<ol>
<li>Strip out the StatisticsView component and include its composite components directly in the module root Canvas. Thus we eliminate one redundant container. A negative side effect of this modification is that the view is not isolated in a self-container component. The following approach is better:</li>
<li>Use a non-visual component for a root tag. When using a non-visual component for a root tag, there is an extra programming effort to add the View to the application container:</li>
</ol>
<pre class="prettyprint" style="font-size: 12px; overflow: auto;">
private function addStatisticsModule() : void
{
    var module : StatisticsModule = new StatisticsModule();
    container.addChild(module.view);
}
</pre>
<p/>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/05/mvcs-example/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex Applications&#8217; Architecture</title>
		<link>http://training.obecto.com/2009/04/flex-applications-architecture/</link>
		<comments>http://training.obecto.com/2009/04/flex-applications-architecture/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 09:32:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Cairngorm]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[OpenFlux]]></category>
		<category><![CDATA[PureMVC]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=154</guid>
		<description><![CDATA[DOWNLOAD SLIDES
This talk is based on a series of articles I wrote last year:
Introduction to Flex Applicationâ€™s Architecture &#8211; Part 1 &#8211; Cairngorm
Introduction to Flex Applicationâ€™s Architecture &#8211; Part 2 &#8211; PureMVC
Introduction to Flex Applicationâ€™s Architecture &#8211; Part 3 &#8211; The Gugga Approach
Since we&#8217;re gonna compare a couple of architectures and some architectural approaches, it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/flex-applications-architecture.pdf">DOWNLOAD SLIDES</a></p>
<p>This talk is based on a series of articles I wrote last year:<br />
<a href="http://npacemo.com/wordpress/2008/05/28/introduction-to-flex-applications-architecture-part-1-cairngorm/">Introduction to Flex Applicationâ€™s Architecture &#8211; Part 1 &#8211; Cairngorm</a><br />
<a href="http://npacemo.com/wordpress/2008/06/08/introduction-to-flex-applications-architecture-part-2-puremvc/">Introduction to Flex Applicationâ€™s Architecture &#8211; Part 2 &#8211; PureMVC</a><br />
<a href="http://npacemo.com/wordpress/2008/10/03/introduction-to-flex-applications-architecture-part-3-the-gugga-approach/">Introduction to Flex Applicationâ€™s Architecture &#8211; Part 3 &#8211; The Gugga Approach</a></p>
<p>Since we&#8217;re gonna compare a couple of architectures and some architectural approaches, it is important to establish a common ground in understanding why we need an architecture and what problems an architecture tries to solve.</p>
<h3>Why architecture is important?</h3>
<p>Architectures are important in situations where we need to:</p>
<ul>
<li>scale things up in both size and complexity</li>
<li>prepare and follow a plan</li>
</ul>
<p>The important thing to remember is that architectures are rarely obvious. And in most of the cases they emerge from the practice.</p>
<h3>MVC vs. MVP</h3>
<p>I&#8217;ve included some differences between MVC and MVP as I perceive them, but in the discussion with we ended up with the conclusion that <strong>&#8220;MVP is speculatively different from MVC&#8221;</strong>.</p>
<h3>Architectural Frameworks</h3>
<p>We&#8217;ve discussed the most popular architectural frameworks &#8211; Cairngorm and PureMVC, outlined their flaws and benefits, but mostly flaws. I&#8217;ve tried to persuade the audience in the need of a more granular approach, that can be applied not just on MACRO-application level, but also on a module level and even on component level of granularity.</p>
<p>It is important to note that the proposed ideas are not a complete architectural framework, but rather an approach. And since this is just an approach, there are no rigid rules &#8211; the developer must take his decisions without relying on strong and proven rules. The difficulty comes when you have to decide on what level of granularity you need to set up an MVC-infrastructure. Whether to have a single view and single controller and whether to have multiple views and many controllers?</p>
<p>Detailed sample is published in the next topic &#8211; <a href="http://training.obecto.com/2009/05/mvcs-example/">MVCS Example</a>.</p>
<h3>Great Comparison Between Frameworks</h3>
<p>The following is a great comparison between Flex architectural frameworks:</p>
<ul>
<li><a href="http://www.insideria.com/2008/12/frameworkquest-2008-introducti.html">Part 1 &#8211; Introduction</a></li>
<li><a href="http://www.insideria.com/2008/12/frameworkquest-2008-part-2-get.html">Part 2 &#8211; Get Control with Cairngorm</a></li>
<li><a href="http://www.insideria.com/2008/12/frameworkquest-2008-part-3-fra.html">Part 3 &#8211; Framework Agnostic Views with PureMVC</a></li>
<li><a href="http://www.insideria.com/2008/12/frameworkquest-2008-part-4-ioc.html">Part 4 &#8211; IoC with Swiz</a></li>
<li><a href="http://www.insideria.com/2008/12/frameworkquest-2008-part-5-mat.html">Part 5 &#8211; Mate, the Pure MXML Framework</a></li>
<li><a href="http://www.insideria.com/2009/01/frameworkquest-2008-part-6-the.html">Part 6 &#8211; The Exciting Conclusion</a></li>
</ul>
<p>This series of articles build the very same application but with different architectural approaches. The Source Code is available at <a href="http://github.com/thillerson/twitteria/tree/master">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/flex-applications-architecture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex 3 Localization Support</title>
		<link>http://training.obecto.com/2009/04/flex-3-localization-support/</link>
		<comments>http://training.obecto.com/2009/04/flex-3-localization-support/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 09:23:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[resource bundles]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=148</guid>
		<description><![CDATA[DOWNLOAD SLIDES
Flex 3 has huge improvements in the localization support compared to what Flex 2 supported.
In this lecture will get to know the various was of doing localization:

static localization
dynamic localization
externalizing localization resources into resource modules
dynamically loading resource modules

DOWNLOAD LOCALIZATION SAMPLE
We&#8217;ve included in the sample above an Ant script that automates the compilation process of resource [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/flex-3-localization-support.pdf">DOWNLOAD SLIDES</a></p>
<p>Flex 3 has huge improvements in the localization support compared to what Flex 2 supported.<br />
In this lecture will get to know the various was of doing localization:</p>
<ul>
<li>static localization</li>
<li>dynamic localization</li>
<li>externalizing localization resources into resource modules</li>
<li>dynamically loading resource modules</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/localization.zip">DOWNLOAD LOCALIZATION SAMPLE</a></p>
<p>We&#8217;ve included in the sample above an Ant script that automates the compilation process of resource modules.</p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/flex-3-localization-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating Modular Applications</title>
		<link>http://training.obecto.com/2009/04/creating-modular-applications/</link>
		<comments>http://training.obecto.com/2009/04/creating-modular-applications/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 08:39:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[modules]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=137</guid>
		<description><![CDATA[DOWNLOAD SLIDES
In the beginning this topic was titled Component-Based Development with Flex, where &#8216;component-based&#8217; was used in the meaning of Component Based Software Engineering. There are certain similarities between modules and components and we&#8217;ll discuss them during the lecture, but yet the content of this talk is mostly oriented on modules and the Flex specifics [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/creating-modular-applications.pdf">DOWNLOAD SLIDES</a></p>
<p>In the beginning this topic was titled <em>Component-Based Development with Flex</em>, where <em>&#8216;component-based&#8217;</em> was used in the meaning of <em>Component Based Software Engineering</em>. There are certain similarities between modules and components and we&#8217;ll discuss them during the lecture, but yet the content of this talk is mostly oriented on modules and the Flex specifics in creating modular applications, so the title got changed. </p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/modularapplication.zip">DOWNLOAD SAMPLE MODULAR APPLICATION</a></p>
<h3>What else can be added to this topic?</h3>
<p>When loading functional content from other SWF files, the question that rises is where are the new class definitions loaded in? And this questions brings up the discussion about <strong>Application Domains in Flash</strong>. Don&#8217;t miss to check the following resources:</p>
<p><a href="http://ghalex.com/blog/application-domains-in-flex">A simple explanation of Application Domains</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/chapter-1-developing-and-loading-sub-applications.pdf">Chapter 1: Developing and loading sub-applications</a> &#8211; a complete chapter that covers application domains, security domains and resources compiled with different versions of the Flex Framework. It&#8217;s quite strange &#8211; what kind of a book starts with developing and loading sub-applications?</p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/creating-modular-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remoting</title>
		<link>http://training.obecto.com/2009/04/remoting/</link>
		<comments>http://training.obecto.com/2009/04/remoting/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 11:43:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[DataService]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[HTTPService]]></category>
		<category><![CDATA[RemoteObject]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[Static Proxy]]></category>
		<category><![CDATA[WebService]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=106</guid>
		<description><![CDATA[DOWNLOAD SLIDES
The slides are partially based on the Working with Data in Flex talk Branimir Angelov gave at the 2008 FlexCamp.
We got to admit that this is one of the toughest topics to discuss, because remoting is part of a quite bigger topic &#8211; distributed systems. And distributed systems encompass tones of knowledge, e.g.:

different data [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/remoting.pdf">DOWNLOAD SLIDES</a></p>
<p>The slides are partially based on the <a href="http://flex.riabg.org/?p=4">Working with Data in Flex</a> talk Branimir Angelov gave at the <a href="http://flexcamp.riabg.org/">2008 FlexCamp</a>.</p>
<p>We got to admit that this is one of the toughest topics to discuss, because remoting is part of a quite bigger topic &#8211; <strong>distributed systems</strong>. And distributed systems encompass tones of knowledge, e.g.:</p>
<ul>
<li>different data paradigms (weakly-typed data, strongly-typed data, persistence and Flex specifically &#8211; data binding and data management)</li>
<li>different network and web architecture principles and paradigms (REST, RPC, Data Management)</li>
<li>middle-ware paradigms (transactions, messages, remote method invocation)</li>
<li>different server technologies concepts and details (servlets, non-blocking I/O, stateless and stateful objects)</li>
</ul>
<h3>The Structure of the Talk</h3>
<p>The structure of the talk reflects the typical mindset of an Obecto developer. In the beginning of a project our thoughts are mostly concentrated on acquiring a correct vision for the product to be developed. In this early phase of the project we focus our efforts on developing a working <strong>client</strong> application. We refer to such applications as <strong>prototypes</strong> &#8211;  a piece of software we can give to our client, so he can use it to test the market and reassure his understanding of the product and the interactions which encompass it. This is an approach known as <strong>Front-to-Back development</strong>.</p>
<p>The talk is structured in a similar way &#8211; we start with the remoting components available in the Flex Framework and we approach them as if we won&#8217;t ever need to know anything about the next layer in the architecture. This approach faces a lot of arguments since students often require to see the complete picture first. To defend this approach, we usually bring the argument that layering is an engineering technique that help us study independently different parts of a big and complex system. If we can&#8217;t study a system layer by layer, than there is no benefit of creating a multi-tier architecture. So this is how we start:</p>
<h3>Client-Side Remoting Components</h3>
<p>Here we discuss the service components:</p>
<ul>
<li>HTTPService</li>
<li>WebService</li>
<li>RemoteObject</li>
<li>DataService</li>
</ul>
<p>As we investigate separately each of the components, we&#8217;ll try to fill in the whole picture of the remoting architecture implemented in the Flex Framework. Click on the following UML diagram to get a 100% view on it:</p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/flex-remoting.png"><img title="flex-remoting" src="http://training.obecto.com/wp-content/uploads/2009/04/flex-remoting.png" alt="flex-remoting" width="95%" /></a></p>
<p>The samples we show are part of the LiveCycle DataServices ES installation. We&#8217;ll provide the source code for the samples we&#8217;ve slightly modified.</p>
<h3>Different ways to process the results</h3>
<p>We&#8217;ll take a look at the various ways to process the results of a service:</p>
<ul>
<li>data binding to the <em>lastResult</em> property</li>
<li>listening for ResultEvent and FaultEvent</li>
<li>using IResponder</li>
<li>using the AsyncToken</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/generate-staticproxy.zip">DOWNLOAD SAMPLE WITH THE PROXY GENERATED FROM THE WEB SERVICES WIZARD</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/testdrive-datapush.zip">DOWNLOAD SAMPLE WITH REAL TIME UPDATE OF A CHARTING COMPONENT</a></p>
<h3>The Static Service Proxy</h3>
<p>When I was preparing the talk I was trying to recall in my memories what were the reasons for us to develop and start using the StaticServiceProxy in our projects. It took me several days to recollect my memories. The idea is basically related to the concept of the BusinessDelegate in the Cairngorm micro-architecture, but with several advantages:</p>
<ul>
<li>MXML declarative support</li>
<li>smooth transition between WebService and RemoteObject</li>
<li>easy way to create mock proxies</li>
<li>a way to differentiate between different invocations</li>
</ul>
<p>Todor Kolev had prepared a pretty illustrative example on how we use it.<br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/rpc.zip">DOWNLOAD TODOR KOLEV&#8217;S SAMPLE</a></p>
<h3>Server-Side Components</h3>
<p>In the final part of the talk we&#8217;ll get acquainted with the LiveCycle Data Services components and the architecture of the LiveCycle DS server.</p>
<ul>
<li>end-points</li>
<li>the MessageBroker</li>
<li>destinations</li>
<li>adapters</li>
<li>assemblers</li>
</ul>
<h3>Useful Resources</h3>
<p><a href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;productId=4&#038;postId=8667">How to hack LiveCycle ES Data Services to run natively on a Mac</a><br />
<a href="http://www.adobe.com/products/livecycle/pdfs/95011594_lcds_planguide_wp_ue.pdf">Capacity Planning Guide for Adobe Â® LiveCycle Â® Data Services 2.6</a></p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/remoting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating and Extending Flex 3 Components</title>
		<link>http://training.obecto.com/2009/04/creating-and-extending-flex-3-components/</link>
		<comments>http://training.obecto.com/2009/04/creating-and-extending-flex-3-components/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 11:18:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[containers]]></category>
		<category><![CDATA[Data Descriptors]]></category>
		<category><![CDATA[Effects]]></category>
		<category><![CDATA[enhanced constraints]]></category>
		<category><![CDATA[extend components]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Formatter]]></category>
		<category><![CDATA[IDeferredInstance]]></category>
		<category><![CDATA[LayoutManager]]></category>
		<category><![CDATA[repeater]]></category>
		<category><![CDATA[States]]></category>
		<category><![CDATA[Transitions]]></category>
		<category><![CDATA[UIComponent]]></category>
		<category><![CDATA[Validator]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=69</guid>
		<description><![CDATA[DOWNLOAD SLIDES
This is by far the biggest topic in the course and it covers lots of subtopics as there are a lot of ways of creating and extending components. On the other side there are different types of components &#8211; visual or non-visual, but also components for data and components, let&#8217;s roughly call it a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/creating-and-extending-flex-components.pdf">DOWNLOAD SLIDES</a></p>
<p>This is by far the biggest topic in the course and it covers lots of subtopics as there are a lot of ways of creating and extending components. On the other side there are different types of components &#8211; visual or non-visual, but also components for data and components, let&#8217;s roughly call it a behavior.</p>
<h3>Visual Components &#8211; Composition</h3>
<p>The easiest way for creating custom components is to compose already existing components into a composite view. And there are various way to do that, but before we jump to these, I&#8217;ll show you what&#8217;s my understanding on the concept of <strong>code behind</strong>.</p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/codebehind.zip">DOWNLOAD CODE BEHIND SAMPLE</a></p>
<p>When doing composite components always keep in mind that there are different ways to layout and position the components:</p>
<ul>
<li>absolute positioning</li>
<li>relative positioning</li>
<li>and even enhanced constraints</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/absolutevsrelativelayouts.zip">DOWNLOAD ABSOLUTE VS. RELATIVE LAYOUT SAMPLE</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/enhancedconstraints.zip">DOWNLOAD ENHANCED CONSTRAINTS SAMPLE</a></p>
<p>The enhanced constraints sample is prepared by <a href="http://www.fabianvercuiel.com/">Fabian Vercuiel</a> as part of his talk on Flex Layouts given at the regular <a href="http://flex.riabg.org">Flex-Bulgaria User-group</a> meetings.</p>
<h3>Visual Components &#8211; Containers</h3>
<p>There are different types of containers you can use in Flex 3:</p>
<ul>
<li>layout containers</li>
<li>list containers</li>
<li>repeater (which is not a container)</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/layoutcontainers.zip">DOWNLOAD LAYOUT CONTAINERS SAMPLE</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/listcomponents.zip">DOWNLOAD LIST COMPONENTS SAMPLE (REPEATER SAMPLE ALSO INCLUDED)</a></p>
<h3>Visual Component &#8211; Extending UIComponent</h3>
<p>In order to extend UIComponent we need to know a few things:</p>
<ul>
<li>the UI component life-cycle</li>
<li>the invalidation mechanism</li>
<li>the LayoutManager phased mechanism</li>
</ul>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/ExtendingUIComponent.zip">DOWNLOAD UICOMPONENT SAMPLE</a></p>
<h3>States &amp; Transitions</h3>
<p>We&#8217;ll make a parallel between the Go4 State-pattern and States in Flex, but we&#8217;ll also take a look at the states architecture in Flex. Then we&#8217;ll get acquainted with the Transition&#8217;s mechanism in Flex. As we look at the sample we&#8217;ll run into an issue when we&#8217;re interrupting a transition. I&#8217;ll propose a possible solution in the same sample.</p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/statesandtransitions.zip">DOWNLOAD STATES AND TRANSITIONS SAMPLE</a><br />
<a href="http://training.obecto.com/wp-content/uploads/2009/04/interruptableeffects.zip">DOWNLOAD INTERRUPTIBLE TRANSITION SAMPLE</a></p>
<p>Flex 4 Gumbo Transitions are introducing the <em>autoReverse</em>-property.</p>
<h3>Non-Visual Components &#8211; Effects</h3>
<p>The intent is to get to know the Effects architecture, the various types of effects (composite effects, tweening effect and action effects), but also to take a look at what other possibilities we can get if we decide to extend some Flex effects.</p>
<h3>Non-Visual Components &#8211; Validators &amp; Formatters</h3>
<p>I&#8217;ll start with describing the Flex Validator component and the plan is to end with some suggestion how to adjust the user interaction logic of the validator in order to fulfill some specific UX needs.<br />
Formatters are just briefly mentioned.</p>
<h3>Deferred Instantiation and How To Make Template Components</h3>
<p>We can take advantage by configuring a component with MXML and controlling the instantiation of this pre-configured with deferred instantiation. I&#8217;ll propose a flex pattern for using deferred instances for factory-classes.</p>
<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/ideferredinstance.zip">DOWNLOAD DEFERRED INSTANTIATION SAMPLE</a></p>
<h3>Data Descriptors</h3>
<p>In the end of this topic we&#8217;ll make an overview of Flex Data Descriptors.</p>
<h3>What&#8217;s left out of this topic?</h3>
<p>I haven&#8217;t talked anything about Skinning and Styling Flex components &#8211; skinning and styling is yet another way to extend and customize components. But here I&#8217;ll provide you with a road-map on how to use the skinning and styling abilities build-in Flex</p>
<h4>1. Setup of build-in style-properties (a.k.a. Styling)</h4>
<p>The most easiest way for simple skin application is to modify the style-properties of the Flex-components. You just need to play around with the <a href="http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html#">Flex Styles Explorer (v3)</a> and copy the styles into your CSS-files.</p>
<h4>2. Completely changing the appearance of a component (a.k.a. Skinning)</h4>
<p>Skinning involves 2 different processes &#8211; preparation of new visual assets and the application of these assets as skins (achieved again through styling). To learn how to combine these two processes read about <a href="http://www.adobe.com/devnet/flex/articles/skins_styles.html">Designing Flex 3 skins and styles using Creative Suite 3 and Flex Builder 3</a>.<br />
A theme is a collection of related styles &#8211; usually a theme changes the looks of a large set of Flex controls. If you need an inspiration browse the <a href="http://www.scalenine.com/">ScaleNine collection of Flex themes</a>.</p>
<h4>3. Programmatic Skinning (using the drawing API to prepare visual assets and effects run-time)</h4>
<p>In some peculiar cases (like this one <a href="http://npacemo.com/wordpress/2008/05/20/flex-3-designer-scrollbar-fixed-size-scrollthumb/">Flex 3 Designer ScrollBar &#8211; Fixed Size ScrollThumb</a>) simply preparing visual assets won&#8217;t be enough. Some coding is needed to achieve the desired appearance and behavior. Again programmatic skins are applied through styling, but instead of Embed-directives you should use ClassReference-directives.</p>
<p>Keep in mind that in the new version of Flex, the current process of skinning and styling would be quite obsolete or at least different!</p>
<h3>Flex 4 Sneakpeak</h3>
<p>If you&#8217;re interested in what&#8217;s Flex 4 going to be, don&#8217;t forget to check out this video:</p>
<div style="margin: 20px 20px;"><embed src="http://tv.adobe.com/Embed.swf" quality="high" bgcolor="#000000" width="600" height="385" name="AdobeTVPlayer" play="true" loop="false" quality="high" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashVars="v=~b64~aHR0cDovL2Fkb2JlLmVkZ2Vib3NzLm5ldC9mbGFzaC9hZG9iZS9hZG9iZXR2Mi9hZGNfcHJlc2VudHMvNjRfYWRjXzAxOC5mbHY/cnNzX2ZlZWRpZD0xNDcyJnhtbHZlcnM9Mg==&#038;w=600&#038;t=http://tv.adobe.com/#vi+f1472v1501&#038;h=385"></embed></div>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/creating-and-extending-flex-3-components/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Overview of the Flex SDK</title>
		<link>http://training.obecto.com/2009/04/overview-of-the-flex-sdk/</link>
		<comments>http://training.obecto.com/2009/04/overview-of-the-flex-sdk/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 09:52:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VMware Flex]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[renderer]]></category>
		<category><![CDATA[rsl]]></category>
		<category><![CDATA[swc]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://training.obecto.com/?p=61</guid>
		<description><![CDATA[DOWNLOAD SLIDES
Usually an SDK contains:

Runtime Execution Environments
Framework
Compiler and Tools

What is important to remember from this talk is:

The architecture of the Flash Player
The retained mode of the renderer
The loop of the player (SWFTags, ActionScript, Rendering)
The conceptual single-threaded programming model
The distinction between Flash and Flex (flash.*, flex.*)
The various ways to distribute components (SWF, SWC and RSL)

But the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://training.obecto.com/wp-content/uploads/2009/04/overview-of-the-flex-sdk.pdf">DOWNLOAD SLIDES</a></p>
<p>Usually an SDK contains:</p>
<ol>
<li>Runtime Execution Environments</li>
<li>Framework</li>
<li>Compiler and Tools</li>
</ol>
<p>What is important to remember from this talk is:</p>
<ul>
<li>The architecture of the Flash Player</li>
<li>The retained mode of the renderer</li>
<li>The loop of the player (<em>SWFTags, ActionScript, Rendering</em>)</li>
<li>The <strong>conceptual single-threaded</strong> programming model</li>
<li>The distinction between Flash and Flex (<em>flash.*, flex.*</em>)</li>
<li>The various ways to distribute components (SWF, SWC and RSL)</li>
</ul>
<p>But the talk is also intended to give you an overview of the available functionality you can use within the Flex Framework. We&#8217;ll go briefly through each of the major packages in the framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://training.obecto.com/2009/04/overview-of-the-flex-sdk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
