<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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" version="2.0">

<channel>
	<title>Cornel Creanga</title>
	
	<link>http://cornelcreanga.com</link>
	<description>Random thoughts about software development.</description>
	<pubDate>Mon, 17 Nov 2008 17:52:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/CornelCreanga" type="application/rss+xml" /><item>
		<title>Adobe MAX Milan - discount for Adobe products</title>
		<link>http://cornelcreanga.com/2008/11/adobe-max-milan-discount-for-adobe-products/</link>
		<comments>http://cornelcreanga.com/2008/11/adobe-max-milan-discount-for-adobe-products/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 17:52:03 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=49</guid>
		<description><![CDATA[If you will attend Adobe MAX Milan you will get a 10% discount for every Adobe product (including Adobe Creative Suite 4). Please read the conditions bellow**:
** Offer good for Adobe MAX 2008 attendees only. Offer cannot be combined with any other offer, package or registration code. The offer with the 10% discount off is [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Adobe MAX Milan - discount for Adobe products", url: "http://cornelcreanga.com/2008/11/adobe-max-milan-discount-for-adobe-products/" });</script>]]></description>
			<content:encoded><![CDATA[<p>If you will attend Adobe MAX Milan you will get a 10% discount for every Adobe product (including Adobe Creative Suite 4). Please read the conditions bellow**:</p>
<p>** Offer good for Adobe MAX 2008 attendees only. Offer cannot be combined with any other offer, package or registration code. The offer with the 10% discount off is valid on all products on all Adobe Store in EMEA available via an offer code embedded on the following <a href="www.adobe.com/go/max2008">URL</a> . Offer valid for qualifying purchases made between November 16, 2008 and December 6, 2008, applicable for web or phone orders. Terms and conditions for Adobe MAX registrations will also apply. Offer is not transferrable and valid only for individual product registrant in possession of a valid purchase confirmation. OEM, NFR, and volume licensing customers are not eligible. Void where prohibited.</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Adobe+MAX+Milan+-+discount+for+Adobe+products&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F11%2Fadobe-max-milan-discount-for-adobe-products%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/11/adobe-max-milan-discount-for-adobe-products/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adobe MAX and Thermo</title>
		<link>http://cornelcreanga.com/2008/11/adobe-max-and-thermo/</link>
		<comments>http://cornelcreanga.com/2008/11/adobe-max-and-thermo/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 14:11:18 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=48</guid>
		<description><![CDATA[If you are a designer or a developer interested by designer-developer workflow probably you heard about Thermo and all the buzz around it. By attending Max you will have access to the release before anybody else and you can participate to  Intro to Thermo sessions.
<script type="text/javascript">SHARETHIS.addEntry({ title: "Adobe MAX and Thermo", url: "http://cornelcreanga.com/2008/11/adobe-max-and-thermo/" });</script>]]></description>
			<content:encoded><![CDATA[<p>If you are a designer or a developer interested by designer-developer workflow probably you heard about Thermo and all the buzz around it. By attending Max you will have access to the release before anybody else and you can participate to  <a onclick="javascript:pageTracker._trackPageview('a/http://max.adobe.com/na/sessions/browser/#600');" href="http://max.adobe.com/na/sessions/browser/#600" onclick="javascript:pageTracker._trackPageview('/outbound/article/max.adobe.com');">Intro to Thermo</a> sessions.</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Adobe+MAX+and+Thermo&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F11%2Fadobe-max-and-thermo%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/11/adobe-max-and-thermo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bringing data into Flex applications - introduction</title>
		<link>http://cornelcreanga.com/2008/11/bringing-data-into-flex-applications-introduction/</link>
		<comments>http://cornelcreanga.com/2008/11/bringing-data-into-flex-applications-introduction/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 14:12:04 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[LCDS/Blaze DS]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=46</guid>
		<description><![CDATA[This article will describe the most common ways to bring data into a Flex application and will present the advantages and disadvantages of each approach. It assumes that the reader has a basic understanding of the Flex language.
Unlike a classic web application (by classic I mean pre AJAX) where the pages are generated on the [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Bringing data into Flex applications - introduction", url: "http://cornelcreanga.com/2008/11/bringing-data-into-flex-applications-introduction/" });</script>]]></description>
			<content:encoded><![CDATA[<p>This article will describe the most common ways to bring data into a Flex application and will present the advantages and disadvantages of each approach. It assumes that the reader has a basic understanding of the Flex language.</p>
<p>Unlike a classic web application (by classic I mean pre AJAX) where the pages are generated on the server the Flex application is loaded at startup and makes calls in order to load or to save data. Of course a Flex application can also make requests in order to load other Flex modules in the same way a Java application can dynamically load JAR libraries but that is a subject for a different article.</p>
<p>Some of the presented solutions are server agnostic – you can use anything on the backend – others assume that you have installed a Java application server where you can deploy various solutions including BlazeDS, Livecycle Data Services, GraniteDS, WebORB etc.</p>
<p>a)Opening a socket connection between the Flex application and the backend.</p>
<p>A socket connection It is the most low-level solution and at the same time the one most flexible. You will have to define your own protocol and how to serialize data (or use the AMF/Hessian protocols). In most cases, you should use this solution only if you have a very specific business need and the existing solutions do not meet your requirements).</p>
<p>You can use Apache MINA if you intend to do that. For example Red5 Flash server was written using the MINA framework.</p>
<p>Bellow is a simple code snippet that shows how to create a socket and how to read or write data:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff;">public</span> function initConnection():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    CursorManager.setBusyCursor();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    Security.loadPolicyFile(<span style="color: #006080;">&#8220;xmlsocket://localhost:24&#8243;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     socket = <span style="color: #0000ff;">new</span> Socket();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">     socket.addEventListener( Event.CONNECT, onConnect );</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    socket.addEventListener(ProgressEvent.SOCKET_DATA, socketRead);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    socket.addEventListener(ErrorEvent.ERROR, errorHandler);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    socket.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    socket.connect(<span style="color: #006080;">&#8220;localhost&#8221;</span>, 23);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff;">public</span> function socketWrite(<span style="color: #0000ff;">event</span>:Event){</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    socket.writeUTF(inputName.text);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    socket.flush();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff;">public</span> function socketRead(<span style="color: #0000ff;">event</span>:ProgressEvent){</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">  <span style="color: #0000ff;">while</span> ( socket.bytesAvailable ) {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        var data:String = socket.readUTF();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        Alert.show(data);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">  }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre>
</div>
</div>
<p>You probably noticed the line Security.loadPolicyFile(&#8221;xmlsocket://localhost:24&#8243;); By default a Flex application can open connections only to the same domain from where it was loaded and on the same port. In order to be able to initiate connections to another domain a file named crossdomain.xml must exists on that server. This file specifies the what resources are available and for what domains. In our case the policy file will allow that the all the SWF loaded from any domain are allowed to connect to the port 23</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;cross-domain-policy&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;allow-access-from domain=<span style="color: #006080;">&#8220;*&#8221;</span> to-ports=<span style="color: #006080;">&#8220;23&#8243;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;/cross-domain-policy&gt;</pre>
</div>
</div>
<p>For more details regarding the policy files and Flash security, see <a href="http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001950.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">this</a> documentation.</p>
<p>b)Using REST and SOAP services (via HTTPService and WebServices components)</p>
<p>REST and SOAP services works with any type of server-side technology – also these technologies are standard and most of the biggest service providers(Yahoo, Amazon, Google, Flickr, eBay) expose their API through both of them . There is an endless debate on when to use REST and when to use SOAP but that is beyond the scope of this article. Instead I will present some samples on how to use them.</p>
<p>As with the sockets example, because the Flex application can initiate requests only to the same domain from where it was loaded you&#8217;ll need a crossdomain.xml file on the server where the services are located. Obvious you cannot put a policy files on every server so use the following approach: connect to the back-end server from where the Flex application was loaded and use that server to make the request – after that send the result back to the Flex application. For that you can use an existing product – BlazeDS or another solution.</p>
<p>Below is a sample code showing the two mxml tags used to call REST and SOAP services:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;mx:HTTPService id=<span style="color: #006080;">&#8220;resultHttpService&#8221;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     url=<span style="color: #006080;">&#8220;http://www.sampledomain.com/query.jsp?quote=ADBE&#8221;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;mx:WebService id=<span style="color: #006080;">&#8220;resultWebService&#8221;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     wsdl=<span style="color: #006080;">&#8220;http://www.sampledomain.com/quotes?wsdl&#8221;</span> /&gt;</pre>
</div>
</div>
<p>In this case I am connecting directly to sampledomain so the first time the Flash Player will check for crossdomain.xml to see if the server allows the request.</p>
<p>In order to use the proxy approach (use the server to do the request) I will modify the code:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;mx:HTTPService id=<span style="color: #006080;">&#8220;resultHttpService&#8221;</span> destination=<span style="color: #006080;">&#8220;HTTPDestination&#8221;</span> useProxy=<span style="color: #006080;">&#8220;true&#8221;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;mx:WebService id=<span style="color: #006080;">&#8220;resultWebServive&#8221;</span> destination=<span style="color: #006080;">&#8220;WebServiceDestination&#8221;</span> useProxy=<span style="color: #006080;">&#8220;true&#8221;</span> /&gt;</pre>
</div>
</div>
<p>and in proxy-config.xml I will add the destination definition:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;destination id=<span style="color: #006080;">&#8220;resultHttpService&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;url&gt;http:<span style="color: #008000;">//www.domain.com/query.jsp?quote=ADBE&lt;/url&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;/properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;/destination&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;destination id=<span style="color: #006080;">&#8220;ws-catalog&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;wsdl&gt;http:<span style="color: #008000;">//www.domain.com/quotes.wsdl&lt;/wsdl&gt;</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;soap&gt;*&lt;/soap&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    &lt;/properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;adapter <span style="color: #0000ff;">ref</span>=<span style="color: #006080;">&#8220;soap-proxy&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;/destination&gt;</pre>
</div>
</div>
<p>In the REST example it is very important to notice that due to Flash Player limitations you are allowed to use only GET and POST methods, and any return code other than 200 will generate a fault. To overcome these limitations you can write your own proxy server, or better still, use one already written (BlazeDS for example).</p>
<p>c)Using remoting</p>
<p>Remoting technology allows developers to directly invoke methods on the backend server. Initially this was possible only with Java and Coldfusion but after that different implementations have appeared for PHP, Python, Ruby and .Net. Also there are several other implementations that use Hessian protocol. Below I will present some examples for Java language, using BlazeDS.</p>
<p>The mxml tag from the Flex application looks the same as the ones used for calling webservices – the main attributes are the id and the destination</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; height: 34px; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; height: 21px; background-color: white; border-bottom-style: none">&lt;mx:RemoteObject id=<span style="color: #006080;">&#8220;productService&#8221;</span> destination=<span style="color: #006080;">&#8220;ProductService&#8221;</span>/&gt;</pre>
</div>
</div>
<p>The destination is configured into the file remoting-config.xml:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;destination id=<span style="color: #006080;">&#8220;productService&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;source&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            com.test.services.ProductService</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;/source&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;/properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    &lt;adapter <span style="color: #0000ff;">ref</span>=<span style="color: #006080;">&#8220;java-object&#8221;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;/destination&gt;</pre>
</div>
</div>
<p>The remote object allows you to call methods on the Java object associated with the corresponding destination. Everything else is transparent from the user&#8217;s point of view (including the conversion between ActionScript and the Java objects and the serialization mechanism that can handle complex objects graph). You will only need to declare the mapping between the ActionScript and the Java objects using the [RemoteClass] metadata:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">package com.test.model{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    [RemoteClass(alias=<span style="color: #006080;">"com.test.model.Product"</span>)]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> Product{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        <span style="color: #0000ff;">public</span> var id:<span style="color: #0000ff;">int</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        <span style="color: #0000ff;">public</span> var name:String;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre>
</div>
</div>
<p>Before you start to use remoting it’s a good idea to read this <a href="http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=serialize_data_2.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">link</a> describing data types conversion between Java and ActionScript.</p>
<p>It is important to notice that on every I/O operation also the remote method is invoked asynchronously so you will need to register handlers for the result and fault events.</p>
<p>d)Using messaging</p>
<p>There are currently several messaging solution on the market for the Flex applications: BlazeDS (and the commercial version Livecycle Data Services) , Granite Data Services and WebORB. All of them also have integration with JMS servers.</p>
<p>With messaging, a Flex application can connect to a message destination on the server (specified in messaging-config.xml) and can exchange messages with the server or with another clients (using the server as a proxy). You can use messaging to have the server push messages to the clients (for example, in an application that displays the latest stock prices) and you can use it for collaboration between clients (for example a chat application).</p>
<p>One of the most important things when working with messaging is choosing the proper communication channel in order to obtain real time messaging. BlazeDS server supports HTTP streaming and polling (short and long) over AMF and HTTP channels. HTTP streaming is the best way to obtain data in real time but because of the limitations from the servlet model it keeps one thread open per connection. The commercial version (Livecycle Data Services ES) overcomes this limitation with the help of NIO channels (RTMP and NIO HTTP).</p>
<p>Below is a code sample that shows the main tags used for messaging:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;mx:Producer id=<span style="color: #006080;">&#8220;producer&#8221;</span> destination=<span style="color: #006080;">&#8220;chat&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;mx:Consumer id=<span style="color: #006080;">&#8220;consumer&#8221;</span> destination=<span style="color: #006080;">&#8220;chat&#8221;</span>/&gt;</pre>
</div>
</div>
<p>The destination chat is defined below:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;<span style="color: #0000ff;">default</span>-channels&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;channel <span style="color: #0000ff;">ref</span>=<span style="color: #006080;">&#8220;my-rtmp&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    &lt;channel <span style="color: #0000ff;">ref</span>=<span style="color: #006080;">&#8220;my-streaming-amf&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;/<span style="color: #0000ff;">default</span>-channels&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;destination id=<span style="color: #006080;">&#8220;chat&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    &lt;properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;network&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            &lt;!--The session timeout <span style="color: #0000ff;">for</span> inactive HTTP sessions–&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            &lt;session-timeout&gt;0&lt;/session-timeout&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;/network&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;/properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;/destination&gt;</pre>
</div>
</div>
<p>Detailed information regarding messaging can be found in the <a href="http://livedocs.adobe.com/blazeds/1/blazeds_devguide/Part_Flex_Messaging_1.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">Messaging Service</a> chapter of the BlazeDS developer guide.</p>
<p>e)Using Data Management Service</p>
<p>Data Management Service is a feature provided (as of the writing of this article) both in Livecycle Data Services ES and WebORB. Both products offers a framework called Data Management however the architectures differ – in this article I will discuss only the Data Management framework provided by Livecycle Data Services. It operates at a much higher level than the messaging and RPC services. While it can be used for different types of applications  it provides the most value for data intensive applications (especially where collaboration is very important). It is designed to solve several important challenges:</p>
<ul>
<li>synchronizing data on clients with the server without having to write CRUD methods</li>
<li>automatic or manual data synchronization between clients</li>
<li>conflict handling, paging data sets, working with offline applications and synchronizing the data when the application is online again</li>
</ul>
<p>One can make a comparison between Data Management and Hibernate – both frameworks allow the developers to concentrate on defining the domain model and working with it without spending too much time on problems like how to persist, load, version and synchronize data. Hibernate deals with data persistence into database, Data Management with data persistence and synchronization between client applications and the server. There is also integration between these two frameworks and I’ve attached a fully working example showing that.</p>
<p>As with messaging,it is very important how to choose the correct communication channels (especially for automatic synchronization feature). The same choices described in the messaging example apply here.</p>
<p>Here is a simple example that shows how easy it is to create an application for editing a table:</p>
<p>The Flex code:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;?xml version=<span style="color: #006080;">&#8220;1.0&#8243; encoding=&#8221;</span>utf-8&#8243;&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;mx:Application xmlns:mx=<span style="color: #006080;">&#8220;http://www.adobe.com/2006/mxml&#8221;</span> layout=<span style="color: #006080;">&#8220;absolute&#8221;</span> initialize=<span style="color: #006080;">&#8220;init();&#8221;</span> &gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;mx:Script&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;![CDATA[</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            import test.*;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            import mx.collections.ArrayCollection;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            import mx.data.events.*;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            import mx.events.*;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            import mx.data.*;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            var    companyDataService = <span style="color: #0000ff;">new</span> DataService(<span style="color: #006080;">"test.Company"</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            [Bindable]</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            var companyArray:ArrayCollection = <span style="color: #0000ff;">new</span> ArrayCollection();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            function addCompany():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                var company:Company = <span style="color: #0000ff;">new</span> Company();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                company.name=<span style="color: #006080;">&#8220;&lt;new company&gt;&#8221;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                companyArray.addItem(company);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            function deleteCompany():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                var company:Company = companyGrid.selectedItem <span style="color: #0000ff;">as</span> Company;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                <span style="color: #0000ff;">if</span> (company==<span style="color: #0000ff;">null</span>)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                    <span style="color: #0000ff;">return</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                companyDataService.deleteItem(companyGrid.selectedItem);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            function save():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                companyDataService.commit();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            function revert():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                companyDataService.revertChanges();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            function init():<span style="color: #0000ff;">void</span>{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                companyDataService.fill(companyArray,<span style="color: #006080;">&#8220;mainFill&#8221;</span>,[]);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                companyDataService.autoCommit=<span style="color: #0000ff;">false</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        ]]&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;/mx:Script&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;mx:VBox width=<span style="color: #006080;">&#8220;100%&#8221;</span> height=<span style="color: #006080;">&#8220;100%&#8221;</span> horizontalAlign=<span style="color: #006080;">&#8220;center&#8221;</span> &gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;mx:DataGrid  id=<span style="color: #006080;">&#8220;companyGrid&#8221;</span> width=<span style="color: #006080;">&#8220;40%&#8221;</span> height=<span style="color: #006080;">&#8220;40%&#8221;</span> dataProvider=<span style="color: #006080;">&#8220;{companyArray}&#8221;</span> editable=<span style="color: #006080;">&#8220;true&#8221;</span> textAlign=<span style="color: #006080;">&#8220;center&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            &lt;mx:columns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">                &lt;mx:DataGridColumn dataField=<span style="color: #006080;">&#8220;id&#8221;</span>  headerText=<span style="color: #006080;">&#8220;Id&#8221;</span> editable=<span style="color: #006080;">&#8220;false&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">                &lt;mx:DataGridColumn dataField=<span style="color: #006080;">&#8220;name&#8221;</span>  headerText=<span style="color: #006080;">&#8220;Company&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            &lt;/mx:columns&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;/mx:DataGrid&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;mx:HBox horizontalAlign=<span style="color: #006080;">&#8220;center&#8221;</span> width=<span style="color: #006080;">&#8220;100%&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            &lt;mx:Button label=<span style="color: #006080;">&#8220;+&#8221;</span> click=<span style="color: #006080;">&#8220;addCompany();&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            &lt;mx:Button label=<span style="color: #006080;">&#8220;-&#8221;</span> click=<span style="color: #006080;">&#8220;deleteCompany();&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;/mx:HBox&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;mx:HBox width=<span style="color: #006080;">&#8220;100%&#8221;</span> horizontalAlign=<span style="color: #006080;">&#8220;center&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            &lt;mx:Button label=<span style="color: #006080;">&#8220;Save changes&#8221;</span> click=<span style="color: #006080;">&#8220;save();&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            &lt;mx:Button label=<span style="color: #006080;">&#8220;Revert modifications&#8221;</span> click=<span style="color: #006080;">&#8220;revert();&#8221;</span>/&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;/mx:HBox&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    &lt;/mx:VBox&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;/mx:Application&gt;</pre>
</div>
</div>
<p>The definition of the DataService object is located in the configuration file data-management-config.xml</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;destination id=<span style="color: #006080;">&#8220;test.Company&#8221;</span> channels=<span style="color: #006080;">&#8220;my-rtmp&#8221;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;source&gt;flex.data.assemblers.HibernateAnnotationsAssembler&lt;/source&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;scope&gt;application&lt;/scope&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;item-<span style="color: #0000ff;">class</span>&gt;test.Company&lt;/item-<span style="color: #0000ff;">class</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;metadata&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            &lt;identity property=<span style="color: #006080;">&#8220;id&#8221;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        &lt;/metadata&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;server&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            &lt;hibernate-entity&gt;test.Company&lt;/hibernate-entity&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        &lt;/server&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    &lt;/properties&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&lt;/destination&gt;</pre>
</div>
</div>
<p>As you can see there are no remoting calls – after the collection companyArray is filled with data you can manipulate the data by adding new elements, deleting or updating elements. You have the option to call save when you want to persist the modifications or revert if you decides to discard them.</p>
<p>It is possible to work with more complex domain models (associations between objects) and you can find one example of this attached.</p>
<p>Data Management is the most appealing approach for bringing data into a Flex application, but like Hibernate case it has a steep learning curve. Documentation related to it can be found in <a href="http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/Part_Data_Management_1.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">LCDS developer guide</a>.</p>
<p>The following table summarizes the advantages and disadvantages for each solution:</p>
<table border="0" cellspacing="0" cellpadding="2" width="530">
<tbody>
<tr>
<td width="133" valign="top"></td>
<td width="197" valign="top">Pros</td>
<td width="198" valign="top">Cons</td>
</tr>
<tr>
<td width="133" valign="top">Socket communication</td>
<td width="197" valign="top">The most flexible approach. Allows you to write your own server using whatever technology do you want obtaining the best performance.</td>
<td width="198" valign="top">It takes a lot of time and money to define your protocol and write your server. It can be useful if you intend to communicate with an already written server or for cases in which you need extremely high performance</td>
</tr>
<tr>
<td width="133" valign="top">REST/SOAP services</td>
<td width="197" valign="top">Well established standards, you can wrote them once and consume them from most of the systems, not just Flex applications. Also most of the companies expose their api through REST and SOAP services</td>
<td width="198" valign="top">The overhead of parsing data (especially for SOAP) can be substantial</td>
</tr>
<tr>
<td width="133" valign="top">Remoting</td>
<td width="197" valign="top">Little overhead compared with web services. Automatic conversion between Action Script and the Java objects (or another language)</td>
<td width="198" valign="top">Sometimes the data exposed through services needs to be consumed by a variety of applications – this is possible using web services but not with remoting</td>
</tr>
<tr>
<td width="133" valign="top">Messaging</td>
<td width="197" valign="top">Ability to implement collaboration features. Integration with JMS</td>
<td width="198" valign="top">There are relatively few solutions that implements messaging. As the writing of this article only BlazeDS and LCDS from Adobe (if your backend is Java) and WebORB (if your backend is Java, PHP, .NET)</td>
</tr>
<tr>
<td width="133" valign="top">Data Management (LCDS)</td>
<td width="197" valign="top">The time needed to implement a data driven application is reduced. It offers solutions for collaboration, conflict detection, dealing with complex domain objects, pagination and lazy loading. It also offers integration with Hibernate and Spring</td>
<td width="198" valign="top">There is only one commercial product for this solution – LCDS from Adobe. It has a relatively steep learning curve</td>
</tr>
</tbody>
</table>
<p>I have also attached an <a href="http://cornelcreanga.com/docs/testData.zip" onclick="javascript:pageTracker._trackPageview('/downloads/docs/testData.zip');">archive</a> containing one Flex Builder project showing the data transfer using sockets and also a more advanced case of data management use. For the rest of the cases I recommend that you  download the most recent version of <a href="http://opensource.adobe.com/wiki/display/blazeds/Release+Builds" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');">BlazeDS</a> (look in samples folder) or <a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=lcds26_td" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');">LCDS</a> (look in the lcds-samples folder). If you want to use non Adobe products you can try <a href="http://www.themidnightcoders.com/weborb/java/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.themidnightcoders.com');">WebORB</a> (look in examples/flex folder) or <a href="http://www.graniteds.org/confluence/pages/viewpage.action?pageId=229378" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.graniteds.org');">GraniteDS</a> (I was not able to find a folder with samples in this product).</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Bringing+data+into+Flex+applications+-+introduction&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F11%2Fbringing-data-into-flex-applications-introduction%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/11/bringing-data-into-flex-applications-introduction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adobe MAX 2008 Europe – important discount</title>
		<link>http://cornelcreanga.com/2008/11/adobe-max-2008-europe-important-discount/</link>
		<comments>http://cornelcreanga.com/2008/11/adobe-max-2008-europe-important-discount/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 11:32:17 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=45</guid>
		<description><![CDATA[You can save EUR€240 when you register before November 14, 2008 by using the following registration code: EEB856 (*Additional restrictions apply. Please read the note below!). In order to register use this link.
I cannot talk about all the new technologies presented this year – I can only say that some of them are really exciting. [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Adobe MAX 2008 Europe &#8211; important discount", url: "http://cornelcreanga.com/2008/11/adobe-max-2008-europe-important-discount/" });</script>]]></description>
			<content:encoded><![CDATA[<p>You can save <strong>EUR€240</strong> when you register before November 14, 2008 by using the following registration code: EEB856 (*Additional restrictions apply. Please read the note below!). In order to register use this <a href="http://max.adobe.com/eu/register" onclick="javascript:pageTracker._trackPageview('/outbound/article/max.adobe.com');">link</a>.<br />
I cannot talk about all the new technologies presented this year – I can only say that some of them are really exciting. Also, by attending Max you will have the opportunity to connect with some of the best developers and make new friends.</p>
<p>* Offer good for new Adobe MAX 2008 registrations only. Offer good for Adobe MAX Europe full event pass registration only. The offer applies to an Adobe MAX full event pass only (EUR€840). Offer cannot be combined with any other offer, package or registration code. Offer expires 11:59 pm PDT November 14, 2008. Terms and conditions for Adobe MAX registrations will also apply. Void where prohibited.</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Adobe+MAX+2008+Europe+%26ndash%3B+important+discount&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F11%2Fadobe-max-2008-europe-important-discount%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/11/adobe-max-2008-europe-important-discount/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash Security training - Portugal</title>
		<link>http://cornelcreanga.com/2008/10/flash-security-trainin/</link>
		<comments>http://cornelcreanga.com/2008/10/flash-security-trainin/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 08:07:31 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=44</guid>
		<description><![CDATA[One of the security experts from Adobe – Peleus Uhley - will be in Portugal next month talking about security and auditing – if you are in the area and you are interested in security you should not miss his talks.
<script type="text/javascript">SHARETHIS.addEntry({ title: "Flash Security training - Portugal", url: "http://cornelcreanga.com/2008/10/flash-security-trainin/" });</script>]]></description>
			<content:encoded><![CDATA[<p>One of the security experts from Adobe – <a href="http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');">Peleus Uhley</a> - will be in Portugal next month talking about <a href="http://www.owasp.org/index.php/OWASP_EU_Summit_2008_Training#Flash_Player_Security" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.owasp.org');">security</a> and <a href="http://www.owasp.org/index.php/OWASP_EU_Summit_2008_Training#Auditing_Flash_Applications" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.owasp.org');">auditing</a> – if you are in the area and you are interested in security you should not miss his talks.</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Flash+Security+training+-+Portugal&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F10%2Fflash-security-trainin%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/10/flash-security-trainin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AIR and drag and drop</title>
		<link>http://cornelcreanga.com/2008/10/air-and-drag-and-drop/</link>
		<comments>http://cornelcreanga.com/2008/10/air-and-drag-and-drop/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 08:15:58 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=42</guid>
		<description><![CDATA[I’m working on an AIR application that uses not only the ability to drag and drop external files into the application but also to drag and drop objects internally. More specifically I’m using Ely Greenfield component in order to display some pictures. The component worked perfectly when included in a Flex application running in the [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "AIR and drag and drop", url: "http://cornelcreanga.com/2008/10/air-and-drag-and-drop/" });</script>]]></description>
			<content:encoded><![CDATA[<p>I’m working on an AIR application that uses not only the ability to drag and drop external files into the application but also to drag and drop objects internally. More specifically I’m using <a onclick="javascript:pageTracker._trackPageview('/outbound/article/www.quietlyscheming.com');" href="http://www.quietlyscheming.com/blog/components/animated-dragtile-component/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.quietlyscheming.com');">Ely Greenfield</a> component in order to display some pictures. The component worked perfectly when included in a Flex application running in the Flash player and Firefox but when included in the AIR application everything was messed up. After digging into the code, I finally noticed that by default AIR uses a different implementation for drag and drop than the Flex application (NativeDragManagerImpl vs DragManagerImpl).</p>
<p>I was not able to make the component working at all with NativeDragManagerImpl. And, just  when I thought that I was stuck I’ve found <a onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.adobe.com');" href="http://bugs.adobe.com/jira/browse/SDK-13983" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.adobe.com');">this bug</a> on Adobe JIRA, together with a workaround. The workaround works; it is not very elegant but that’s it.</p>
<p>After playing a little bit more with the NativeDragManagerImpl I believe that the only decent solution is to use the described workaround if you plan to use AIR and internal drag and drop (also it seems that you cannot control the alpha level when using it).. and wait for Flex4 in order to have the bug fixed.</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=AIR+and+drag+and+drop&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F10%2Fair-and-drag-and-drop%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/10/air-and-drag-and-drop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Transylvania JUG – Flex presentation</title>
		<link>http://cornelcreanga.com/2008/10/transylvania-jug-%e2%80%93-flex-presentation/</link>
		<comments>http://cornelcreanga.com/2008/10/transylvania-jug-%e2%80%93-flex-presentation/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 08:13:53 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=41</guid>
		<description><![CDATA[Last week I made two presentations (Introduction to Flex and Integration between Flex and Java) for Transylvania JUG , the first Java user group established in Romania, in the middle of Transylvania. There were about 60-70 developers asking a lot of questions. I knew that some of them knew Flex but I was surprised to [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Transylvania JUG – Flex presentation", url: "http://cornelcreanga.com/2008/10/transylvania-jug-%e2%80%93-flex-presentation/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Last week I made two presentations (Introduction to Flex and Integration between Flex and Java) for <a onclick="javascript:pageTracker._trackPageview('/outbound/article/groups.google.com');" href="http://groups.google.com/group/transylvania-jug" onclick="javascript:pageTracker._trackPageview('/outbound/article/groups.google.com');">Transylvania JUG</a> , the first Java user group established in Romania, in the middle of Transylvania. There were about 60-70 developers asking a lot of questions. I knew that some of them knew Flex but I was surprised to see that some of them also have knowledge of LCDS and BlazeDS. The user group was founded only a few  months ago but they succeeded to organize several meeting related to Flex, Groovy, TestNG.</p>
<p>I hope that in future this kind of meetings will become a regular thing in Romania and more active user groups will be founded. Romania has one of the largest developers communities in Eastern Europe – and  meetings like this help people share information, establish new connections, and improve their applications.</p>
<p>A picture from the conference room:</p>
<p><a href="../wp-content/uploads/2008/10/img-8637.jpg"><img style="border: 0px none;" title="IMG_8637" src="../wp-content/uploads/2008/10/img-8637-thumb.jpg" border="0" alt="IMG_8637" width="258" height="198" /></a></p>
<p>And the user group logo:</p>
<p><a href="../wp-content/uploads/2008/10/logo-juggif.png"><img style="border: 0px none;" title="logo_jug.gif" src="../wp-content/uploads/2008/10/logo-juggif-thumb.png" border="0" alt="logo_jug.gif" width="144" height="204" /></a></p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Transylvania+JUG+%E2%80%93+Flex+presentation&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F10%2Ftransylvania-jug-%25e2%2580%2593-flex-presentation%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/10/transylvania-jug-%e2%80%93-flex-presentation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Connecting Java applications with Blaze DS</title>
		<link>http://cornelcreanga.com/2008/10/connecting-java-applications-with-blaze-ds/</link>
		<comments>http://cornelcreanga.com/2008/10/connecting-java-applications-with-blaze-ds/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 08:12:19 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[LCDS/Blaze DS]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=40</guid>
		<description><![CDATA[A new feature was added to Blaze DS (currently only in the nightly builds) – the ability to connect to a Blaze DS server from a Java client. It’s a useful feature if you have to do integration between some legacy Java application and a Blaze DS server and you don’t want to write your [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Connecting Java applications with Blaze DS", url: "http://cornelcreanga.com/2008/10/connecting-java-applications-with-blaze-ds/" });</script>]]></description>
			<content:encoded><![CDATA[<p>A new feature was added to Blaze DS (currently only in the <a onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');" href="http://opensource.adobe.com/wiki/display/blazeds/download+blazeds+trunk" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');">nightly</a> builds) – the ability to connect to a Blaze DS server from a Java client. It’s a useful feature if you have to do integration between some legacy Java application and a Blaze DS server and you don’t want to write your own serialization mechanism or if you plan to write some tools for testing.</p>
<p>The specification can be found <a onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');" href="http://opensource.adobe.com/wiki/display/blazeds/Java+AMF+Client" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensource.adobe.com');">here</a> and I’ve also created a Hello world project which can be downloaded from this <a onclick="javascript:pageTracker._trackPageview('/docs/docs/javaclient_hello.zip');" href="../docs/javaclient_hello.zip">location</a>. On my local computer I was able to do about 3000 calls per second – impressive compared with a WebService call.</p>
<p>On the client I wrote four lines of code in order to invoke the method from the server:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">AMFConnection amfConnection = <span style="color: #0000ff;">new</span> AMFConnection();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">amfConnection.connect(http:<span style="color: #008000;">//localhost:8080/blaze/messagebroker/amf);</span></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">Message message = (Message)amfConnection.call(<span style="color: #006080;">“HelloService.sayHello”</span>, <span style="color: #0000ff;">new</span> Message(<span style="color: #006080;">“<strong style="color: black; background-color: #ffff66;">cornel</strong>”</span>));</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">amfConnection.close();</pre>
</div>
</div>
<p>And the method signature is:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> HelloService {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    <span style="color: #0000ff;">public</span> Message sayHello(Message message){</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">new</span> Message(<span style="color: #006080;">“hello “</span>+message.getText());</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">}</pre>
</div>
</div>
<p>On the client you need to use two jar files from Blaze DS distribution (flex-messaging-common.jar and flex-messaging-core.jar).</p>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Connecting+Java+applications+with+Blaze+DS&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F10%2Fconnecting-java-applications-with-blaze-ds%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/10/connecting-java-applications-with-blaze-ds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex – improve search behavior in ComboBox components</title>
		<link>http://cornelcreanga.com/2008/10/flex-improve-search-behavior-in-combobox-components/</link>
		<comments>http://cornelcreanga.com/2008/10/flex-improve-search-behavior-in-combobox-components/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 08:12:08 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=39</guid>
		<description><![CDATA[Updated: After a discussion with the engineering team I filled this bug
The ComboBox component from Flex SDK does not perform a fancy search by default – for example if you press ‘A‘ it will go to the first element starting with ‘A‘, if you press ‘B‘ it will go the first element starting with ‘B‘ [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Flex – improve search behavior in ComboBox components", url: "http://cornelcreanga.com/2008/10/flex-improve-search-behavior-in-combobox-components/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Updated: After a discussion with the engineering team I filled this <a onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.adobe.com');" href="https://bugs.adobe.com/jira/browse/SDK-16688" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.adobe.com');">bug</a></p>
<p>The ComboBox component from Flex SDK does not perform a fancy search by default – for example if you press ‘A‘ it will go to the first element starting with ‘A‘, if you press ‘B‘ it will go the first element starting with ‘B‘ but if you press quickly ‘A‘ and ‘B‘ it will not display the first element starting with ‘AB‘ – instead if will display the first one starting with A and after that the one starting with ‘B’. I know that the HTML select control can do that and I’ve heard some people complaining because they are not able to do it in Flex so I planned to wrote the implementation.</p>
<p>There are two cases: the first one is when the drop down list is opened and the user is typing, the second one is when the drop down list is not opened but the focus is positioned on the ComboBox and the user is typing.</p>
<p>For the first case I extended the List component and I wrote a new findKey method. The dropdownFactory property of the ComboBox component will be set to the new class. The code is displayed below:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">package com.test</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">{</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    import mx.controls.List;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    <span style="color: #0000ff;">public</span> <span style="color: #0000ff;">class</span> ListSearch extends List    {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff;">private</span> var previous:Number;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        <span style="color: #0000ff;">private</span> var current:Number;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff;">private</span> var pressed:String=<span style="color: #006080;">“”</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff;">protected</span> <span style="color: #0000ff;">override</span> function findKey(eventCode:<span style="color: #0000ff;">int</span>):Boolean{</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            current = <span style="color: #0000ff;">new</span> Date().time;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            <span style="color: #0000ff;">if</span> ((current-previous)&gt;500){</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                previous = current;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                pressed = String.fromCharCode(eventCode);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                <span style="color: #0000ff;">return</span> super.findKey(eventCode);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            }<span style="color: #0000ff;">else</span>{</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                previous = current;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                pressed = pressed + String.fromCharCode(eventCode);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                <span style="color: #0000ff;">return</span> findString(pressed);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">}</pre>
</div>
</div>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;mx:ComboBox id=<span style="color: #006080;">“combo”</span> dropdownFactory=<span style="color: #006080;">“com.test.ListSearch”</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">   &lt;mx:dataProvider&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">      &lt;mx:Array&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">         &lt;mx:String&gt;&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">         &lt;mx:String&gt;AAAAAAAA&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">         &lt;mx:String&gt;ABBBBBBB&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">         &lt;mx:String&gt;ACCCCCCC&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">         &lt;mx:String&gt;BBBBBBBB&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">         &lt;mx:String&gt;CCCCCCCC&lt;/mx:String&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">       &lt;/mx:Array&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">   &lt;/mx:dataProvider&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;/mx:ComboBox&gt;</pre>
</div>
</div>
<p>The second case proved to be much difficult..I do not know if I will be able to do it without rewriting the entire ComboBox component – too many of methods and members have the private access modifier so extending is not a solution. I’m still wondering how to do it.</p>
<p>I’m curious if anyone experienced this problem when trying to modify the default behavior of the ComboBox component (or another Flex component).</p>
<p><script type="text/javascript"><!--
SHARETHIS.addEntry({ title: "Flex &ndash; improve search behavior in ComboBox components", url: "http://cornelcreanga.com/2008/08/flex-ndash-improve-searching-in-combobox-components/" });
// --></script><span id="sharethis_1"><a class="stbutton stico_default" title="ShareThis via email, AIM, social bookmarking and networking sites, etc." href="../2008/08/flex-ndash-improve-searching-in-combobox-components/#"></a></span></p>
<p><!-- You can start editing here. --></p>
<h3 id="comments">2 Responses to “Flex – improve search behavior in ComboBox components”</h3>
<ol class="commentlist">
<li id="comment-606" class="alt"> <img class="avatar avatar-35" src="http://www.gravatar.com/avatar/160c7b4a79af3e16292a4edc23d2ff0b?s=35&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D35&amp;r=G" alt="" width="35" height="35" /> <cite><a onclick="javascript:pageTracker._trackPageview('/outbound/commentauthor/jimmyflex.blogspot.com');" rel="external nofollow" href="http://jimmyflex.blogspot.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/jimmyflex.blogspot.com');">Dimitrios Gianninas</a></cite> Says:<br />
<small class="commentmetadata"><a href="../2008/08/flex-ndash-improve-searching-in-combobox-components/#comment-606">August 30th, 2008 at 2:25 am</a> </small>Hi, Yes I have modified the TextInput component to do the exact what you are talking about. Actually I got the idea from this old blog post: <a onclick="javascript:pageTracker._trackPageview('/outbound/comment/weblogs.macromedia.com');" rel="nofollow" href="http://weblogs.macromedia.com/sho/archives/2006/04/new_version_of.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/weblogs.macromedia.com');">http://weblogs.macromedia.com/sho/archives/2006/04/new_version_of.html</a></p>
<p>Also the ComboBox has already been modified as such, just look here on the Adobe Exchange: <a onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.adobe.com');" rel="nofollow" href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1047291" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');">http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1047291</a></li>
<li id="comment-610"> <img class="avatar avatar-35" src="http://www.gravatar.com/avatar/53b418878e734ed3e249e3a2eb1cb815?s=35&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D35&amp;r=G" alt="" width="35" height="35" /> <cite><strong style="color: black; background-color: #ffff66;">cornel</strong></cite> Says:<br />
<small class="commentmetadata"><a href="../2008/08/flex-ndash-improve-searching-in-combobox-components/#comment-610">August 30th, 2008 at 10:41 am</a> </small>Hi Dimitrios,</p>
<p>Thanks for letting me know - it’s very close to what I’m looking for. I will try to see if I can modify a little bit the current behavior (to add a dropdown arrow).</li>
</ol>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=Flex+%E2%80%93+improve+search+behavior+in+ComboBox+components&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F10%2Fflex-improve-search-behavior-in-combobox-components%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/10/flex-improve-search-behavior-in-combobox-components/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LiveCycle Data Services 2.6 – new features (4)</title>
		<link>http://cornelcreanga.com/2008/09/livecycle-data-services-26-new-features-4/</link>
		<comments>http://cornelcreanga.com/2008/09/livecycle-data-services-26-new-features-4/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 07:42:06 +0000</pubDate>
		<dc:creator>cornel</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[LCDS/Blaze DS]]></category>

		<guid isPermaLink="false">http://cornelcreanga.com/?p=37</guid>
		<description><![CDATA[
Support for offline synchronization was improved in LiveCycle Data Services 2.6 – the Flex applications deployed on the AIR runtime will use a cache base on SQLite database instead of a Local Shared Objects cache.
There are several resources describing in details this feature in detail and providing some samples – Cristophe Coenraets blog, an article [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "LiveCycle Data Services 2.6 – new features (4)", url: "http://cornelcreanga.com/2008/09/livecycle-data-services-26-new-features-4/" });</script>]]></description>
			<content:encoded><![CDATA[<p class="post-info"><a title="View all posts in LCDS/Blaze DS" href="../category/lcdsblaze-ds/"></a></p>
<p>Support for offline synchronization was improved in LiveCycle Data Services 2.6 – the Flex applications deployed on the AIR runtime will use a cache base on SQLite database instead of a Local Shared Objects cache.</p>
<p>There are several resources describing in details this feature in detail and providing some samples – <a href="http://coenraets.org/blog/2008/05/insync-automatic-offline-data-synchronization-in-air-using-lcds-26/" onclick="javascript:pageTracker._trackPageview('/outbound/article/coenraets.org');">Cristophe Coenraets blog</a>, an article on <a href="http://www.insideria.com/2008/07/air-data-synchronization-via-l.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.insideria.com');">Inside RIA</a> and the <a href="http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/lcds_26_devguide.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/livedocs.adobe.com');">developer guide</a>.</p>
<p>Of course, you can synchronize your application without using LiveCycle Data Services and use whatever suits you best (SQLite or LSO), in fact I know several developers who have been doing this for the Flex applications they deploy on browser for a long time. There are, however, advantages to using the LiveCycle Data Services solution for the offline/online synchronization are:</p>
<ul type="disc">
<li class="MsoNormal">you do not have to write      additional code to deal with synchronization so you can save a lot of time</li>
<li class="MsoNormal">you can use the already      implemented conflict resolution model</li>
</ul>
<p><a href="http://sharethis.com/item?&wp=2.5.1&amp;publisher=4e677b88-a528-4fba-81fd-e3410310f49b&amp;title=LiveCycle+Data+Services+2.6+%E2%80%93+new+features+%284%29&amp;url=http%3A%2F%2Fcornelcreanga.com%2F2008%2F09%2Flivecycle-data-services-26-new-features-4%2F" onclick="javascript:pageTracker._trackPageview('/outbound/article/sharethis.com');">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://cornelcreanga.com/2008/09/livecycle-data-services-26-new-features-4/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
