<?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>My thoughts on Flex</title>
	<atom:link href="http://prashants.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://prashants.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 15 Jun 2010 12:41:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='prashants.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>My thoughts on Flex</title>
		<link>http://prashants.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://prashants.wordpress.com/osd.xml" title="My thoughts on Flex" />
	<atom:link rel='hub' href='http://prashants.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Creating view states: Flex 4</title>
		<link>http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/</link>
		<comments>http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 12:36:35 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=149</guid>
		<description><![CDATA[Introduction This is a post to get you started with states in Flex. The post is part of a series: Flex 3 and Flex 4. It contains three primary sections: What are states? – This section introduces states. If you know what they are, skip this section. Creating view states: FLEX 4 – In this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=149&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;"> </span></p>
<h3><span style="text-decoration:underline;">Introduction</span></h3>
<p>This is a post to get you started with states in Flex. The post is part of a series: <a href="http://prashants.wordpress.com/2010/05/26/flex-3-and-flex-4/">Flex 3 and Flex 4</a>. It contains three primary sections:</p>
<ul>
<li><span style="text-decoration:underline;">What are states</span>? – This section introduces states. If you know what they are, skip this section.</li>
<li><span style="text-decoration:underline;">Creating view states: FLEX 4</span> – In this section, you will learn how to create states in Flex 4.</li>
</ul>
<p>Focus: <strong> </strong></p>
<p><strong>Developers transitioning to Flex 4</strong> and</p>
<p><strong>Flex 4 beginners, who haven’t worked with Flex 3</strong>.</p>
<h3><span style="text-decoration:underline;">What are states?</span></h3>
<p><a href="http://prashants.files.wordpress.com/2010/06/img7.gif"><img class="aligncenter size-full wp-image-150" title="img7" src="http://prashants.files.wordpress.com/2010/06/img7.gif?w=477&#038;h=356" alt="" width="477" height="356" /></a></p>
<p>Computer Science graduates can relate the concept of a state to a Definite Finite Automata.</p>
<p>In general, a state is understood as a situation or a condition of an object. In Flex, a state is one view of the Application (other components can also have states but in this post I will discuss Application states).</p>
<p>Consider for example an application which lets you choose from many phones to select one for yourself. Such an application can have two states for the phone display. One state displays minimal details about the phone. If the user is interested in the phone he can click on the display to go another display state containing more details.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/mobilestatechange2.jpg"><img class="aligncenter size-full wp-image-151" title="mobileStateChange" src="http://prashants.files.wordpress.com/2010/06/mobilestatechange2.jpg?w=477&#038;h=163" alt="" width="477" height="163" /></a></p>
<h3><span style="text-decoration:underline;">Creating view states: Flex 4</span></h3>
<p>The procedure for creating view states has been made much simpler in Flex 4. For working with Flex 4 you would use the Flash Builder 4 IDE (Flash Builder also comes with the earlier SDK, Flex 3 should you want to continue working with Flex 3).</p>
<p>As in the earlier section for Flex 3, I will discuss creating view states in both design view and code view. For design view, the procedure is very similar to how you would do it in <a href="http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/">Flex 3</a>.</p>
<h4>Creating states in design view<strong>:</strong></h4>
<p>Create a new project in Flash Builder 4 (same as <a href="http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/">Flex 3</a>) and switch to the design view. Here, find the components window near the bottom left of the screen and locate the <em>Panel</em> container in the <em>layout</em> subsection. Drag and drop it over the application. Next find the TextInput, Label and Button controls and drag and drop them over the panel to create login-like view as shown in the image below.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/componentsnstatesf4.jpg"><img class="aligncenter size-large wp-image-152" title="componentsNstatesF4" src="http://prashants.files.wordpress.com/2010/06/componentsnstatesf4.jpg?w=512&#038;h=250" alt="" width="512" height="250" /></a></p>
<p>Modify the Label control’s <em>text</em> properties to ‘Username’ and ‘Password’. Also, change the <em>label </em>property of the Buttons to ‘Register’ and ‘Submit’ respectively.</p>
<p>This is your login state. As yet, it has no explicit name because it is the only display state of your application. You can see the state in the states window. It is called &lt;state1&gt;.</p>
<p>If you can’t see the states window, you can open it by going to the menu bar and choosing <em>window </em>&gt; <em>States</em></p>
<p>You are creating a very basic login application which would generally contain 3 states:</p>
<ul>
<li>Login state</li>
<li>Register state</li>
<li>Display state (if user is able to successful login – we will not create this state in this post)</li>
</ul>
<p>To create a new state, right click on &lt;State1&gt; in the states window &gt;New</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/newstateflex4.jpg"><img class="aligncenter size-full wp-image-153" title="NewStateFlex4" src="http://prashants.files.wordpress.com/2010/06/newstateflex4.jpg?w=477" alt=""   /></a></p>
<p>You will see the following window:</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/newstatewindowflex4.jpg"><img class="aligncenter size-full wp-image-154" title="NewStateWindowFlex4" src="http://prashants.files.wordpress.com/2010/06/newstatewindowflex4.jpg?w=477" alt=""   /></a></p>
<p>Here is a definite difference between Flex 3 and Flex 4.</p>
<p><span style="color:#ff6600;">&lt;<strong>Flex beginners and developers who haven’t worked on Flex 3 need not read this. They should move on to the next section</strong>&gt;</span></p>
<p><span style="color:#ff9900;">When you try to create a new state in Flex 3, it has to be <em>based </em>on an existing state. What this means is that the new state (or the child state) will inherit its display from the older state (or parent state). Any change made in the parent state will be seen in the child state also. As an example, if a new Button control is added in the parent state, it will also be seen in the child state when the developer switches to it. Removing a control will have the same effect.</span></p>
<p><span style="color:#ff9900;">In Flex 4, new states are <strong>not</strong> <strong>based</strong> on earlier states. They can either be a duplicate of an older state or a blank state.</span></p>
<p><a href="http://prashants.files.wordpress.com/2010/06/flex3newstate22.jpg"><img class="aligncenter size-full wp-image-155" title="flex3newstate2" src="http://prashants.files.wordpress.com/2010/06/flex3newstate22.jpg?w=477" alt=""   /></a></p>
<p><span style="color:#ff9900;">Changes to</span></p>
<p><a href="http://prashants.files.wordpress.com/2010/06/newstatewindowflex41.jpg"><img class="aligncenter size-full wp-image-156" title="NewStateWindowFlex4" src="http://prashants.files.wordpress.com/2010/06/newstatewindowflex41.jpg?w=477" alt=""   /></a></p>
<p><span style="color:#ff9900;">A state that is made using duplicating an existing state in Flex 4 has thereafter no relation to the earlier state. Any changes in the earlier state, would lead to no change in the new state</span>.</p>
<p>In the New state window, name the new state ‘register’ (you can name it anything, ‘register’ is the name I used). When you click Ok, a new state is created and added to the states window. You would, by default have the same display in the new state as in the login state. Change the display so that it looks something like the image below (Adding controls, changing properties … you know the drill).</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/registerstatef4.jpg"><img class="aligncenter size-full wp-image-157" title="registerStateF4" src="http://prashants.files.wordpress.com/2010/06/registerstatef4.jpg?w=477" alt=""   /></a></p>
<p>Switch back to state1 (the default login state) by clicking on State1 in the states window. You will see that the login panel display is still intact. You now have two state displays. Next task is to switch between them.</p>
<h4>Switching between states<strong>:</strong></h4>
<p>To switch between states you need to change the value of the <em>currentState </em>global variable. This variable contains the name of the <em>currentState</em> of the Application.</p>
<p>So in your login state (State1), select the ‘register’ button. In the properties window (usually below the states window) locate the <em>On click </em>property and in the corresponding text box write: currentState=’register’ as shown in the image.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/onclickf4.jpg"><img class="aligncenter size-full wp-image-158" title="onclickF4" src="http://prashants.files.wordpress.com/2010/06/onclickf4.jpg?w=477" alt=""   /></a></p>
<p>This means that when you run the application and click on this button the view will change to display the register state.</p>
<p>Now switch to the register state in the states window and select the ‘register’ button. You want the state of the application to change back to the login state when the ‘register’ button of the register state is clicked. So similar to the login state, select the register button and in the properties window set the ‘On click’ property to “currentState= ‘State1’ ”</p>
<p>Run the application, and click on the buttons to verify that you can switch between the two states.</p>
<h4>Creating view states in source view<strong>:</strong></h4>
<p>Now that you have created an application with two states in the design view, let’s see how to do the same in source view. Go back to the source view in Flex builder by clicking on the ‘source’ tab on the top left of the design editor. You will see that code has been generated for your actions in the design view. Let’s see the States code.</p>
<p><em>&lt;s:states&gt;<br />
&lt;s:State name=&#8221;State1&#8243;/&gt;<br />
&lt;s:State name=&#8221;register&#8221;/&gt;<br />
&lt;/s:states&gt;<br />
</em></p>
<p>You would also see code generated for the components that you have dropped in the two states. Here is a code snippet of my code:</p>
<p><em>&lt;s:Panel x=&#8221;318&#8243; y=&#8221;139&#8243; width=&#8221;285&#8243; height=&#8221;203&#8243; title=&#8221;Login&#8221; height.register=&#8221;379&#8243; y.register=&#8221;76&#8243; width.register=&#8221;389&#8243; x.register=&#8221;250&#8243; title.register=&#8221;Register&#8221;&gt;<br />
&lt;s:Label text=&#8221;Display name&#8221; x=&#8221;45&#8243; y=&#8221;123&#8243; includeIn=&#8221;register&#8221;/&gt;<br />
&lt;s:Label x=&#8221;24&#8243; y=&#8221;77&#8243; text=&#8221;Password&#8221; x.register=&#8221;45&#8243; y.register=&#8221;82&#8243; text.register=&#8221;Second Name&#8221;/&gt;<br />
&#8230;<br />
&#8230;<br />
&lt;/s:Panel&gt;</em></p>
<p>There is a significant difference in the code generated for Flex 3 and Flex 4.</p>
<p><span style="color:#ff6600;">&lt;<strong>Flex beginners and developers who haven’t worked on Flex 3 need not read this. They should move on to the next section</strong>&gt;</span></p>
<p><span style="color:#ff9900;">Here are the primary differences between state creation in Flex 3 and state creation in Flex 4 in the code view:</span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="319" valign="top"><span style="color:#ff9900;">Flex 3</span></td>
<td width="319" valign="top"><span style="color:#ff9900;">Flex 4</span></td>
</tr>
<tr>
<td width="319" valign="top"><span style="color:#ff9900;">There is   always a base state of the application (represented by empty string ‘’ ),   which does not become part of the &lt;mx:states&gt; tag</span></td>
<td width="319" valign="top"><span style="color:#ff9900;">All   states including the first state (there is no base state here) of the   application become part of the &lt;mx:states&gt; state array</span></td>
</tr>
<tr>
<td width="319" valign="top"><span style="color:#ff9900;">Elements   have to be explicitly added and removed using the AddChild and RemoveChild   mxml tags</span></td>
<td width="319" valign="top"><span style="color:#ff9900;">In Flex 4, developers   can Use the includeIn and excludeFrom   properties to add or remove a component from a state.</span></p>
<p><span style="color:#ff9900;"> </span></td>
</tr>
<tr>
<td width="319" valign="top"><span style="color:#ff9900;">Modifying   / Adding a component’s properties, styles or event handler is done using mxml   tags nested inside the State tag.</span></td>
<td width="319" valign="top"><span style="color:#ff9900;">All this   is done inline in the components declaration</span></td>
</tr>
</tbody>
</table>
<p>To add the first new state to the Application (in this case the ‘register’ state), you have to add two State tags to the states array. One of them is the new state obviously, but you also give a name to the existing state. As an example, for adding a new state with the name ‘register’ to your application, you would add</p>
<p><em>&lt;s:states&gt;<br />
&lt;s:State name=&#8221;State1&#8243;/&gt;<br />
&lt;s:State name=&#8221;register&#8221;/&gt;<br />
&lt;/s:states&gt;</em></p>
<p>All elements that you have defined before adding the states tag are now available in both of the states. You can keep adding states in the states array. All of them will contain the same display (which is the default display of the application). Now to make a component appear in any one or more specific states use the <em>includeIn</em> property of the component. As an example to create a Button instance that appears only in the register state, the  code would be:</p>
<p><em>&lt;s:Button includeIn=&#8221;register&#8221;/&gt;</em></p>
<p>You can specify more than one state in the <em>includeIn</em> property by separating state names with a comma delimiter. Hypothetically, if your application contained a third state called ‘ErrorState’ and you wanted a button to appear only in the other two states (‘State1’ and ‘register’) and not in the ErrorState, the code would be:</p>
<p><em>&lt;s:Button includeIn=&#8221;State1,register&#8221; /&gt;</em> <span style="color:#33cccc;">Code statement 1</span></p>
<p>If the <em>includeIn</em> property is not specified for a component, it will appear in all states.</p>
<p>You can also use the <em>excludeFrom </em>property to specify states in which the component will <strong>not</strong> appear. As an example, we could also have created the above button by:</p>
<p><em>&lt;s:Button excludeFrom=&#8221;ErrorState&#8221; /&gt;</em> <span style="color:#33cccc;">Code statement 2</span></p>
<p>Code statement 1 and 2 are equivalent for an application containing three states: ‘State1’, ‘register’ and ‘ErrorState’.</p>
<h5>Changing component properties</h5>
<p>You may want the height of the Panel to increase in the register state as it contains more content than the login panel. How to make this change in the code view?</p>
<p>In Flex 4, component properties for different states can be specified through &lt;propertyName.stateName&gt;. As an example, for creating a panel which has a height of 200 in the login state (State1) and a height of 400 in the register state, the code would be:</p>
<p><em>&lt;s:Panel height.state1=&#8221;200&#8243; height.register=&#8221;400&#8243;/&gt;</em></p>
<p>If you don’t specify a state name after the property name then that becomes the default value of the property in all states that have no explicit value specified for them.</p>
<p><em>&lt;s:Panel height.state1=&#8221;200&#8243; height =&#8221;400&#8243;/&gt;</em></p>
<p>In the above code, the panel will have a height of 400 in all states but State1.</p>
<p>In my opinion, Flex 4 provides a much cleaner approach to creating states and is the clear SDK choice for developers starting with States. You may also want to learn about <a href="http://flashahead.adobe.com/prashants/contentUnavailable.html">transitions between states</a> for Flex 3 and Flex 4.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=149&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/img7.gif" medium="image">
			<media:title type="html">img7</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/mobilestatechange2.jpg" medium="image">
			<media:title type="html">mobileStateChange</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/componentsnstatesf4.jpg?w=1024" medium="image">
			<media:title type="html">componentsNstatesF4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/newstateflex4.jpg" medium="image">
			<media:title type="html">NewStateFlex4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/newstatewindowflex4.jpg" medium="image">
			<media:title type="html">NewStateWindowFlex4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/flex3newstate22.jpg" medium="image">
			<media:title type="html">flex3newstate2</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/newstatewindowflex41.jpg" medium="image">
			<media:title type="html">NewStateWindowFlex4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/registerstatef4.jpg" medium="image">
			<media:title type="html">registerStateF4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/onclickf4.jpg" medium="image">
			<media:title type="html">onclickF4</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s coming!</title>
		<link>http://prashants.wordpress.com/2010/06/03/its-coming/</link>
		<comments>http://prashants.wordpress.com/2010/06/03/its-coming/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 11:29:49 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=143</guid>
		<description><![CDATA[http://bit.ly/adobesummit<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=143&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.developermarch.com/adobesummit/"><img class="aligncenter size-full wp-image-144" title="TAS_Teaser" src="http://prashants.files.wordpress.com/2010/06/tas_teaser.jpg?w=477&#038;h=351" alt="" width="477" height="351" /></a></p>
<p><a href="http://bit.ly/adobesummit" target="_blank">http://bit.ly/adobesummit</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=143&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2010/06/03/its-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/tas_teaser.jpg" medium="image">
			<media:title type="html">TAS_Teaser</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating view states: Flex 3</title>
		<link>http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/</link>
		<comments>http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 15:02:55 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=126</guid>
		<description><![CDATA[Introduction This is a post to get you started with States in Flex. The post is part of a series: Flex 3 and Flex 4. It contains two primary sections: What are states? – This section introduces states. If you know what they are, skip this section. Creating view states in FLEX 3 &#8211; This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=126&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;"> </span></p>
<h3><span style="text-decoration:underline;">Introduction</span></h3>
<p>This is a post to get you started with <strong>States</strong> in Flex. The post is part of a series: <a href="http://prashants.wordpress.com/2010/05/26/flex-3-and-flex-4/">Flex 3 and Flex 4</a>. It contains two primary sections:</p>
<ul>
<li><span style="text-decoration:underline;">What are states</span>? – This section introduces states. If you know what they are, skip this section.</li>
<li><span style="text-decoration:underline;">Creating view states in FLEX 3</span> &#8211; This section will describe in detail how you can create and implement states in Flex 3.</li>
</ul>
<p>Reader Focus: <strong>Flex 3 beginners.</strong></p>
<h3><span style="text-decoration:underline;">What are states?</span></h3>
<p>In general, a state is understood as a situation or a condition of an object.</p>
<p>In Flex, a state is one view of the Application (other components can also have states but in this post I will discuss Application states).</p>
<p>Consider for example an application which lets you choose from many phones to select one for yourself. Such an application can have two states for the phone display. One state displays minimal details about the phone. If the user is interested in the phone he can click on the display to go another display state containing more details.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/mobilestatechange1.jpg"><img class="aligncenter size-full wp-image-127" title="mobileStateChange" src="http://prashants.files.wordpress.com/2010/06/mobilestatechange1.jpg?w=477&#038;h=163" alt="" width="477" height="163" /></a></p>
<h3><span style="text-decoration:underline;">Creating view states in Flex 3</span></h3>
<p>Open Flex builder and create a new project by going to File -&gt; New -&gt; Flex project. In the window that follows give an appropriate name to the project. I called it LoginProject. Click ‘Finish’ to complete project creation.</p>
<p>In Flex Builder, you can create states in both code view and design view. This post will talk about both. Let’s first see how to create states in design view</p>
<h4>Creating states in design view<strong>:</strong></h4>
<p>Go to Flex Builder design view by clicking on the design tab on top left of your code editor.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/12.jpg"><img class="aligncenter size-full wp-image-128" title="1" src="http://prashants.files.wordpress.com/2010/06/12.jpg?w=477&#038;h=194" alt="" width="477" height="194" /></a></p>
<p>Now, find the components window near the bottom left of the screen and locate the <em>Panel</em> container in the <em>layout</em> subsection. Drag and drop it over the application.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/111.jpg"><img class="aligncenter size-large wp-image-129" title="11" src="http://prashants.files.wordpress.com/2010/06/111.jpg?w=512&#038;h=250" alt="" width="512" height="250" /></a></p>
<p>Next, find the TextInput, Label and Button controls and drag and drop them inside the panel to create login-like view as shown in the image.</p>
<p>Modify the Label control’s text properties to ‘Username’ and ‘Password’ from the Flex Properties panel on the left hand side as shown in the image above. Also, change the Label property of the Buttons to ‘Register’ and ‘Submit’ respectively.</p>
<p>This is one state of your application. You will see it in the states window. It is called the &lt;base state&gt;. You will also see ‘start’ written next to the state name in parentheses. This means that this is the view, application will display when you run it.</p>
<p>If you can’t see the states window, you can open it by going to the menu bar and choosing <em>window </em>&gt; <em>states</em></p>
<p>You are creating a very basic login application which should contain 3 states:</p>
<ul>
<li>Login state</li>
<li>Register state</li>
<li>Display state (if user is able to successfully login – I will not discuss creating this state in this post)</li>
</ul>
<p>You already have your Login state (base state). You will now create the ‘register’ state.</p>
<p>To create a new state, right click on &lt;base state&gt; in the states window &gt;New</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/flex3newstate1.jpg"><img class="aligncenter size-full wp-image-130" title="flex3newstate" src="http://prashants.files.wordpress.com/2010/06/flex3newstate1.jpg?w=477" alt=""   /></a></p>
<p>You will see the following window:</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/flex3newstate21.jpg"><img class="aligncenter size-full wp-image-131" title="flex3newstate2" src="http://prashants.files.wordpress.com/2010/06/flex3newstate21.jpg?w=477" alt=""   /></a></p>
<p>Here you can choose which state to base this new state on. Any new state will, by default contain all components that its parent state (state it is based on) contains. Any subsequent changes in the base state will also be reflected in the new state. Developers using Flex 4 will notice a change here. To know more about that read <a href="http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/">Creating view states in Flex 4</a></p>
<p>You can also choose to set this state as the start state of the application by clicking on ‘Set as start state’ checkbox.</p>
<p>Name the new state ‘register’ (you can name it anything, ‘register’ is the name I used) and base it on the base state of the application. When you click Ok, the register state is added to the states window.</p>
<p>Try switching between the states in the ‘states’ window. You will see that the new state is the exact duplicate of its parent state. You need to now change the display of the new state to look like that in the image below.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/flex3registerstate.jpg"><img title="flex3registerstate" src="http://prashants.files.wordpress.com/2010/06/flex3registerstate.jpg?w=477&#038;h=467" alt="" width="477" height="467" /></a></p>
<p>You need to change a few properties and add some new controls to create a display like above.</p>
<p>This done, click on the &lt;base state&gt; state in the states window to switch to the base state. You will see that the login state display is intact and none of the changes made in the derived state will be seen in the parent state. If you change something in the parent state however, like add another control to its display, the control will appear in the child state.</p>
<h3>Switching between states:</h3>
<p>To switch between states you need to change the value of the <em>currentState </em>global variable. This variable contains the name of the current state of the Application.</p>
<p>So in Flex Builder design view, go to the login state (base state of the application) and select the ‘register’ button. In the properties panel locate ‘<em>On click’ </em> and in the corresponding text box type: <em>currentState</em>=’register’ as shown in the image below.</p>
<p><a href="http://prashants.files.wordpress.com/2010/06/flexproperties.jpg"><img class="aligncenter size-full wp-image-133" title="Flexproperties" src="http://prashants.files.wordpress.com/2010/06/flexproperties.jpg?w=477" alt=""   /></a></p>
<p>This means that when you run the application and <em>click</em> on this button the currentState of the application should become ‘register’</p>
<p>Now switch to the register state in the states window of Flex Builder and select the ‘register’ button. In the properties panel, you will see the <em>On click</em> property for this button has also been changed to “currenState=’register’ ”. This is expected as changes to the parent state will be reflected in the child state. However, you want the state of the application to change back to the login state when the ‘register’ button of the register state is clicked.</p>
<p>To do this, modify the ‘On click’ porperty to “ currenState= ‘ ’ ”. Assigning an empty string to the currentState variable changes the application state to &lt;base state&gt;.</p>
<p>Run the application by pressing &lt;CTRL+F11&gt;.</p>
<p>You will see that you can switch between the login and register states by clicking on the ‘register’ buttons.</p>
<h3>Creating view states in source view:</h3>
<p>Now that you have created an application with two states in the design view, let’s see how to do the same in source view. Go back to the source view in Flex builder by clicking on the ‘source’ tab on the top left of the design editor. You will see that code has been generated for your actions in the design view.</p>
<p><em>&lt;mx:states&gt;<br />
&lt;mx:State name=&#8221;register&#8221;&gt;<br />
&lt;mx:RemoveChild target=&#8221;{button1}&#8221;/&gt;<br />
&lt;mx:AddChild relativeTo=&#8221;{panel1}&#8221; position=&#8221;lastChild&#8221;&gt;<br />
&lt;mx:SetProperty target=&#8221;{panel1}&#8221; name=&#8221;height&#8221; value=&#8221;410&#8243;/&gt;<br />
&#8230;<br />
&#8230;<br />
&lt;/mx:State&gt;<br />
&lt;/mx:states&gt;</em></p>
<p>Any new state in Flex will be added to the states array. As you can see in the code snippet above, when we create a new state in the design view, a &lt;mx:states&gt; tag is created. This is an array of all new states (it does not include the base state) of the application. To create a new state inside the &lt;mx:states&gt; tag, start a &lt;mx:State&gt; tag as can be seen in the code snippet. Every state has a <em>basedOn </em>property which is the name of the parent state of this state. If it is not specified for a state it will have the base state as its parent.</p>
<p>The state that you have thus created is a duplicate of its parent state. You will now learn how to change the new state. Following are the changes that you would generally make in a state and how you implement them:</p>
<p><strong>Add a component</strong>:</p>
<p>To do this, add a &lt;mx:AddChild&gt; mxml tag inside the State tag. The new component will become the child of the &lt;mx:Addchild&gt; tag. As an example to add a new TextInput to a panel (id=’panel1’) inside the state ‘register’ the code would be:</p>
<p><em>&lt;mx:State name=&#8221;register&#8221;&gt;</em></p>
<p><em> &lt;mx:AddChild relativeTo=&#8221;{panel1}&#8221; position=&#8221;lastChild&#8221;&gt;<br />
</em></p>
<p><em> &lt;mx:TextInput x=&#8221;122&#8243; y=&#8221;33&#8243; width=&#8221;143&#8243;/&gt;</em></p>
<p><em> &lt;/mx:AddChild&gt;</em></p>
<p><em>&lt;/mx:State&gt;</em></p>
<p>The <em>relativeTo </em>property specifies a preexisting component used as the reference point for adding the new component. If this property is not specified the parent of the view state becomes the <em>relativeTo</em> value. The <em>position</em> property specifies how the new component is placed with respect to the component in the <em>relativeTo</em> property. It (position) can have the following values:</p>
<ul>
<li>before – The new component is placed before the relativeTo component.</li>
<li>after  &#8211; New component is placed after the relativeTo component</li>
<li>firstChild – New component becomes the first Child of the relativeTo component</li>
<li>lastChild – New component becomes the last child of the relativeTo component</li>
</ul>
<p><strong>Remove a component</strong>:</p>
<p>To do remove a component in a state use &lt;mx:RemoveChild&gt;. As an example, to remove a button (id=’button1’) from the state ‘register’, the code should be:</p>
<p><em>&lt;mx:State name=&#8221;register&#8221;&gt;<br />
&lt;mx:RemoveChild target=&#8221;{button3}&#8221;/&gt;<br />
&lt;/mx:State&gt;</em></p>
<p><strong>Change or set a component property</strong></p>
<p>To do this, add a &lt;mx:SetProperty&gt; tag as a child of the State tag. As an example, to change the <em>‘height’</em> property of a panel (id=’panel1’) in the register state to the ‘<em>value’</em> ‘410’, the code would be:</p>
<p><em>&lt;mx:State name=&#8221;register&#8221;&gt;<br />
&lt;mx:SetProperty target=&#8221;{panel1}&#8221; name=&#8221;height&#8221; value=&#8221;410&#8243;/&gt;<br />
&lt;/mx:State&gt;</em></p>
<p><strong>Change or set event handler</strong></p>
<p>You can also use the &lt;mx:SetEventHandler&gt; mxml tag to set a new event handler for some event. While doing this, specify the target as the component on which event would be dispatched, the name as the event type and as the handler specify the name of the new event handler method. As an example, to add an event handler for a button (id=’button2’) in the ‘register’ state for the click event type, the code would be:</p>
<p><em>&lt;mx:State name=&#8221;register&#8221;&gt;<br />
&lt;mx:SetEventHandler target=&#8221;{button2}&#8221; name=&#8221;click&#8221; handler=&#8221;newFunc()&#8221;/&gt;<br />
&lt;/mx:State&gt;</em></p>
<p>So this is how you create view states in Flex 3. If you think this is easy, you should read how easy it is for <a href="http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/">Flex 4.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=126&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/mobilestatechange1.jpg" medium="image">
			<media:title type="html">mobileStateChange</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/12.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/111.jpg?w=1024" medium="image">
			<media:title type="html">11</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/flex3newstate1.jpg" medium="image">
			<media:title type="html">flex3newstate</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/flex3newstate21.jpg" medium="image">
			<media:title type="html">flex3newstate2</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/flex3registerstate.jpg" medium="image">
			<media:title type="html">flex3registerstate</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2010/06/flexproperties.jpg" medium="image">
			<media:title type="html">Flexproperties</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex 3 and Flex 4</title>
		<link>http://prashants.wordpress.com/2010/05/26/flex-3-and-flex-4/</link>
		<comments>http://prashants.wordpress.com/2010/05/26/flex-3-and-flex-4/#comments</comments>
		<pubDate>Wed, 26 May 2010 06:49:48 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=110</guid>
		<description><![CDATA[Well, Hello Flexters! This is an introduction post to a series of Blog posts I will be releasing during the next few weeks. These posts will talk about how to get things rolling in both Flex 3 and 4. I have tried to take a &#8216;topic&#8217; based approach having tried to list out the set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=110&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, Hello Flexters!</p>
<p>This is an introduction post to a series of Blog posts I will be releasing during the next few weeks.</p>
<p>These posts will talk about how to get things rolling in both Flex 3 and 4. I have tried to take a &#8216;topic&#8217; based approach having tried to list out the set of ‘things’ I did in Flex before I started thinking of myself as a ‘Flex user’ and no longer a beginner. Then when I started with Flex 4, I went through the same process, learning about and repeating similar tasks.</p>
<p>In course of this series, I will provide a step-by-step on how you can do such a task ‘xyz’ in Flex 3 (Using Flex Builder 3). The very next post will tell you how to the same ‘xyz’ in Flex 4 (On Flash Builder). In this second post on Flex 4, I will also highlight (in marked passages that you can skip over) the difference in executing ‘xyz’ in Flex 4 as compared to Flex 3. So there will be two posts on every topic (Will release sample posts by end of week).</p>
<p>Bear in mind these are independent posts and can be read separately or together. I have divided the readers in the following 4 broad groups:</p>
<p><a name="Flex3beginners"><strong>Flex 3 Beginners</strong></a>:</p>
<p>Developers entering the world of Flex, who have started working with Flex 3 or are soon to start working on it. They can read the Flex 3 post to learn how to do job ‘xyz’ in Flex 3. They can also choose to check out the corresponding Flex 4 post to know how this has been made easier/better in Flex 4.</p>
<p><strong>Flex 4 beginners, haven’t worked with Flex 3</strong>:</p>
<p>Developers who are starting with Flex 4 but have no prior experience of working with Flex 3 or any of the earlier versions. They can read the Flex 4 posts on how to get job ‘xyz’ done in Flex 4. As I have mentioned earlier, there will be sections in the post specifying the differences between Flex 3 and Flex 4(these sections will be highlighted in a different color). They can skip over these sections.</p>
<p><strong>Developers transitioning to Flex 4</strong>:</p>
<p>Engineers who have been working with Flex 3 and are now switching to Flex 4 or those who still work with Flex 3 but are interested in knowing how Flex 4 is different from Flex 3.They can read through the second post on Flex 4 (Flex 3 post optional) and go through the differences sections to understand while learning Flex 4, how things have changed in this version.</p>
<p><strong>Developers working with Flex 4</strong>:</p>
<p>Flex developers working on Flex 4 but are curious to know how it is different/better from Flex 3.</p>
<p>These posts don’t have much for the advanced Flex developers, most of the topics being introductory.<br />
With this in mind, here is the list of topics I plan to write on:</p>
<p><span style="text-decoration:underline;">Retrieving data through HTTPService: Flex 3</span></p>
<p><span style="text-decoration:underline;">Retrieving data through HTTPService Flex 4</span></p>
<p><span style="text-decoration:underline;">Data binding: Flex 3</span></p>
<p><span style="text-decoration:underline;">Data binding: Flex 4</span></p>
<p><a href="http://prashants.wordpress.com/2010/06/02/creating-view-states-flex-3/"><span style="text-decoration:underline;">Creating view states: Flex 3</span></a></p>
<p><a href="http://prashants.wordpress.com/2010/06/15/creating-view-states-flex-4/"><span style="text-decoration:underline;">Creating views states: Flex 4</span></a></p>
<p><span style="text-decoration:underline;">Transitions between states: Flex 3</span></p>
<p><span style="text-decoration:underline;">Transitions between states: Flex 4</span></p>
<p><span style="text-decoration:underline;">Styling through CSS: Flex 3</span></p>
<p><span style="text-decoration:underline;">Styling through CSS: Flex 4</span></p>
<p><span style="text-decoration:underline;">Animations and Effects: Flex 3</span></p>
<p><span style="text-decoration:underline;">Animations and Effects: Flex 4</span></p>
<p><span style="text-decoration:underline;">Components &#8211; Controls and Containers: Flex 3</span></p>
<p><span style="text-decoration:underline;">Components – Controls and Containers: Flex 4</span></p>
<p><span style="text-decoration:underline;">Creating Custom components: Flex 3</span></p>
<p><span style="text-decoration:underline;">Creating Custom components: Flex 4</span></p>
<p><span style="text-decoration:underline;">Event Handling and propagation: Flex 3</span></p>
<p><span style="text-decoration:underline;">Event Handling and propagation: Flex 4</span></p>
<p><span style="text-decoration:underline;">Passing data through an event object &#8211; Custom events: Flex 3</span></p>
<p><span style="text-decoration:underline;">Passing data through an event object &#8211; Custom events: Flex 4</span></p>
<p><span style="text-decoration:underline;">Skinning your components: Flex 3</span></p>
<p><span style="text-decoration:underline;">Skinning your components: Flex 4</span></p>
<p><span style="text-decoration:underline;">Using Graphics to draw: Flex 3</span></p>
<p><span style="text-decoration:underline;">Using Graphics to draw: Flex 4</span></p>
<p><span style="text-decoration:underline;">Creating item renderers and item editors: Flex 3</span></p>
<p><span style="text-decoration:underline;">Creating item renderers and item editors: Flex 4</span></p>
<p><span style="text-decoration:underline;">Implementing skin parts: Flex 4</span></p>
<p><span style="text-decoration:underline;">Displaying data using the DataGroup container: Flex 4</span></p>
<p>This is not an ordered list as I have tried to keep the posts independent of each other. So the posts may not come in the order in which they are listed. Few posts may require knowledge/overview of a previous post in which case, I will mention it.</p>
<p>The titles in this list will become links to the posts as I keep adding to the stack of articles. I plan to submit 2 articles every week. So every week I cover one topic, releasing one Flex 3 and one Flex 4 post for it.</p>
<p>I may add to the list of the topics on feedback. The two final topics in the list (“Implementing skin parts” and “Displaying data using the DataGroup container”) are Flex 4 specific and have no Flex 3 counterpart.</p>
<p>The first 2 posts will be on “Creating View States” in Flex 3 and 4. Coming out by end of week.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=110&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2010/05/26/flex-3-and-flex-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Adobe CS5 on twitter</title>
		<link>http://prashants.wordpress.com/2010/04/12/adobe-cs5-on-twitter/</link>
		<comments>http://prashants.wordpress.com/2010/04/12/adobe-cs5-on-twitter/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:03:22 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=106</guid>
		<description><![CDATA[I searched for #CS5 on twitter and was amazed at the amount of content I saw. Thought I should share some of it: pablokorona Adobe CS5 looks like an update that may rattle the FCP foundation of many, myself included. After effects update looks massive SHAYNEWILLIAMS RT @techradar: RT @ComputerArts: It&#8217;s CS5 Monday! You want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=106&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I searched for #CS5 on twitter and was amazed at the amount of content I saw. Thought I should share some of it:</p>
<p><a href="http://twitter.com/pablokorona">pablokorona</a> Adobe CS5 looks like an update that may rattle the FCP foundation of many, myself included. After effects update looks massive</p>
<p><a href="http://twitter.com/SHAYNEWILLIAMS">SHAYNEWILLIAMS</a> RT @techradar: RT @ComputerArts: It&#8217;s CS5 Monday! You want to know the 40 top things in CS5? Here you go: <a href="http://bit.ly/40cs5">http://bit.ly/40cs5</a></p>
<p><a href="http://twitter.com/OneScholar">OneScholar</a> Photography judging panels will face greater headaches with the release of Photoshop CS5: <a href="http://fwd4.me/L9g">http://fwd4.me/L9g</a></p>
<p><a href="http://twitter.com/siddharthlele">siddharthlele</a> The Adobe CS5 is here. And Dreamweaver CS5 rocks!! <a href="http://www.adobe.com/products/dreamweaver/">http://www.adobe.com/products/dreamweaver/</a></p>
<p><a href="http://twitter.com/flashmagazine">flashmagazine</a> Flash Professional CS5 Review: <a href="http://www.flashmagazine.com/reviews/detail/flash_cs5_review/">http://www.flashmagazine.com/reviews/detail/flash_cs5_review/</a></p>
<p><a href="http://twitter.com/ericjordan">ericjordan</a>: Computer Arts has a good breakdown of the 40 new features in the CS5 Suite. <a href="http://trunc.it/7314k">http://trunc.it/7314k</a></p>
<p><a href="http://twitter.com/stewy6">stewy6</a> RT @Gartenberg: Some of the features in CS5 border on the magical. Or witchcraft. Not sure which. #amazing</p>
<p><a href="http://twitter.com/zarathevegan">zarathevegan</a> I&#8217;ll be watching the CS5 release in a couple of hours. Soooooooooooo excited!</p>
<p><a href="http://twitter.com/fuseltd_chris">fuseltd_chris</a> Can&#8217;t wait for the CS5 trial to be released. Rotoscoping, colour correction, and compositing never looked this good.. <a href="http://bit.ly/949Vz9">http://bit.ly/949Vz9 </a></p>
<p><a href="http://twitter.com/supervee">supervee</a> Adobe CS5 Brings Sexy Back <a href="http://www.webdesignerdepot.com/2010/04/adobe-creative-suite-5-brings-sexy-back/">http://www.webdesignerdepot.com/2010/04/adobe-creative-suite-5-brings-sexy-back/</a></p>
<p><a href="http://twitter.com/marimoart">marimoart</a> Top 5 Photoshop CS5 Features <a href="http://youtu.be/imEZ4Y9eTRk">http://youtu.be/imEZ4Y9eTRk</a></p>
<p><a href="http://twitter.com/macbebekin">macbebekin</a> Can&#8217;t wait to get my hands on Adobe CS5. Among other things: Puppet Warp! Although I&#8217;ll probably never need or use the tool.</p>
<p><a href="http://twitter.com/cpoette">cpoette</a> RT @flashmagazine: Flash Professional CS5 Review: <a href="http://www.flashmagazine.com/reviews/detail/flash_cs5_review/">http://www.flashmagazine.com/reviews/detail/flash_cs5_review/</a></p>
<p><a href="http://twitter.com/Mandypops">Mandypops</a> reallly want CS5! Photoshop CS5 looks good <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://twitter.com/Joseph_Sa">Joseph_Sa</a> Cant wait to put my hands on the new Photoshop CS5 .. (excited)</p>
<p><a href="http://twitter.com/Eugene_G">Eugene_G</a> RT @thomashawk: New Adobe Photoshop CS5 ROCKS! <a href="http://goo.gl/OVfl">http://goo.gl/OVfl</a></p>
<p><a href="http://twitter.com/SarbenPhotos">SarbenPhotos</a> Today is better than Christmas for some people and they don&#8217;t even realize it yet. Now we can tell people alllll about Photoshop #CS5 <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> :)</p>
<p><a href="http://twitter.com/Portrait2a_normal">Portrait2a_normal</a> huseyinthebrain Photoshop CS5 is bananas &#8211; <a href="http://links.assetize.com/links/de6435">http://links.assetize.com/links/de6435</a><br />
<a href="http://twitter.com/hebiflux">hebiflux</a> RT @dotmick: Flash Professional CS5 Review &gt; <a href="http://tinyurl.com/yyhd2kp">http://tinyurl.com/yyhd2kp</a> #cs5</p>
<p>Tweets just kept pouring in and it was surprising that CS5 was not trending. One link which kept popping up was:</p>
<p>http://www.computerarts.co.uk/in_depth/features/40_new_features_in_cs5</p>
<p>Other links I saw:</p>
<p>http://www.flashmagazine.com/reviews/detail/flash_cs5_review/</p>
<p>http://thomashawk.com/2010/04/adobe-photoshop-cs5-boldly-empowers-the-digital-artist.html</p>
<p>http://links.assetize.com/links/de6435</p>
<p>http://tinyurl.com/yyhd2kp</p>
<p>Trending or no trending CS5 is going to be big.</p>
<p><em><span style="font-size:small;">Phoebe: Not just Big.  This is huge.  This is bigger than huge.  This is  like, all right, what&#8217;s bigger than huge?</span></em></p>
<p><em><span style="font-size:small;">JOEY:  Um, this?</span></em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=106&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2010/04/12/adobe-cs5-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Presentations and source Zips from DevSummit</title>
		<link>http://prashants.wordpress.com/2009/12/14/presentations-and-source-zips-from-devsummit/</link>
		<comments>http://prashants.wordpress.com/2009/12/14/presentations-and-source-zips-from-devsummit/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 15:01:44 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=102</guid>
		<description><![CDATA[Had an incredible time in Chennai talking about Flash Builder Data Centric features. I talked about how to connect to Java and PHP backend from a Flex Client. Flex UI was created in an earlier session by Shyam P. Loved the crowd; event received over 600 people, containing a good mix of students and professional [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=102&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Had an incredible time in Chennai talking about Flash Builder Data Centric features. I talked about how to connect to Java and PHP backend from a Flex Client. Flex UI was created in an earlier session by <a href="http://flexedup.wordpress.com">Shyam P</a>. Loved the crowd; event received over 600 people, containing a good mix of students and professional developers.They were interactive and enthusiastic till the end. Would like to do more events in Chennai <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
A apologize to friends whom I promised to meet in Hyderabad. Had to skip the trip due to health reasons.</p>
<p>Presentation<br />
Here is my presentation for the summit.</p>
<p>Set up instructions<br />
To know the set-up instructions for the learn by doing session read:<br />
<a href="http://flashahead.adobe.com/events/devsummit2009/lbd/lbd_setup_instructions.pdf">http://flashahead.adobe.com/events/devsummit2009/lbd/lbd_setup_instructions.pdf</a></p>
<p>You can keep visiting this site for updates about future events.</p>
<p>We also have a twitter account forFlashahead (@FlashAhead). You can follow it to receive updates, announcements and other fun stuff on Adobe Flash Platform.</p>
<p>Catalyst Demo</p>
<p><a href="http://flashahead.adobe.com/prashants/RichList.fxp">Here</a> is UI source generated by Flash Catalyst in the first session.</p>
<p>Instructions on How-To-Connect</p>
<p>Click <a href="http://flashahead.adobe.com/prashants/LearnByDoing2.pdf">here</a> to read the instructions on how to connect to Java and PHP backend from the User Interface generated above.</p>
<p>DCD demo</p>
<p>The source of the final funtioning project can be downloaded from <a href="http://flashahead.adobe.com/prashants/RichListComplete.fxp">here</a>. For creating it, I imported the FXP created through Catalyst into Flash Builder,where I used the DCD features of Flash Builder to connect to the Java and PHP backends. Please feel free to contact me  if you have issues with any of the above stuff.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=102&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2009/12/14/presentations-and-source-zips-from-devsummit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking at Adobe Devsummit Chennai and Hyderabad</title>
		<link>http://prashants.wordpress.com/2009/11/09/speaking-at-adobe-devsummit-chennai-and-hyderabad/</link>
		<comments>http://prashants.wordpress.com/2009/11/09/speaking-at-adobe-devsummit-chennai-and-hyderabad/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:41:20 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=94</guid>
		<description><![CDATA[After an amazing event in Bangalore, Adobe DevSummit is now coming to Chennai and Hyderabad. To register or to know about the venues and dates click here.  I would strongly urge any new Flex developers to attend the talks on Adobe Flash Catalyst and Data centric development. I will be taking the tutorial session on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=94&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After an amazing event in Bangalore, Adobe DevSummit is now coming to Chennai and Hyderabad. To register or to know about the venues and dates click <a href="http://endtoend.in/apps/forms/adobe/DevSummitNovDec09/home.html" target="_blank">here</a>.  I would strongly urge any new Flex developers to attend the talks on Adobe Flash Catalyst and Data centric development.</p>
<p>I will be taking the tutorial session on how to connect to the backend (Learn by doing &#8211; Part 2: Integrate with server) together with fellow  technical evangelist, <a href="http://sujitreddyg.wordpress.com" target="_blank">Sujit</a>. This session talks about how to access data from a database through Flash builder. It will cover in detail how to connect to multiple backends from flex. Any developer thinking of starting with flex are encouraged to attend the tutorial sessions.</p>
<p>Hoping to see you there&#8230;.</p>
<p>PS: All Platinum delegates will get Flex Builder 3 Professional Licence for free !!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=94&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2009/11/09/speaking-at-adobe-devsummit-chennai-and-hyderabad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>
	</item>
		<item>
		<title>Exposing Java project as Web Service to Flash Builder 4 using Data Centric Development (DCD)</title>
		<link>http://prashants.wordpress.com/2009/10/14/exposing-java-project-as-web-service-to-flash-builder-4-using-data-centric-development-dcd/</link>
		<comments>http://prashants.wordpress.com/2009/10/14/exposing-java-project-as-web-service-to-flash-builder-4-using-data-centric-development-dcd/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 13:55:32 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=59</guid>
		<description><![CDATA[The definition of a Web Service as given by W3C is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=59&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The definition of a Web Service as given by W3C is <em>a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standard.</em></p>
<p>Web services are often used to provide an Application programming interface to clients systems which use the Server methods running on a remote system.</p>
<p>In this post I will talk about how to expose a java service as a web service. For accessing this service(or any other web service),  user requires a WSDL descriptor file. WSDL stands for Web Services Description Language. How to generate this WSDL will also be explained in this post.</p>
<p>I split this post in the following sections:<br />
•    Creating database and Backend<br />
•    Generating the WSDL<br />
•    Connect to service using DCD in Flash Builder<br />
•    Displaying data fetched by the service</p>
<h3><span style="text-decoration:underline;"><em>Creating database and Backend</em></span></h3>
<p>I will not go into the details of how to create the backend.<br />
I am assuming user has a working Java project which can produce the data required by the client. In my opinion the implementation should be hidden to expose only an interface to the required methods. In any case, the user will have a class or an interface file containing declarations of needed methods. I will call this file BackendService.</p>
<h3><em><span style="text-decoration:underline;">Generating the WSDL</span></em></h3>
<p>There are multilple tools available for generating the the WSDL. I have used Apache&#8217;s XFIRE. An upgrade of this tool with the name CFX is also available now. I would recommend using the older XFIRE for its simplicity. It can be downloaded from here .<br />
User also needs to have a J2EE web server up and running. I recommend Tomcat but any other server will also do. On your server go to the directory where you would deploy your web applications(Web-apps) and create a directory with the name of your project. Here create another directory with the name WEB-INF. Open WEB-INF and now create the following subdirectories and files inside WEB-INF:</p>
<p><strong>Classes </strong></p>
<p>This directory should contain all the compiled Java classes with their package structure intact.  Also create a subdirectory with the name META-INF. Inside META-INF create another subdirectory with the name “xfire”. Create a new file “services.xml” in “xfire”.<br />
Paste this xml code in Services.xml:<br />
<img class="aligncenter size-full wp-image-64" title="xml1" src="http://prashants.files.wordpress.com/2009/10/xml12.jpg?w=477&#038;h=165" alt="xml1" width="477" height="165" /><br />
Change the name of the service to the name of your own service. Accordingly change the serviceClass tag to contain the path of the class from the “classes” directory. The namespace tag should contain your desired namespace.</p>
<p><strong>LIB </strong></p>
<p>In this directory copy all the libraries required by xfire. You can get the list of dependencies and their download links from here. Before downloading any check the libraries that you got from the Xfire download. Most of the dependencies will already be there.</p>
<p><strong> </strong><strong>web.xml</strong></p>
<p>Now that you have created and populated the directories, create a new file in the WEB-INF directory with the name web.xml. In this file copy the following content:<img class="aligncenter size-full wp-image-66" title="xml2" src="http://prashants.files.wordpress.com/2009/10/xml2.jpg?w=477&#038;h=360" alt="xml2" width="477" height="360" /></p>
<p>Now check out this URL:</p>
<p>http://localhost:8400/ProjectName/services/dataService?wsdl</p>
<p>In the above URL replace “ProjectName” with your actual project name. Replace dataService with the name of your dataService. Change the port if required and try accessing it from a browser.</p>
<p>You should now be able to view the generated WSDL . I will call this URL WSDL-URL. The next step is to access it from Flash builder.</p>
<h3><em><span style="text-decoration:underline;">Connect to service using DCD in Flash Builder</span></em></h3>
<p>Open Flash builder and create a new project by going to file -&gt; New -&gt; Flex project. In the window that follows give an appropriate name to the project. I called it InvokeWSProject. Click Next-&gt;Finish to complete project completion.</p>
<p><img class="aligncenter size-full wp-image-67" title="1" src="http://prashants.files.wordpress.com/2009/10/13.jpg?w=477&#038;h=520" alt="1" width="477" height="520" /></p>
<p>Next step is to connect to the Java service. For this, Click on the Data/Services tab in the bottom frame of the screen.<br />
<a href="http://prashants.files.wordpress.com/2009/10/21.jpg"><br />
<img class="aligncenter size-full wp-image-68" title="2" src="http://prashants.files.wordpress.com/2009/10/21.jpg?w=477&#038;h=298" alt="2" width="477" height="298" /></a></p>
<p>In the screen that follows select Web service and click on next.</p>
<p><img class="aligncenter size-full wp-image-71" title="3" src="http://prashants.files.wordpress.com/2009/10/31.jpg?w=477&#038;h=477" alt="3" width="477" height="477" /></p>
<p>Enter WSDL-URL. Flash builder populates the Service details.</p>
<p><img class="aligncenter size-full wp-image-72" title="4" src="http://prashants.files.wordpress.com/2009/10/43.jpg?w=477&#038;h=476" alt="4" width="477" height="476" /></p>
<p>Click on next to see a screen like this. Here select the functions you want to import. All functions are selected by default.</p>
<p><img class="aligncenter size-full wp-image-73" title="5" src="http://prashants.files.wordpress.com/2009/10/51.jpg?w=477&#038;h=483" alt="5" width="477" height="483" /></p>
<p>When you click finish, you see all functions that you wished to import are now available to you in the Data/Services tab.</p>
<p><img class="aligncenter size-full wp-image-74" title="6" src="http://prashants.files.wordpress.com/2009/10/61.jpg?w=477&#038;h=243" alt="6" width="477" height="243" /></p>
<p>What remains now is to get the data fetched by the dataService and display them.</p>
<p><em><span style="text-decoration:underline;">Displaying data fetched by the service</span></em></p>
<p>Go to Flash builder Design view. Drag and Drop a DataGrid from Flex component controls.</p>
<p><img class="aligncenter size-full wp-image-80" title="7" src="http://prashants.files.wordpress.com/2009/10/72.jpg?w=477&#038;h=287" alt="7" width="477" height="287" /></p>
<p>Your data will be shown in this grid. All that remains is to put the data in the grid. You already have the data methods in the Data/Services tab. Select the method whose output you want to see in the grid. Just drag and drop this method on the grid.</p>
<p><img class="aligncenter size-full wp-image-76" title="8" src="http://prashants.files.wordpress.com/2009/10/81.jpg?w=477" alt="8"   /></p>
<p>You see that the grid changes to the return value of the method. In my case it looked like this</p>
<p><img class="aligncenter size-full wp-image-77" title="9" src="http://prashants.files.wordpress.com/2009/10/91.jpg?w=477&#038;h=75" alt="9" width="477" height="75" /></p>
<p>Only thing remaining is to run the project. Press CTRL+F11 to run it.</p>
<p><img class="aligncenter size-full wp-image-78" title="10" src="http://prashants.files.wordpress.com/2009/10/102.jpg?w=477&#038;h=121" alt="10" width="477" height="121" /></p>
<p>Reviewing once …</p>
<p>User creates the database, populates it, writes a data service (dataService) to fetch the data. This completes the backend work. User exposes the service as a WSDL descriptor. User creates a flex project and links to the WSDL descriptor to get access to his functions on Client.</p>
<p>PS: User has not written a line of code on the Frontend J</p>
<p><em><span style="text-decoration:underline;">QandA</span></em></p>
<p>User: Where can I get to know more about WSDL’s and web services?</p>
<p>Editor: <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language">http://en.wikipedia.org/wiki/Web_Services_Description_Language</a> <a href="http://en.wikipedia.org/wiki/Web_service">http://en.wikipedia.org/wiki/Web_service</a></p>
<p>User: I am using Eclipse IDE to code in Java. Is there some way I can generate my WSDL directly?</p>
<p>Editor: The Latest Eclipse build which can be downloaded from <a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-jee-galileo-SR1-win32.zip">here</a> has a feature of generating the WSDL. But the generated WSDL is just a prototype and needs work. Check out eclipse documentation to find out more. You can also download and install the axis plugin for eclipse. This tool directly converts Java to WSDL. Download the plugin from <a href="http://ws.apache.org/axis2/download/1_5/download.cgi">here</a>. For installation instructions read <a href="http://ws.apache.org/axis2/0_94/CodegenTools-EclipsePlugin.html">this</a>.</p>
<p>User: Flash Builder beta 2 was recently launched. Where can I download it?</p>
<p>Editor: To download Flash Builder 4 beta2  go <a href="http://labs.adobe.com/technologies/flashbuilder4/">here</a>.</p>
<p>User: Any way I can know more about this product and its new features?</p>
<p>Editor:  Tim Buntel has a written an excellent article on what is new in this Beta. Here is the link: <a href="http://www.adobe.com/devnet/flex/articles/flashbuilder4_whatsnew.html">http://www.adobe.com/devnet/flex/articles/flashbuilder4_whatsnew.html</a></p>
<p>An aggregated list of articles on Flash Builder 4 was created by <a href="http://sujitreddyg.wordpress.com/">Sujit Reddy</a>. Here is the link: <a href="http://sujitreddyg.wordpress.com/flash-builder-4/">http://sujitreddyg.wordpress.com/flash-builder-4/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=59&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2009/10/14/exposing-java-project-as-web-service-to-flash-builder-4-using-data-centric-development-dcd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/xml12.jpg" medium="image">
			<media:title type="html">xml1</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/xml2.jpg" medium="image">
			<media:title type="html">xml2</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/13.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/21.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/31.jpg" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/43.jpg" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/51.jpg" medium="image">
			<media:title type="html">5</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/61.jpg" medium="image">
			<media:title type="html">6</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/72.jpg" medium="image">
			<media:title type="html">7</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/81.jpg" medium="image">
			<media:title type="html">8</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/91.jpg" medium="image">
			<media:title type="html">9</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/102.jpg" medium="image">
			<media:title type="html">10</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use Flash Builder 4 DB introspector with PHP</title>
		<link>http://prashants.wordpress.com/2009/10/06/how-to-use-flash-builder-4-db-introspector-with-php/</link>
		<comments>http://prashants.wordpress.com/2009/10/06/how-to-use-flash-builder-4-db-introspector-with-php/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:35:37 +0000</pubDate>
		<dc:creator>Prashant Singh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://prashants.wordpress.com/?p=3</guid>
		<description><![CDATA[How to use Flash Builder 4 DB introspector with PHP Content The second beta of Flash builder 4 is now available on Adobe labs. This new beta comes with the original goodness of the earlier versions and addition of many requested features. To see what’s new with this beta click here. Release notes can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=3&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to use Flash Builder 4 DB introspector with PHP</p>
<p>Content<br />
<a href="http://labs.adobe.com/technologies/flashbuilder4/">The second beta</a> of Flash builder 4 is now available on Adobe labs.  This new beta comes with the original goodness of the earlier versions and addition of many requested features. To see what’s new with this beta  <a href="http://www.adobe.com/devnet/flex/articles/flashbuilder4_whatsnew.html">click here</a>. Release notes can be viewed at <a href="http://labs.adobe.com/wiki/index.php/Flash_Builder_4:Release_Notes">http://labs.adobe.com/wiki/index.php/Flash_Builder_4:Release_Notes</a> One of the many features introduced in this beta is the<strong> Database introspector</strong>. It can be a drag sometimes to write basic read and update methods and classes for each and every table in a database. This is where the Database introspector of Flash builder 4 will become very handy. A developer can use this feature to generate a sample code in PHP or ColdFusion for basic CRUD operations simply by pointing to the database from Flash builder project. <strong>This post</strong> contains details for generating PHP<strong> </strong>code. Here is a step by step for how to invoke the database introspector</p>
<h3><em><span style="text-decoration:underline;">Create the database and tables</span></em></h3>
<p>I am using the following commands in mysql to create two tables, User, User_profile in the database “<strong>testdb</strong>”.<br />
<code><br />
DROP TABLE IF EXISTS `testdb`.`user`;<br />
CREATE TABLE  `testdb`.`user` (<br />
`ID` int(10) unsigned NOT NULL auto_increment,<br />
`FIRST_NAME` varchar(100) default NULL,<br />
`LAST_NAME` varchar(100) default NULL,<br />
`DISPLAY_NAME` varchar(250) default NULL,<br />
`COMPANY_ID` varchar(100) default NULL,<br />
`LOGIN_ID` varchar(250) NOT NULL default '',<br />
`LOGIN_PASSWORD` varchar(45) NOT NULL default '',<br />
`DEPARTMENT` varchar(100) default NULL,<br />
PRIMARY KEY  (`ID`)<br />
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;<br />
</code></p>
<p><code><br />
DROP TABLE IF EXISTS `testdb`.`user_profile`;<br />
CREATE TABLE  `testdb`.`user_profile` (<br />
`ID` int(10) unsigned NOT NULL auto_increment,<br />
`USER_ID` int(10) unsigned NOT NULL default '0',<br />
`BLOG_URL` varchar(300) default NULL,<br />
`DESCRIPTION` varchar(300) default NULL,<br />
`TWITTER_URL` varchar(300) default NULL,<br />
PRIMARY KEY  (`ID`),<br />
CONSTRAINT `FK_COURSE_USAGE_USER` FOREIGN KEY (`USER_ID`) REFERENCES `user` (`ID`)<br />
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;<br />
</code><br />
Execute these commands in Mysql and you will have your tables.  The next step obviously is to create client code. You start by creating a flex project.</p>
<h3><em><span style="text-decoration:underline;">Create the flex project</span></em></h3>
<p>Start  Flash builder 4. Go to <strong>File</strong> menu  select <strong>New</strong> and then select <strong>Flex Project</strong>.  A window appears with options to fill up the project details. <a href="http://prashants.files.wordpress.com/2009/10/12.jpg"><img class="aligncenter size-full wp-image-9" title="1" src="http://prashants.files.wordpress.com/2009/10/12.jpg?w=477" alt="1"   /></a></p>
<ul>
<li>Give an appropriate name to the project (here I gave it the name testIntrospector)</li>
<li>Change the application server type to PHP.</li>
<li>Let other options keep their default value</li>
</ul>
<p><a href="http://prashants.files.wordpress.com/2009/10/2.jpg"> <img class="aligncenter size-full wp-image-12" title="2" src="http://prashants.files.wordpress.com/2009/10/2.jpg?w=477" alt="2"   /> </a></p>
<p>Click on next and you see options to fill in the server details.</p>
<ul>
<li>Web root: Specify the root folder of your web server (in my case it was C:\Program Files\Apache Software Foundation\Apache2.2\htdocs)</li>
<li>Next specify the root URL as appropriate (I entered -&gt; <a href="http://localhost:8080/">http://localhost:8080</a>)</li>
<li>Now click on validate configuration. In case there is an error in accessing the data server, it will be shown. Otherwise Flash builder tells you that the root folder and URL are valid.</li>
</ul>
<p>The output folder can be changed according to your need. I am kept the default value <a href="http://prashants.files.wordpress.com/2009/10/3.jpg"> <img class="aligncenter size-thumbnail wp-image-13" title="3" src="http://prashants.files.wordpress.com/2009/10/3.jpg?w=450&#038;h=300" alt="3" width="450" height="300" /> </a> Click on next -&gt; finish to be done with the project completion. What next? Now you need a PHP service that can read and edit the database</p>
<h3><em><span style="text-decoration:underline;">Generate the Service</span></em></h3>
<p>Click on the <strong>Data/Services</strong> tab in the bottom frame. <a href="http://prashants.files.wordpress.com/2009/10/42.jpg"> <img class="aligncenter size-thumbnail wp-image-17" title="4" src="http://prashants.files.wordpress.com/2009/10/42.jpg?w=450&#038;h=300" alt="4" width="450" height="300" /> </a> This tab shows a link which says “Connect to Data/Service”. Click on this link to see this window <a href="http://prashants.files.wordpress.com/2009/10/5.jpg"> <img class="aligncenter size-thumbnail wp-image-18" title="5" src="http://prashants.files.wordpress.com/2009/10/5.jpg?w=300&#038;h=350" alt="5" width="300" height="350" /> </a> Here select PHP as your service type and click on next. The same can be done by going to <strong>Data </strong> in the tool bar and selecting  <strong>Connect to PHP</strong>. You will be taken to a window where you need to fill in details about the service. The next step is to generate the PHP Code based on our Database Table. <a href="http://prashants.files.wordpress.com/2009/10/6.jpg"> <img class="aligncenter size-thumbnail wp-image-19" title="6" src="http://prashants.files.wordpress.com/2009/10/6.jpg?w=300&#038;h=350" alt="6" width="300" height="350" /></a></p>
<h3><em><span style="text-decoration:underline;">Generating PHP Code based on a Database Table </span></em></h3>
<h3><em><span style="text-decoration:underline;"> </span></em><span style="text-decoration:underline;"> </span></h3>
<p>Here is how you do that. Click on the link which says “click here to generate a sample”. <a href="http://prashants.files.wordpress.com/2009/10/7.jpg"> <img class="aligncenter size-thumbnail wp-image-20" title="7" src="http://prashants.files.wordpress.com/2009/10/7.jpg?w=300&#038;h=350" alt="7" width="300" height="350" /> </a> It opens a window where you can enter details about the database you want to connect to. You would be required to enter the following details about the database:</p>
<ul>
<li>Username – Enter   the username having all privileges over the table you want to generate the service for (I entered root)</li>
<li>Password – Enter the password for that user.</li>
<li>Host name and port– Give the name of the host where the database is and the port on which it can be accessed(localhost,3306 in my case)</li>
<li>Finally enter the name of the database</li>
</ul>
<p>Click on the “Connect to Database” button. If all details have been correctly entered all tables from the entered database will be now visible in Table comboBox like this.. <a href="http://prashants.files.wordpress.com/2009/10/8.jpg"> <img class="aligncenter size-thumbnail wp-image-21" title="8" src="http://prashants.files.wordpress.com/2009/10/8.jpg?w=300&#038;h=350" alt="8" width="300" height="350" /> </a></p>
<p>Select the table (I select the User table from our database testdb ) for which you require the  CRUD methods and click on OK. You can also select the location where this sample PHP service is created. I have used the default location. Once you click OK Flash builder might show you a warning that the service generated is intended for a trusted environment.  The code generated will allow anyone with network access to your server to be able to select, insert, update or delete information from this table. The code should be reviewed before it&#8217;s used for production purposes. If you go ahead and press Ok and finish with the default values of the Service name and Service package, the introspector generates a Sample PHP and opens it for you to view and edit. Here is a code snippet of what was generated for me for the table testdb.User</p>
<p><code><br />
public function getAllUser()<br />
{<br />
$stmt = mysqli_prepare($this-&gt;connection, "SELECT * FROM $this-&gt;tablename");<br />
$this-&gt;throwExceptionOnError();<br />
mysqli_stmt_execute($stmt);<br />
$this-&gt;throwExceptionOnError();<br />
$rows = array();<br />
mysqli_stmt_bind_result($stmt, $row-&gt;ID, $row-&gt;FIRST_NAME, $row-&gt;LAST_NAME, $row-&gt;DISPLAY_NAME, $row-&gt;COMPANY_ID, $row-&gt;LOGIN_ID, $row-&gt;LOGIN_PASSWORD, $row-&gt;DEPARTMENT);<br />
while (mysqli_stmt_fetch($stmt))<br />
{<br />
$rows[] = $row;<br />
$row = new stdClass();<br />
mysqli_stmt_bind_result($stmt, $row-&gt;ID, $row-&gt;FIRST_NAME, $row-&gt;LAST_NAME, $row-&gt;DISPLAY_NAME, $row-&gt;COMPANY_ID, $row-&gt;LOGIN_ID, $row-&gt;LOGIN_PASSWORD, $row-&gt;DEPARTMENT);<br />
}<br />
mysqli_stmt_free_result($stmt);<br />
mysqli_close($this-&gt;connection);<br />
return $rows;<br />
}<br />
</code></p>
<p>This method gets all users present in the user table. Now that you have your service to get you data from the database, you just need to display it. Go to Flash builder design view and drag and drop a DataGrid on the application. This done you have to decide what to display in this grid. In this case let us say you want this grid to display all users. To get the DataGrid to show all users drag and drop the above method getAllUser from the Data/Services tab on the DataGrid <a href="http://prashants.files.wordpress.com/2009/10/9.jpg"> <img class="aligncenter size-thumbnail wp-image-22" title="9" src="http://prashants.files.wordpress.com/2009/10/9.jpg?w=450&#038;h=300" alt="9" width="450" height="300" /> </a> When you drop the method on the grid it the grid adapts to the return value of the function and looks something like this now.<a href="http://prashants.files.wordpress.com/2009/10/101.jpg"><img class="aligncenter size-thumbnail wp-image-36" title="10" src="http://prashants.files.wordpress.com/2009/10/101.jpg?w=450&#038;h=131" alt="10" width="450" height="131" /></a> If you now run the project with data in the database, this is what you see.<a href="http://prashants.files.wordpress.com/2009/10/111.jpg"><img class="aligncenter size-thumbnail wp-image-37" title="11" src="http://prashants.files.wordpress.com/2009/10/111.jpg?w=450&#038;h=100" alt="11" width="450" height="100" /></a> You have created an application which reads from a <strong>Mysql</strong> database through a <strong>PHP</strong> service and displays the data on a <strong>Flex</strong> DataGrid and you have not written one line of code. Feels like magic? It is <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  More on Flash Builder 4 can be seen at <a href="http://sujitreddyg.wordpress.com/flash-builder-4/" target="_blank">http://sujitreddyg.wordpress.com/flash-builder-4/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/prashants.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/prashants.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/prashants.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=prashants.wordpress.com&amp;blog=9718827&amp;post=3&amp;subd=prashants&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://prashants.wordpress.com/2009/10/06/how-to-use-flash-builder-4-db-introspector-with-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/dd425ca6b57bfbcc87a589d81ed851f8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">prkumar</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/12.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/2.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/3.jpg?w=150" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/42.jpg?w=150" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/5.jpg?w=150" medium="image">
			<media:title type="html">5</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/6.jpg?w=149" medium="image">
			<media:title type="html">6</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/7.jpg?w=149" medium="image">
			<media:title type="html">7</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/8.jpg?w=149" medium="image">
			<media:title type="html">8</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/9.jpg?w=150" medium="image">
			<media:title type="html">9</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/101.jpg?w=150" medium="image">
			<media:title type="html">10</media:title>
		</media:content>

		<media:content url="http://prashants.files.wordpress.com/2009/10/111.jpg?w=150" medium="image">
			<media:title type="html">11</media:title>
		</media:content>
	</item>
	</channel>
</rss>
