<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Fun The Flex Way</title>
	<atom:link href="http://magicwithflex.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://magicwithflex.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 23 Nov 2009 12:50:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='magicwithflex.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Fun The Flex Way</title>
		<link>http://magicwithflex.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://magicwithflex.wordpress.com/osd.xml" title="Fun The Flex Way" />
	<atom:link rel='hub' href='http://magicwithflex.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Monitor the availabilty of Internet Connection for an AIR application</title>
		<link>http://magicwithflex.wordpress.com/2009/11/23/monitor-the-availabilty-of-internet-connection-for-an-air-application/</link>
		<comments>http://magicwithflex.wordpress.com/2009/11/23/monitor-the-availabilty-of-internet-connection-for-an-air-application/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 12:50:34 +0000</pubDate>
		<dc:creator>lksmurthy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://magicwithflex.wordpress.com/?p=18</guid>
		<description><![CDATA[The beauty of Adobe AIR is it enables to develop and deploy a Rich Internet Application (RIA) on the desktop. But one interesting scenario which develops when deploying a RIA on the desktop is, how will the application know, if the internet connection is currently available? How to enable run time handling of the application [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=18&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:'Times New Roman';line-height:normal;font-size:small;"></p>
<div style="background-image:initial;background-repeat:initial;background-attachment:initial;background-color:#ffffff;font:normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;background-position:initial initial;margin:0;padding:.6em;">
<p>The beauty of Adobe AIR is it enables to develop and deploy a Rich Internet Application (RIA) on the desktop. But one interesting scenario which develops when deploying a RIA on the desktop is, how will the application know, if the internet connection is currently available? How to enable run time handling of the application based on the availability of the Internet Connection?</p>
<p>AIR SDK answers all this by providing the developer with the URLMonitor Class. This class which is included in the ServiceMonitor.swc file, provides properties and methods to handle changes in the Internet Connection. The following steps explain, how to make efficient use of the URLMonitor class to check the availability of the Internet Connection.</p>
<p><strong>Step 1:</strong> To <span style="color:#000000;">acce</span>ss the properties and methods of the URLMonitor class we will have to import the air.net.URLMonitor class</p>
<p style="text-align:center;"><strong><span style="color:#0000ff;">import air.net.URLMonitor;</span></strong></p>
<p style="text-align:left;"><strong>Step 2:</strong> Create an object of URLMonitor class.</p>
<p style="text-align:center;"><strong><span style="color:#0000ff;">private var monitor:URLMonitor;</span></strong></p>
<p style="text-align:left;"><strong>Step 3: </strong>Create an URLRequest object and to the constructor pass the URL you wish to be requested</p>
<p style="text-align:center;"><span style="color:#0000ff;"><strong>private var myURL:URLRequest = new URLRequest(&#8220;http://www.adobe.com&#8221;);</strong></span></p>
<p style="text-align:left;"><strong>Step 4:</strong> On Creation Complete of the application, instantiate the URLMonitor object (monitor) by passing the URLRequest object (myURL) as one of the parameters</p>
<p style="text-align:center;"><span style="color:#0000ff;"><strong>monitor = new URLMonitor(myURL);</strong></span></p>
<p style="text-align:left;"><strong>Step 5:</strong> Start the URLMonitor by calling the method start()</p>
<p style="text-align:center;"><span style="color:#0000ff;"><strong>monitor.start();</strong></span></p>
<p style="text-align:left;"><strong>Step 6: </strong>Add an event listener where the event is of type Status. This indicates that the service status has changed.</p>
<p style="text-align:center;"><span style="color:#0000ff;"><strong>monitor.addEventListener(StatusEvent.STATUS, on_Connection);</strong></span></p>
<p style="text-align:left;"><strong>Step 7:</strong> Now the last and the final step. In the filter function on_Connection(event:Event), check if the Internet Connection is available by checking the boolean value of the property &#8220;available&#8221;.</p>
<p style="text-align:left;">
<div id="_mcePaste" style="text-align:left;"><span style="color:#0000ff;"><strong>protected function on_Connection(event:Event):void</strong></span></div>
<div style="text-align:left;"><span style="color:#0000ff;"><strong>{</strong></span></div>
<div id="_mcePaste" style="text-align:left;"><span style="color:#0000ff;"><strong> if(event.target.available == true)</strong></span></div>
<div id="_mcePaste" style="text-align:left;"><span style="color:#0000ff;"><strong> {</strong></span></div>
<div style="text-align:left;"><span style="color:#0000ff;"><strong> //Code comes here</strong></span></div>
<div style="text-align:left;"><span style="color:#0000ff;"><strong> }</strong></span></div>
<div style="text-align:left;"><span style="color:#0000ff;"><strong>}</strong></span></div>
<div></div>
<div>So in 7 simple steps, we have devised a solution to check for the availability of the Internet Connection in an AIR application.</div>
<div></div>
<div>Code snippet available below,</div>
<div></div>
<div><a href="http://magicwithflex.files.wordpress.com/2009/11/blog-image1.jpg"><img class="aligncenter size-full wp-image-22" style="display:block;margin-left:auto;margin-right:auto;border:0 initial initial;" title="URLMonitor Example" src="http://magicwithflex.files.wordpress.com/2009/11/blog-image1.jpg?w=500&#038;h=308" alt="protected function on_Connection(event:Event):void 			{ 				if(event.target.available == true) 				{" width="500" height="308" /></a></div>
<div></div>
</div>
<p></span></p>
<p style="text-align:center;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/magicwithflex.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/magicwithflex.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/magicwithflex.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=18&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magicwithflex.wordpress.com/2009/11/23/monitor-the-availabilty-of-internet-connection-for-an-air-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a4b7301a2791107c451a470753b151?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lksmurthy</media:title>
		</media:content>

		<media:content url="http://magicwithflex.files.wordpress.com/2009/11/blog-image1.jpg" medium="image">
			<media:title type="html">URLMonitor Example</media:title>
		</media:content>
	</item>
		<item>
		<title>Issues when null value is sent for a variable of type Date or Integer from Flex to CF</title>
		<link>http://magicwithflex.wordpress.com/2009/11/23/issues-when-null-value-is-sent-for-a-variable-of-type-date-or-integer-from-flex-to-cf/</link>
		<comments>http://magicwithflex.wordpress.com/2009/11/23/issues-when-null-value-is-sent-for-a-variable-of-type-date-or-integer-from-flex-to-cf/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 09:35:27 +0000</pubDate>
		<dc:creator>lksmurthy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cold Fusion]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[null values]]></category>

		<guid isPermaLink="false">http://magicwithflex.wordpress.com/?p=7</guid>
		<description><![CDATA[When we make use of Cold Fusion as the backend server for a Flex Application. We have to take precautions when handling variables of type Date and Integer. In particular, precaution has to be exercised when a null value is sent for the Date and Integer variables from Flex to CF. Reason: When a null [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=7&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">When we make use of Cold Fusion as the backend server for a Flex Application. We have to take precautions when handling variables of type Date and Integer. In particular, precaution has to be exercised when a null value is sent for the Date and Integer variables from Flex to CF.</div>
<div></div>
<div></div>
<div id="_mcePaste"><strong>Reason:</strong> When a null value is sent for variable of any data type from Flex, the Cold Fusion handles it differently. In particular, Cold Fusion does not believe in the concept of null and stores it as empty value i.e. If there is a variable by name “dt”. Instead of having dt = null, we will have dt = “” in CF. This creates issues when building Data intensive applications (one of the key focus area of DCD). MySQL associates the concept of nothing to “null” and not to {empty}/””. Only in the case of String does MySQL recognizes {empty}/ “” and stores it as null.</div>
<div></div>
<div></div>
<div id="_mcePaste"><strong>Work Around:</strong> Let us look at the following lines of code, to better understand the work around.</div>
<div></div>
<div id="_mcePaste">a) <em>&lt;cfquery name=&#8221;updateItem&#8221; datasource=&#8221;Test&#8221;&gt;</em></div>
<div><em><br />
</em></div>
<div id="_mcePaste"><em>UPDATE test</em></div>
<div id="_mcePaste"><em>SET Start_Date = &lt;CFQUERYPARAM cfsqltype=CF_SQL_TIMESTAMP  null=&#8221;#dt1#&#8221;  VALUE=&#8221;#item.Start_Date#&#8221;&gt;</em></div>
<div id="_mcePaste"><em>WHERE  test_id = &lt;CFQUERYPARAM CFSQLTYPE=&#8221;CF_SQL_INTEGER&#8221; VALUE=&#8221;#item.test_ID#&#8221;&gt;</em></div>
<div><em><br />
</em></div>
<div id="_mcePaste"><em>&lt;/cfquery&gt;</em></div>
<div></div>
<div><em><br />
</em></div>
<div id="_mcePaste">The above lines of code show a sample SQL query in CF. It shows an Update query which tries to set the value of field Start_Date, to the value existing in the variable #item.Start_Date#. In the above code I would like to draw the attention to a specific property in the CFQUERYPARAM, the property “null”.</div>
<div></div>
<div id="_mcePaste">Above we have set the property null to a variable #dt1#. This property decides if we are passing a null value to the Query or Not</div>
<div></div>
<div></div>
<div id="_mcePaste">b) Now let us have a look at dt1 variable. dt1 is a CF variable with a boolean value. The Boolean value for that variable is decided on the value present in item.Start_Date. If item.Start_Date is empty then dt1 is true.</div>
<div></div>
<div></div>
<div id="_mcePaste"><em>&lt;cfset var dt1 = &#8220;false&#8221;&gt;</em></div>
<div id="_mcePaste"><em>&lt;cfif item.Start_Date EQ &#8220;&#8221;&gt;</em></div>
<div id="_mcePaste"><em>&lt;cfset dt1 = &#8220;true&#8221;&gt;</em></div>
<div id="_mcePaste"><em>&lt;/cfif&gt;</em></div>
<div></div>
<div><em><br />
</em></div>
<div id="_mcePaste">Combining a and b. We have the following algorithm:</div>
<div id="_mcePaste">a) Initialize a CF variable dt1 to false</div>
<div id="_mcePaste">b) Check if the value present in item.Start_Date = “”</div>
<div id="_mcePaste">c) If empty, set dt1 to true, else keep it at false</div>
<div id="_mcePaste">d) In the SQL query set the null property to take the value present in dt1</div>
<div id="_mcePaste">e) If dt1 is true, then null value is sent to database, else database gets the value in item.Start_Date</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/magicwithflex.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/magicwithflex.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/magicwithflex.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=7&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magicwithflex.wordpress.com/2009/11/23/issues-when-null-value-is-sent-for-a-variable-of-type-date-or-integer-from-flex-to-cf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a4b7301a2791107c451a470753b151?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lksmurthy</media:title>
		</media:content>
	</item>
		<item>
		<title>Developer/Designer and DCD features of Flash Builder 4</title>
		<link>http://magicwithflex.wordpress.com/2009/11/23/get-started-in-learning-dcd-feature-of-flex/</link>
		<comments>http://magicwithflex.wordpress.com/2009/11/23/get-started-in-learning-dcd-feature-of-flex/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 09:19:31 +0000</pubDate>
		<dc:creator>lksmurthy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DCD]]></category>
		<category><![CDATA[Developer/Designer Workflow]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://magicwithflex.wordpress.com/?p=4</guid>
		<description><![CDATA[Flex applications can more often than not be divided into two broad categories: 1) Applications built around a very specific design 2) Applications built with data at the core Flex 4 provides great new features which addresses both styles of application development. For the first set of applications, Flash builder 4 empowers the developers with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=4&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Flex applications can more often than not be divided into two broad categories:</p>
<p>1) Applications built around a very specific design</p>
<p>2) Applications built with data at the core</p>
<p>Flex 4 provides great new features which addresses both styles of application development. For the first set of applications, Flash builder 4 empowers the developers with a new <strong>Developer/Designer Workflow theme</strong>. For the second set of applications, Flash Builder 4 provides a new and exciting feature called <strong>Data Centric Development (DCD)</strong>. DCD is a Rapid Application Development feature in Flash Builder 4 which is aimed to enable traditional web developers to quickly build Flex apps, which will connect to server side back ends like Cold Fusion, PHP, LCDS, BlazeDS, HTTPService and WebService.</p>
<p>I will not dwell into the intricacies of both the workflows in this post, as their already exist some amazing articles which completely cover the functionalities of the two features. The links to those articles are documented below,</p>
<p>Quick Links:</p>
<p>Developer/Designer Workflow theme:</p>
<p>1) <a href="http://theflashblog.com/?p=1027" target="_blank">Tutorials on Flash Catalyst and Flex 4</a></p>
<p>Data Centric Developement:</p>
<p>1) <a href="http://srinivasannam.wordpress.com/2009/06/01/introduction_to_dcd/" target="_blank">Introduction to DCD</a></p>
<p>2) <a href="http://balajisridhar.wordpress.com/2009/10/08/build-a-master-detail-flex-coldfusion-application-without-writing-a-line-of-code/" target="_blank">Build a Master-Detail Flex-Cold Fusion application without writing a line of code</a></p>
<p>3) <a href="http://sujitreddyg.wordpress.com/2009/10/13/building-flex-and-lcds-based-crud-application-using-flash-builder-4/" target="_blank">Building Flex and LCDS based CRUD application using Flash Builder 4 </a></p>
<p>4) <a href="http://exploringflex.wordpress.com/2009/06/04/dcd-service-wizard-php-service/" target="_blank">DCD Service Wizard &#8211; PHP service</a></p>
<p>5) <a href="http://exploringflex.wordpress.com/2009/06/05/dcd-service-wizard-http-service/" target="_blank">DCD Service Wizard &#8211; HTTPService</a></p>
<p><a href="http://exploringflex.wordpress.com/2009/06/05/dcd-service-wizard-http-service/"></a>6) <a href="http://srinivasannam.wordpress.com/2009/06/03/using-webservice-dcd/" target="_blank">Using WebServices with DCD</a></p>
<p>7) <a href="http://sujitreddyg.wordpress.com/2009/10/12/building-flex-and-java-based-crud-application-using-flash-builder-4/" target="_blank">Building Flex and Java based CRUD application using Flash Builder 4</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/magicwithflex.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/magicwithflex.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/magicwithflex.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=magicwithflex.wordpress.com&amp;blog=10632766&amp;post=4&amp;subd=magicwithflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://magicwithflex.wordpress.com/2009/11/23/get-started-in-learning-dcd-feature-of-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f2a4b7301a2791107c451a470753b151?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lksmurthy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
