<?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>Chris Giametta &#187; RIA</title>
	<atom:link href="http://www.appfoundation.com/blogs/giametta/tag/ria/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.appfoundation.com/blogs/giametta</link>
	<description>Rich Internet Apps</description>
	<lastBuildDate>Wed, 19 Oct 2011 22:22:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Flash &amp; Flex Magazine: Developing an Enterprise Flex Application Strategy</title>
		<link>http://www.appfoundation.com/blogs/giametta/2011/03/02/flash-flex-magazine-developing-an-enterprise-flex-application-strategy/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2011/03/02/flash-flex-magazine-developing-an-enterprise-flex-application-strategy/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 15:53:49 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=220</guid>
		<description><![CDATA[I just had a Special Report article published in the March issue of Flash&#38;Flex Developer&#8217;s Magazine. If you are not receiving this free magazine, I suggest you sign-up to get the magazine. Here is what is in the issue:
PlugrMan: The Universal API Toolkit &#8211; By Almer/Blank
Developing an Enterprise Flex Application Strategy ...]]></description>
			<content:encoded><![CDATA[<p>I just had a Special Report article published in the March issue of <a href="http://ffdmag.com/" target="_blank">Flash&amp;Flex Developer&#8217;s Magazine</a>. If you are not receiving this free magazine, I suggest you sign-up to get the magazine. Here is what is in the issue:</p>
<p>PlugrMan: The Universal API Toolkit &#8211; By Almer/Blank</p>
<p><strong>Developing an Enterprise Flex Application Strategy &#8211; by Chris Giametta</strong></p>
<p>News &#8211; by Csomák Gábor</p>
<p>LockLizard FlashGuard &#8211; by Ali Nekou Pour</p>
<p>Anicca Digital Solutions &#8211; by Ali Raza</p>
<p>NetroMedia &#8211; by Josephine Liang</p>
<p>GPU-3D in Flash &#8211; by Eslam Ahmed</p>
<p>Creating a Distributed Video Hosting Platform &#8211; by Andrey Chernih</p>
<p>File handling with AS 3.0 &#8211; by Sachin Patil</p>
<p>CREATING CUSTOM VISUAL CLASSES &#8211; by Louis DiCarro</p>
<p>Adventures In ActionScript – Serializing Objects &#8211; by Huw Collingbourne</p>
<p>Test Driven Development Or How Not To Be Trapped In A Nightmare. Part 3 &#8211; by Marc Pires</p>
<p>Preparing Your Application To Use Push Notifications &#8211; by Brandon Trebitowski, Christopher Allen, and Shannon Appelcline</p>
<p>Interview With Lance Snider, Envato &#8211; by Ali, Nekou Pour</p>
<p>An Interview With Demetrio Fortman, CEO of MotoCMS.com &#8211; by FFD Team</p>
<p>Top 3 Book Recommendations &#8211; by Ali Raza</p>
<p><a href="http://ffdmag.com/" target="_blank">Flash&amp;Flex Developer&#8217;s Magazine</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2011/03/02/flash-flex-magazine-developing-an-enterprise-flex-application-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FxConnect Framework Diagram</title>
		<link>http://www.appfoundation.com/blogs/giametta/2010/07/06/fxconnect-framework-diagram/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2010/07/06/fxconnect-framework-diagram/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 16:17:16 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Enterprise RIA Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[FxConnect]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Enterprise Application Development]]></category>
		<category><![CDATA[Enterprise Flex]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=183</guid>
		<description><![CDATA[I wanted to release the core diagram for FxConnect. We have successfully used our framework on many large scale Adobe Flex and Adobe AIR application. The diagram below represents the core objects in FxConnect and their interrelations: 


FxConnect Framework

The FxConnect programming model is made up of:
• Application Framework: The Application Framework ...]]></description>
			<content:encoded><![CDATA[<p>I wanted to release the core diagram for FxConnect. We have successfully used our framework on many large scale Adobe Flex and Adobe AIR application. The diagram below represents the core objects in FxConnect and their interrelations: </p>
<dl id="attachment_184" class="wp-caption aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2010/07/FxConnect_Diagram.png"><img class="size-medium wp-image-184" title="FxConnect_Diagram" src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2010/07/FxConnect_Diagram-300x295.png" alt="FxConnect Framework" width="300" height="295" /></a></dt>
<dd class="wp-caption-dd">FxConnect Framework</dd>
</dl>
<p>The FxConnect programming model is made up of:<br />
<strong>•</strong> <strong>Application Framework:</strong> The Application Framework is the main wrapping component for the Application that contains application context and is responsible for the setup/initialization of the application.<br />
<strong>• View Components/Modules:</strong> Modules are used to chunk the application into smaller SWFs that are loaded through the Module Manager. These modules are the features and components of the application where you start to code the different views and flows.<br />
<strong>• Application State:</strong> The Application State is responsible for holding important application attributes in a memory cache that is accessible from any part of the application that gets an instance of this model.<br />
<strong>• Data Model/Sub-models:</strong> The model provides a layer to access and change application data through creating proxies.<br />
<strong>• Proxy:</strong> Proxies represent a layer of abstraction that exposes business functions to the application. They are a means to engage with remote services such as Spring beans to retrieve data. They contain the data result and fault handlers that are implemented through the IResponder class.<br />
<strong>• Module Manager:</strong> The module manager allows you to logically partition the application into manageable view modules. Effectively breaking download of the application into small chunks that allow the views to be displayed on demand.<br />
<strong>• Navigation:</strong> This is a business object that manages view state for components and modules. In this class, you set up constants that are maintained here.<br />
<strong>• Style Manager:</strong> The Style Manager allows you to dynamically load styles into the application and is initialized at run-time.<br />
<strong>• State Engine:</strong> This utility allows the definition of application states and the valid transition to which other states are available.<br />
<strong>• Resource Manager:</strong> This utility is used to handle internationalization (i18n) and localization (l10n) details. You specify a default resource bundle by component or by application that allows you to define string names for button labels, text areas, etc.<br />
<strong>• Error Manager:</strong> Error management allows you to capture and store errors from anywhere in the application as well as use its internal pop-ups to display error messages.</p>
<p>For more information please visit AppFoundation and contact us now.</p>
<p><a href="http://www.appfoundation.com">http://www.appfoundation.com</a></p>
<p><a href="http://adobe.flex.appfoundation.com">http://adobe.flex.appfoundation.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2010/07/06/fxconnect-framework-diagram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile Development with Flex and Java</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/09/28/agile-development-with-flex-and-java/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/09/28/agile-development-with-flex-and-java/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:03:55 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Enterprise RIA Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Dallas Texas]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=122</guid>
		<description><![CDATA[Over the past several projects I have had the opportunity to develop large scale Flex applications using Agile software development. SCRUM is the major component for this development, it allows my teams of Java and Flex developers to pair together during Sprints.
Each Sprint is 2-3 weeks in length. We plan ...]]></description>
			<content:encoded><![CDATA[<p>Over the past several projects I have had the opportunity to develop large scale Flex applications using Agile software development. SCRUM is the major component for this development, it allows my teams of Java and Flex developers to pair together during Sprints.</p>
<p>Each Sprint is 2-3 weeks in length. We plan out stories that compose what functionality will be delivered in the demo at the end of the Sprint.</p>
<p>Learn more about how <a href="http://www.appfoundation.com">AppFoundation </a>uses Agile Software Development here:</p>
<p><a href="http://www.blog.appfoundation.com/2009/09/22/appfoundation-goes-agile/">AppFoundation goes Agile</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/09/28/agile-development-with-flex-and-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Geographic Information Dashboard</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/09/28/flex-geographic-information-dashboard/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/09/28/flex-geographic-information-dashboard/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:00:13 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Map]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Custom Application Development]]></category>
		<category><![CDATA[Dallas Texas]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=115</guid>
		<description><![CDATA[Last week AppFoundation released a demo application built in Flex. You can read more about it here:
AppFoundation Company Blog: GIS
The application was built on top of Modest Maps. Modest Maps displays tile-based maps from sources like Microsoft, Yahoo!, OpenStreetMap and others. Here is an image of the app.

Launch the application
If ...]]></description>
			<content:encoded><![CDATA[<p>Last week AppFoundation released a demo application built in Flex. You can read more about it here:</p>
<p><a href="http://www.blog.appfoundation.com/2009/09/22/appfoundation-geographic-information-system-gis-demo/">AppFoundation Company Blog: GIS</a></p>
<p>The application was built on top of Modest Maps. <a href="http://modestmaps.com/">Modest Maps</a> displays tile-based maps from sources like Microsoft, Yahoo!, OpenStreetMap and others. Here is an image of the app.</p>
<p><a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/09/gisLarge.png"><img src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/09/gisLarge-300x193.png" alt="gisLarge" title="gisLarge" width="300" height="193" class="alignnone size-medium wp-image-117" /></a></p>
<p><a href="http://demos.appfoundation.com/gis">Launch the application</a></p>
<p>If you want to learn more about how AppFoundation provides solutions based on Rich Internet Applications, please drop me a line at <a href="http://www.appfoundation.com">www.appfoudation.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/09/28/flex-geographic-information-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dallas Based AppFoundation, Inc &#8211; Enterprise RIA Development</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/08/21/dallas-based-appfoundation-inc-enterprise-ria-development/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/08/21/dallas-based-appfoundation-inc-enterprise-ria-development/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 19:36:46 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Enterprise RIA Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Custom Application Development]]></category>
		<category><![CDATA[Enterprise Application Development]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=106</guid>
		<description><![CDATA[I wanted to get the word out that my new company, AppFoundation Technology Group, Inc. has launched its new web site in Adobe Flex.
The site uses Flex to communicate with PHP through HTTPServices to access dynamic content that drives &#8216;pages&#8217; being created in the rich internet application. The graphics were ...]]></description>
			<content:encoded><![CDATA[<p>I wanted to get the word out that my new company, AppFoundation Technology Group, Inc. has launched its new web site in Adobe Flex.</p>
<p>The site uses Flex to communicate with PHP through HTTPServices to access dynamic content that drives &#8216;pages&#8217; being created in the rich internet application. The graphics were mostly done using Photoshop and put into CSS using 9-slice scaling.</p>
<p>You can see the site here: <a href="http://www.appfoundation.com/">www.appfoundation.com</a></p>
<p>Please drop by to see how Af can help you deliver your Enterprise RIA projects and much more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/08/21/dallas-based-appfoundation-inc-enterprise-ria-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Render PDF in Adobe AIR with PDF Scaling</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/04/14/render-pdf-in-adobe-air-with-pdf-scaling/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/04/14/render-pdf-in-adobe-air-with-pdf-scaling/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 19:34:21 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=45</guid>
		<description><![CDATA[AIR can render PDFs using the HTMLControl as long as the host computer
has Acrobat 8 or later installed.
I have seen many examples of doing this, just without the ability to scale the PDF larger and smaller when a resize of the AIR application occurs. So I worked that issue out ...]]></description>
			<content:encoded><![CDATA[<p>AIR can render PDFs using the HTMLControl as long as the host computer<br />
has Acrobat 8 or later installed.</p>
<p>I have seen many examples of doing this, just without the ability to scale the PDF larger and smaller when a resize of the AIR application occurs. So I worked that issue out and wanted to share it with the Flex community.</p>
<p>To load a PDF into an AIR application, use the HTMLLoader class to load the PDF into your AIR window. Since you cannot add the HTMLLoader as a child, you will need to create a <em>UIComponent()</em> to add the PDF to a container.</p>
<p>If you look at the <em>addFile() </em>function, you will see that I first checked the PDF capability had a STATUS_OK before proceeding to the PDF loading steps with the following line of code:</p>
<p><code>if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK) {}</code></p>
<p>Once successful, I created an URLRequest to locate the PDF on my Tomcat server. You could easily add a parameter to set the PDF based on your content management as needed.</p>
<p>I then set the PDF&#8217;s initial height and width to that of the <em><mx:VBox></em> with the id of <strong>container</strong>. After that is done, I loaded the PDF to the HTMLLoader from the URLRequest.</p>
<p>Now that you have a handle on the PDF and it is loaded to the AIR application, you can use the <em>UIComponent.addChild </em>function to add the PDF to the UIComponent. After that, you need to add the child to the <em><mx:VBox></em> which is done by calling the <em>addChild() </em>function on <strong>container</strong>.</p>
<p>If you look at the example from the Adobe Livedocs you will notice they give the PDF&#8217;s height and width static numbers. What we want to do is allow the PDF to scale on window resize. To accomplish this, create a new function that is executed everytime the application is resized. In this example, I created the <em>scalePDF() </em>function that is called by the <strong>resize </strong>function on the <em><mx:VBox></em> as follows:</p>
<p><code><mx:VBox id="container" width="100%" height="100%" resize="scalePDF()"/></code></p>
<p>Since the width and height are set to 100% on the <em><mx:VBox></em> and I set the PDF&#8217;s height and width to the <em><mx:VBox> </em>height and width, the PDF will resize to fit the width and height of the <em><mx:VBox></em> every time it is resized. This will always give you the maximum reading space available for the PDF.</p>
<p>Here is the full source for this example. You can take this code and create a component that can be reused throughout your AIR applications. Enjoy.</p>
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:WindowedApplication
   xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"&gt;

   &lt;mx:Script&gt;
      &lt;![CDATA[
      import mx.core.UIComponent;

      private var pdf:HTMLLoader = new HTMLLoader();

      private function addFile():void
      {
         if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK)
         {
            var request:URLRequest =
               new URLRequest("http://localhost:8080/af_Central/a.pdf");

            pdf.height = container.width;
            pdf.width = container.width;

            pdf.load(request);

            var ui:UIComponent = new UIComponent();
            ui.addChild(pdf)

            container.addChild(ui);
         }
         else
         {
            trace("PDF cannot be displayed. Error code:",
               HTMLLoader.pdfCapability);
         }
      }
      private function scalePDF():void
      {
         pdf.height = container.width;
         pdf.width = container.width;
      }
      ]]&gt;
   &lt;/mx:Script&gt;

   &lt;mx:Button label="Do It" click="addFile()" /&gt;
   &lt;mx:VBox id="container" width="100%" height="100%"
      resize="scalePDF()"/&gt;

&lt;/mx:WindowedApplication&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/04/14/render-pdf-in-adobe-air-with-pdf-scaling/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Pro Flex on Spring</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/03/24/pro-flex-on-spring/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/03/24/pro-flex-on-spring/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 15:53:38 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/2009/03/24/pro-flex-on-spring/</guid>
		<description><![CDATA[Over the past 5+ years I have done quite a bit of work with Flex and Spring. I am happy to announce the release of my first book; Pro Flex on Spring. You can find the book on www.amazon.com or pick it up at your local Barnes and Nobles.
 
Pro Flex on ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/03/proflexonspringbook.png" title="ProFlexonSpring Book"></a>Over the past 5+ years I have done quite a bit of work with Flex and Spring. I am happy to announce the release of my first book; Pro Flex on Spring. You can find the book on <a href="http://www.amazon.com/">www.amazon.com</a> or pick it up at your local Barnes and Nobles.</p>
<p> <a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/03/proflexonspringbook.png" title="ProFlexonSpring Book"><img src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/03/proflexonspringbook.thumbnail.png" alt="ProFlexonSpring Book" /></a></p>
<p>Pro Flex on Spring is the first book covering the use of the Spring Framework as an integration point for the Flex Framework so that enterprise Java developers can now add a Rich Internet Application front end to their “back-end”. Flex on Spring completes the Spring Framework, and makes it arguably the most complete, top-down, application development stack available to Java developers.</p>
<p>What you’ll learn:<br />
• Explore best practices on architecting enterprise Rich Internet Applications<br />
with Flex and Spring.<br />
• Discover how Flex applications interface with Spring services.<br />
• Understand how to persist data, end–to–end, using Flex data communication protocols<br />
with Spring and its interactions with iBATIS, Hibernate, and JDBC.<br />
• Work with solid frameworks, Cairngorm and Pure MVC, to build Flex applications.<br />
• Build a practical application that demonstrates real experience in delivering enterprise RIAs.<br />
• See how Spring Factories play a key role in routing calls to Spring classes from Flex clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/03/24/pro-flex-on-spring/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Internet Explorer:  Setting Focus on Flex Apps / Flash Player</title>
		<link>http://www.appfoundation.com/blogs/giametta/2007/07/09/internet-explorer-setting-focus-on-flex-apps-flash-player/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2007/07/09/internet-explorer-setting-focus-on-flex-apps-flash-player/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 15:24:50 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/2007/07/09/internet-explorer-setting-focus-on-flex-apps-flash-player/</guid>
		<description><![CDATA[One of the biggest issues I have come across when deploying a Flex application has been the difficulty in gaining initial focus on the Flash player and the components within it.
I finally came up with a simple approach that is working for me with IE 6 and IE 5. I ...]]></description>
			<content:encoded><![CDATA[<p>One of the biggest issues I have come across when deploying a Flex application has been the difficulty in gaining initial focus on the Flash player and the components within it.</p>
<p>I finally came up with a simple approach that is working for me with IE 6 and IE 5. I would like to hear any feedback for this solution working in different versions of IE and other browsers.</p>
<p>What I did is modify the Flex project html-template. I added the following to the &lt;body&gt; tag.</p>
<p><font size="2">&lt;body scroll=&#8221;no&#8221; <strong>onload=&#8221;document.getElementById(&#8216;${application}&#8217;).focus()&#8221;</strong>&gt;</font></p>
<p>This points the onload() function in the html wrapper to force focus on the Flash object by object id.</p>
<p>Once you have modified the html wrapper file you can create a simple Flex application to test with. Create a new Flex Project and simply copy the following mxml code into your application. When you run this application you should see a blinking cursor in the text box.</p>
<pre><code&lt;?xml version="1.0" encoding="utf-8"></code&lt;?xml>&lt;mx:Application xmlns:mx="<a href="http://www.adobe.com/2006/mxml">http://www.adobe.com/2006/mxml" </a>
  creationComplete="initApp()"&gt;
&lt;mx:Script&gt;
 &lt;![CDATA[
  import mx.controls.Alert;
  import mx.events.FlexEvent;       

  private function initApp():void {
   // set the focus to the first text input
   input1.setFocus();
  }
 ]]&gt;
 &lt;/mx:Script&gt;      

 &lt;mx:Canvas width="420" height="244"&gt;
  &lt;mx:TextInput id="input1" x="130" y="50"/&gt;
 &lt;/mx:Canvas&gt; 
&lt;/mx:Application&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2007/07/09/internet-explorer-setting-focus-on-flex-apps-flash-player/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flex, Spring, iBATIS, Cairngorm: Bringing It All Together</title>
		<link>http://www.appfoundation.com/blogs/giametta/2007/05/09/flex-spring-ibatis-caringorm-bringing-it-all-together/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2007/05/09/flex-spring-ibatis-caringorm-bringing-it-all-together/#comments</comments>
		<pubDate>Wed, 09 May 2007 18:00:05 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Cairngorm]]></category>
		<category><![CDATA[iBATIS]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/2007/05/09/flex-spring-ibatis-caringorm-bringing-it-all-together/</guid>
		<description><![CDATA[Over the past years I have been implementing Flex projects in many different settings. They range from business intelligence applications running against large data warehouses to simple tools that perform a very custom business function. From the beginning, using Flex 1.5 to now with Flex 2.0, I have experienced quite a few ...]]></description>
			<content:encoded><![CDATA[<p>Over the past years I have been implementing Flex projects in many different settings. They range from business intelligence applications running against large data warehouses to simple tools that perform a very custom business function. From the beginning, using Flex 1.5 to now with Flex 2.0, I have experienced quite a few challenges and what I consider best practices when developing Flex Rich Internet Applications.  </p>
<p>I believe in creating a consistent, modular, and repeatable architecture. The architecture must be sufficient to support small applications as well as extremely robust enterpirse applications. A key to project success is to create an architecture that new developers can rapidly integrate themselves into and begin to be productive on day one. I feel that Flex combined with Spring, iBATIS, and Cairngorm help me reach these goals of a patterened based, repeatable architecture.</p>
<p>I have put together a sample application that I hope will communicate a series of Flex best practices. This Contact application implements one set of standard CRUD constructs. You should be able to understand how to architect an enterprise application down to a simple tool with this example. One thing I find very helpful about Cairngorm is how it organizes itself in the project space. You can break out modules to separate work for your team. It works in large and small shops.</p>
<p>I would also like to acknowledge the work done by <a href="http://www.cairngormdocs.org/"><font color="#707070">Cairngorm Docs</font></a>, <a href="http://www.coenraets.org/blog/"><font color="#707070">Christophe Coenraets</font></a>, and <a href="http://labs.adobe.com/"><font color="#707070">Adobe Labs</font></a>. I have learned a great deal regarding the technology in this post from those sources as well as many other RIA blogs.</p>
<p> Experience the application:</p>
<p><a target="_blank" href="http://www.appfoundation.com/flexapps/CairngormExampleProject.swf" title="Cairngorm Example Application"><img src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2007/04/cairngormexampleapp.png" alt="Cairngorm Example Application" /></a></p>
<h6>Flex Makeup:</h6>
<p>Flex provides a solid framework for building highly interactive Rich Internet Applications. Flex is made up of the following programming aspects:</p>
<ul>
<li><strong>ActionScript 3.0:  </strong>ActionScript 3.0 is a powerful, object-oriented programming language that is ideally suited for rapidly building RIAs. AS3 facilitates rapid development for large applications, handling large data sets, and is object oriented. Java developers will find an easy transition to Flex Actionscript development. AS3 is an ECMAScript compliant language.</li>
<li><strong>MXML</strong>:  MXML is the XML-based language that developers use to lay out components in Flex applications. It provides a declarative approach to controlling an application&#8217;s visual appearance.</li>
<li><strong>Flash 9: </strong>Flex is compiled into Flash .swf. This .swf is executed on the client by the Flash Virtual Machine. This allows applications built in Flex to be executed on virtually any platform that supports Flash 9. That includes PCs, hand-held devices, POS Terminals, PDAs, etc&#8230;</li>
</ul>
<p>For more information regarding Flex you can find it at <a href="http://www.adobe.com/products/flex"><font color="#707070">http://www.adobe.com/products/flex</font></a>. The Flex API documentation can be found <a href="http://livedocs.macromedia.com/flex/2/langref/index.html"><font color="#707070">here</font></a>.</p>
<h6>Spring Makeup:  </h6>
<p>Spring is a popular Java framework that provides a central automated configuration for writing your application objects. Springs lightweight container is capable of assembling loosely-coupled components which is the basis for reuse.</p>
<p>The DAO implementation support allows Spring to easily integrate with persistence frameworks like Toplink, Hibernate, JDO, and iBATIS. One key beneift of using Spring is if you ever need to change your persistence framework you can do so by decoupling your existing framework and plugging in a new persistence framework. You will retain the majority of your code base.</p>
<p>You can find more information about Spring at <a href="http://www.springframework.org/"><font color="#707070">http://www.springframework.org</font></a>.</p>
<h6>iBATIS Makeup:</h6>
<p>iBATIS is a data mapping framework that couples objects with stored procedures or SQL statements using an XML structure. iBATIS allows simple integration to your database of choice.</p>
<p>I like iBATIS for the flexibilty of the SQL entered in the SQLMaps. Many of the Flex applications I have written reside on top of a data warehouse. I need to create complex SQL that runs effeciently on databases like Netezza, Oracle, Teradata, and Informix.</p>
<p>More information about iBATIS can be found at <a href="http://ibatis.apache.org"><font color="#707070">http://ibatis.apache.org</font></a>.</p>
<h6>Cairngorm Makeup:</h6>
<p>Cairngorm is an architectural framework that offers a starting point for RIA development. It directs consistency, realiabiliy, and modularity in Rich Internet Development for the User Interface by implementing reliable design patterns.</p>
<p>Using Cairngorm allows you to break up project work across large teams. Flex aids in this by allowing you to easily produce an application wrapper to build modules in Flex tied together by Cairngorm.</p>
<p>The Cairngorm architecture is built to allow you to handle user gestures on the client, manage client state, and encapsulate business logic in the client.</p>
<p>In this article we will discuss how Cairngorm implenets Command, Delegate, and Service Locator patterns to interact with a Spring/iBATIS service model.</p>
<p>The Cairgorm programming model is made of:</p>
<ul>
<li><strong>Value Object:  </strong>The Cairngorm Value Object acts as a marker interface to help improve readability of code. The VO is nothing more than a mapping to your service bean. This VO is used to help transform incoming object lists to map to flex view objects like a datagrid.</li>
<li><strong>Event: </strong>The event describes the type of object that will be processed when the event is fired. The event sets an event type to be listened to by the controller. The Cairngorm Event class is required for event processing.</li>
<li><strong>Front Controller: </strong>This class controls user actions by binding the event to a specific command. That marrage of these two components allows Flex to detect user gestures and return data to the model.</li>
<li><strong>Command:</strong> The command class enforces the binding of the Event between the Front Controller. The command is responsible for initiating external calls through the Business Delegate.</li>
<li><strong>Business Delegate: </strong>The Business Delegate implements the Responder inteface that handles data returned as the result of a service call. I try to match my Business Delegate to my server side service method implementation. A delegate can call other services as needed, but that can cause code maintainability issues for the application.</li>
<li><strong>Service Locator:</strong> The Business Delegate locates the application level service and passes references of the Commands Result and Fault handlers.</li>
<li><strong>Model Locator:</strong> The Model Lcoator is used to instanciate the applications model and/or models. The locator grants access to data objects that the Command will apply results too for the View layer to assign to components like a datagrid.</li>
</ul>
<p><strong>Flex-Cairngorm Architecture        Spring-iBATIS Architecture</strong></p>
<p><a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2007/04/cairngorm2_rpc_ui.png" title="Flex-Cairngorm Architecture"><img src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2007/04/cairngorm2_rpc_ui.thumbnail.png" alt="Flex-Cairngorm Architecture" /></a>                       <a href="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2007/04/cairngorm2_rpc_ibatisspring.png" title="Spring-iBATIS Architecture"><img src="http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2007/04/cairngorm2_rpc_ibatisspring.thumbnail.png" alt="Spring-iBATIS Architecture" /></a></p>
<h5>Application Configuration for Flex, Spring, Cairngorm, and iBATIS</h5>
<h6>Step 1: Get the project files</h6>
<ol>
<li>Download cairngorm-spring-iBATIS.zip <a href="http://www.appfoundation.com/flexapps/downloads/cep.zip"><font color="#707070">here</font></a>. ***This zip file contains all of the files required to run this example project. You do not need to download items 3 through 6 below unless you want to check out the open-source projects themselves.</li>
<li>Expand cairngorm-spring-iBATIS.zip to a Tomcat /webapps location or other j2ee web server.</li>
<li>Download the Spring framework at Spring framework (version 2.0) at <a href="http://www.springframework.org/download"><font color="#707070">http://www.springframework.org/download</font></a></li>
<li>Download Cairngorm 2 for Flex at <a href="http://labs.adobe.com/wiki/index.php/Cairngorm"><font color="#707070">http://labs.adobe.com/wiki/index.php/Cairngorm</font></a></li>
<li>Download iBATIS at <a href="http://ibatis.apache.org"><font color="#707070">http://ibatis.apache.org</font></a></li>
<li>Download MySQL at <a href="http://dev.mysql.com/downloads"><font color="#707070">http://dev.mysql.com/downloads</font></a></li>
</ol>
<h6>Step 2: Setting up Cairngorm</h6>
<p>To deploy with Cairngorm you need to simply unpack the Cairngorm.swc and relocate it to:</p>
<p>{context-root}\WEB-INF\flex\user_classes</p>
<h6>Step 3: Setting up Spring</h6>
<ol>
<li>Copy <strong>spring.jar</strong> to {context-root}\WEB-INF\lib directory of your web application</li>
<li>Modify the web.xml file of your web application. Add the <strong>context-param</strong> and <strong>listener</strong> definitions as follows:  
<pre><code>&lt;context-param&gt;     
     &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
     &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
&lt;/context-param&gt;                        

&lt;!-- Spring Session attribute and binding listener support --&gt;
&lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
&lt;/listener&gt;
</code></pre>
</li>
<li>Copy SpringFactory.class and SpringFactory$SpringFactoryInstance.class from your compiled source location to {context-root}WEB-INFclassescomappfoundationcommonfactories. This code developed by Jeff Vroom</li>
<li>Register the Spring factory in {context-root}\WEB-INF\flex\services-config.xml:
<pre><code>&lt;factories&gt;  
     &lt;factory id="spring" class="com.appfoundation.common.factories.SpringFactory"/&gt;
&lt;/factories&gt;
</code></pre>
</li>
</ol>
<h6>Step 4: Setting up iBATIS</h6>
<ol>
<li>Locate <strong>ibatis-common-2.jar</strong>, <strong>ibatis-dao-2.jar</strong>, and <strong>ibatis-sqlmap2.jar</strong></li>
<li>Copy those jar files to:  {context-root}WEB-INFlib</li>
<li>Modify your sql-map-config.xml in: {context-root}WEB-INF
<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"<a href="http://ibatis.apache.org/dtd/sql-map-config-2.dtd">http://ibatis.apache.org/dtd/sql-map-config-2.dtd</a>"&gt;                          

&lt;sqlMapConfig&gt;
      &lt;sqlMap resource="../sqlmaps/Contact.xml" /&gt;
&lt;/sqlMapConfig&gt;
</code></pre>
</li>
</ol>
<h6>Step 5: Register the Spring Beans</h6>
<ol>
<li>Locate your <strong>applicationContext.xml</strong> in {context-root}\WEB-INF</li>
<li>Modify the applicationContext file to include your Spring beans as follows:
<pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;!DOCTYPE beans
        PUBLIC "-//SPRING//DTD BEAN//EN"
        "<a href="http://www.springframework.org/dtd/spring-beans.dtd">http://www.springframework.org/dtd/spring-beans.dtd</a>"&gt;
&lt;beans&gt;
     &lt;!-- START Load application properties --&gt;
     &lt;bean id="propertyConfigurer"
       class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
       &lt;property name="location"&gt;&lt;value&gt;classpath:../application.properties&lt;/value&gt;&lt;/property&gt;
     &lt;/bean&gt;
    &lt;!-- END Load application properties --&gt;                          

 &lt;!--  START DB connection info --&gt;
  &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
         destroy-method="close"&gt;
       &lt;property
         name="driverClassName"&gt;&lt;value&gt;${jdbc.driverClassName}&lt;/value&gt;&lt;/property&gt;
       &lt;property name="url"&gt;&lt;value&gt;${jdbc.url}&lt;/value&gt;&lt;/property&gt;
       &lt;property name="username"&gt;&lt;value&gt;${jdbc.username}&lt;/value&gt;&lt;/property&gt;
       &lt;property name="password"&gt;&lt;value&gt;${jdbc.password}&lt;/value&gt;&lt;/property&gt;
   &lt;/bean&gt;    &lt;bean id="transactionManager"
       class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
       &lt;property name="dataSource"&gt;&lt;ref local="dataSource"/&gt;&lt;/property&gt;
    &lt;/bean&gt;
 &lt;!--  END DB connection info --&gt;    
 &lt;!--  START iBATIS config --&gt;
  &lt;bean id="sqlMapClientTemplate"
     class="org.springframework.orm.ibatis.SqlMapClientTemplate"&gt;
    &lt;property name="sqlMapClient" ref="sqlMapClient" /&gt;
  &lt;/bean&gt;
   &lt;bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&gt;
       &lt;property name="dataSource" ref="dataSource" /&gt;
       &lt;!--  this needs to point to where the sql-map-config.xml file is --&gt;
       &lt;property name="configLocation" value="classpath:../sql-map-config.xml" /&gt;
   &lt;/bean&gt;
 &lt;!--  END iBATIS config --&gt;                          

 &lt;!--  START DAO config --&gt;
  &lt;bean id="contactDao" class="com.appfoundation.vms.dao.ibatis.ContactDaoImpl"&gt;
   &lt;property name="sqlMapClientTemplate" ref="sqlMapClientTemplate" /&gt;
  &lt;/bean&gt;
 &lt;!--  END DAO config --&gt;
 &lt;bean id="contactService" class="com.appfoundation.vms.services.ContactServiceImpl"&gt;
     &lt;property name="contactDao"&gt;&lt;ref bean="contactDao"/&gt;&lt;/property&gt;       
 &lt;/bean&gt;
&lt;/beans&gt;
</code></pre>
</li>
</ol>
<h6>Step 6: Configure the Flex Remote Services</h6>
<ol>
<li>Locate and open <strong>remoting-config.xml</strong> in {context-root}\WEB-INF\flex.</li>
<li>Add the following destination:
<pre><code>&lt;destination id="contactService"&gt;     
     &lt;properties&gt;
            &lt;factory&gt;spring&lt;/factory&gt;
            &lt;source&gt;contactService&lt;/source&gt;
      &lt;/properties&gt;
&lt;/destination&gt;
</code></pre>
</li>
</ol>
<h6>Step 7: Set up the MySQL Database Table</h6>
<p>I am using MySQL Server 5.0 to run this example database. You can switch to your preferred database by changing the application.properties that iBATIS reads into its connection object. Those properties are injected into the iBATIS persistence framework by Spring.</p>
<ol>
<li>Locate <strong>MySQL-Setup.txt </strong>in {context-root}\WEB-INF\db</li>
<li>Create a new database catalog named <strong>client</strong> </li>
<li>Run the two SQL statements to set up the contacts table and insert a default record</li>
</ol>
<h6>Step 8: Running the Application</h6>
<ol>
<li>Open a browser, access http://host:port/context-root/CairngormExampleProject.mxml, and run the application. For example, I run the application using http://localhost:8080/cep/CairngormExampleProject.mxml in my browser.</li>
</ol>
<param value="http://appfoundation.com/flexapps/BlogPlugCairngormPost1.swf" name="movie"></param><embed height="120" width="396" src="http://appfoundation.com/flexapps/BlogPlugCairngormPost1.swf"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2007/05/09/flex-spring-ibatis-caringorm-bringing-it-all-together/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

