<?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; Rich Internet</title>
	<atom:link href="http://www.appfoundation.com/blogs/giametta/category/rich-internet/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>WASABI-SIG Dallas User Group Speaker</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/10/06/wasabi-sig-dallas-user-group-speaker/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/10/06/wasabi-sig-dallas-user-group-speaker/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 20:25:59 +0000</pubDate>
		<dc:creator>Chris Giametta</dc:creator>
				<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rich Internet]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[Dallas Texas]]></category>
		<category><![CDATA[Data Warehouse]]></category>
		<category><![CDATA[Enterprise Application Development]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=127</guid>
		<description><![CDATA[I will be the guest speaker on October 14th. You can find out more here. I hope to see you at the event. Here is the information regarding the location and topic.
October 14th, 2009 &#8211; 10:00 a.m. to 12:00 p.m.
Christopher A. Parr Library, Program Conference Room
6200 Windhaven Parkway, Plano, TX ...]]></description>
			<content:encoded><![CDATA[<p>I will be the guest speaker on October 14th. You can find out more <a href="http://www.wasabi-sig.org/meetings.php">here</a>. I hope to see you at the event. Here is the information regarding the location and topic.</p>
<p><strong>October 14th, 2009 &#8211; 10:00 a.m. to 12:00 p.m.</strong><br />
Christopher A. Parr Library, Program Conference Room<br />
6200 Windhaven Parkway, Plano, TX 75093</p>
<p><strong>Data Visualization with Adobe Flex</strong></p>
<p>ABSTRACT:</p>
<p>In this discussion, Chris Giametta will present an overview discussing the challenges of large data sets, complex data arrangements, and effective UI implementations using Adobe Flex.</p>
<p>This presentation is about building rich Internet applications that combine the interactive user experiences of Adobe Flex with the delivery of complex data from large data warehouses and databases. The goal for this discussion is to give you a better understanding of how RIAs can solve client needs in the business intelligence space.</p>
<p>BIO:</p>
<p>Chris Giametta is founder and President of AppFoundation Technology Group, a leading RIA company in Dallas/Fort Worth focused on data visualization and web based application development. AppFoundation employs advanced methodologies and tools to help decision makers build the situational awareness of their competitive terrain.</p>
<p>Chris is an Adobe Certified Expert in Adobe Flex. He was been working with Flex since 2004. Before learning Flex and Spring (Java based framework), he cut his teeth with EDS developing customer relationship management (CRM) systems built with Java on the front end, and a C++ implementation on the server side. He has extensive experience in delivering Business Intelligence systems, e-commerce, and ERP applications in a rich format.</p>
<p>As the author of Pro Flex on Spring, Chris focused on how to develop large scale applications using patterned based development to implement RIA technology.</p>
<p>You can contact Chris by visiting:</p>
<p><a href="http://www.appfoundation.com">www.appfoundation.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/10/06/wasabi-sig-dallas-user-group-speaker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting at JavaMug Dallas &#8211; Integrating Flex with Spring</title>
		<link>http://www.appfoundation.com/blogs/giametta/2009/06/26/presenting-at-javamug-dallas-integrating-flex-with-spring/</link>
		<comments>http://www.appfoundation.com/blogs/giametta/2009/06/26/presenting-at-javamug-dallas-integrating-flex-with-spring/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 14:52:24 +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[Technology]]></category>
		<category><![CDATA[Adobe Flex]]></category>
		<category><![CDATA[Dallas Texas]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.appfoundation.com/blogs/giametta/?p=86</guid>
		<description><![CDATA[I will be the speaker for the July 8th meeting at the Java Metroplex user&#8217;s Group covering Flex and Spring integration.
Please check out www.javamug.org for more information regarding the event. I hope to see you there if you are in the Dallas/Fort Worth area.
I also plan to give a first ...]]></description>
			<content:encoded><![CDATA[<p>I will be the speaker for the July 8th meeting at the Java Metroplex user&#8217;s Group covering Flex and Spring integration.</p>
<p>Please check out <a href="http://www.javamug.org/">www.javamug.org</a> for more information regarding the event. I hope to see you there if you are in the Dallas/Fort Worth area.</p>
<p>I also plan to give a first peek of Af-Connect. Af-Connect is a collaborative application environment that uses a controlled social networking model to share client and project information. You can create private sites to share files, projects, and contacts with partners, co-workers, and clients. The application is built in Adobe AIR on top of a Spring implementation.</p>
<p>Update:<br />
I enjoyed the opportunity to present at JavaMug in Dallas Texas. Thanks to Erik Weibust for being a great host and taking care of the details for me. Here are the presentation slides and Flex, Spring, and FlexLib projects I showed in the meeting.</p>
<p><a href='http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/06/JavaMug_Presentation.pdf'>JavaMug_Presentation</a></p>
<p><a href='http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/06/jm_flexLib.zip'>Flex Library Project</a></p>
<p><a href='http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/06/jm_Spring.zip'>Spring Project</a></p>
<p><a href='http://www.appfoundation.com/blogs/giametta/wp-content/uploads/2009/06/jm_Flex.zip'>Flex Project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appfoundation.com/blogs/giametta/2009/06/26/presenting-at-javamug-dallas-integrating-flex-with-spring/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>

