<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>prayank.mxml</title>
	<link>http://www.prayank.net/flexblog</link>
	<description>My experiments with Flex</description>
	<pubDate>Mon, 25 Aug 2008 02:57:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Working with DATE column in SQLite</title>
		<link>http://www.prayank.net/flexblog/index.php/2008/08/25/working-with-date-column-in-sqlite/</link>
		<comments>http://www.prayank.net/flexblog/index.php/2008/08/25/working-with-date-column-in-sqlite/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 02:57:40 +0000</pubDate>
		<dc:creator>prayank</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.prayank.net/flexblog/index.php/2008/08/25/working-with-date-column-in-sqlite/</guid>
		<description><![CDATA[I always wanted to have a good personal diary application, but the freeware applications available do not satisfy my requirements. So I decided to write my own using AIR. 
However, I haven&#8217;t really worked that much with DATE columns in SQLite. And had some problems in inserting dates and retrieving them from the db. So [...]]]></description>
			<content:encoded><![CDATA[<p>I always wanted to have a good personal diary application, but the freeware applications available do not satisfy my requirements. So I decided to write my own using AIR. </p>
<p>However, I haven&#8217;t really worked that much with DATE columns in SQLite. And had some problems in inserting dates and retrieving them from the db. So I want to share my research and solutions here. </p>
<p>This is the crucial extract from the documentation: </p>
<blockquote><p><strong>Explicit data typing</strong> </p>
<p>Parameters are used to allow for typed substitution of values that are unknown at the time the SQL statement is constructed. The use of parameters is the only way to guarantee the storage class for a value passed in to the database. When parameters are not used, the runtime attempts to convert all values from their text representation to a storage class based on the associated column&#8217;s type affinity.</p>
</blockquote>
<p><font color="#666666">What this means?</font></p>
<p><font color="#666666">Supposed you have a SQL table which has a &quot;DATE&quot; column, then the right way to insert data is to use parameter substitution SQL prepared statements. </font></p>
<blockquote><p><strong>Correct way</strong></p>
<p>var sql:String =     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;INSERT INTO entries (entryText, entryDate, summary,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; entryMood)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VALUES ( :entryText, :entryDate, :summary,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; :entryMood)&quot;; </p>
<p>insertStmt.text = sql;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />insertStmt.parameters[&quot;:entryText&quot;] = inputTxt.text ;      <br />insertStmt.parameters[&quot;:entryDate&quot;] = inputDate.selectedDate;      <br />insertStmt.parameters[&quot;:summary&quot;] = inputSummary.text;      <br />insertStmt.parameters[&quot;:entryMood&quot;] = &#8216;happy&#8217;; </p>
</blockquote>
<p>In the above code, &quot;inputDate&quot; is a DateField. Since we are using parameter passing, the Date ActionScript object is not converted to text which preserves the data. If we did not use parameters then the date will be translated into SQL TEXT type and this will be incorrect. So the following is the incorrect way of doing things. </p>
<blockquote><p><font color="#555555"><strong>Incorrect way</strong></font></p>
<p><font color="#555555">var sql:String =        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;INSERT INTO entries (entryText, entryDate, summary,         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; entryMood)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; VALUES( &#8216; +        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; + input.text + &quot;&#8217;,&quot; +        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; + inputDate.selectedDate        <br />&#8230;</font></p>
</blockquote>
<p>You can also probably use another variation: </p>
<ol>
<li>Set the data type of the date column in the SQL table to TEXT</li>
<li>Convert dates to string before inserting them into SQLite, by using the DateField.dateToString() function.</li>
<li>You can retrieve the date strings from the database and then use the DateField.stringToDate() to convert strings into date objects.</li>
<li>Take care that the format strings in step 2 and 3 should be same. </li>
</ol>
<p>Also, note that using this method does not preserve the &quot;time&quot; in the date. Hope this helps. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.prayank.net/flexblog/index.php/2008/08/25/working-with-date-column-in-sqlite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Data synchronization patterns in Flex applications</title>
		<link>http://www.prayank.net/flexblog/index.php/2008/05/28/data-synchronization-patterns-in-flex-applications/</link>
		<comments>http://www.prayank.net/flexblog/index.php/2008/05/28/data-synchronization-patterns-in-flex-applications/#comments</comments>
		<pubDate>Wed, 28 May 2008 03:54:38 +0000</pubDate>
		<dc:creator>prayank</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.prayank.net/flexblog/index.php/2008/05/28/data-synchronization-patterns-in-flex-applications/</guid>
		<description><![CDATA[&#160;
Presentation slides: here    Demo source code: here&#160;&#160; 
I recently spoke at the Webmaniacs conference in Washington DC. 
I spoke about &#34;Client/server data synchronization patterns in occasionally connected clients&#34;. I&#8217;m uploading the demo files and the ppt files here. 
The first part of the talk is pretty general, and I think you can [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Presentation slides: <a href="http://www.prayank.net/flexblog/wp-content/uploads/2008/05/data_synchronization_patterns.zip">here</a>    <br />Demo source code: <a href="http://www.prayank.net/flexblog/wp-content/uploads/2008/05/data-synchronization-in-occasionally-connected-clients-draft.pdf">here</a>&#160;&#160; </p>
<p>I recently spoke at the <a href="http://webmaniacsconference.com/">Webmaniacs</a> conference in Washington DC. </p>
<p>I spoke about &quot;Client/server data synchronization patterns in occasionally connected clients&quot;. I&#8217;m uploading the demo files and the ppt files here. </p>
<p>The first part of the talk is pretty general, and I think you can apply it to any kind of occasionally connected client - you may be building it with AIR + LCDS, Flex + LCDS or with AJAX toolkits e.g. Google Gears. The latter half of the ppt &amp; the demo - showcase the features of LiveCycle Data Services (LCDS) that allow users using Flex/AIR to build such apps. It talks about conflict resolution, transactions, batch updates (TODO). </p>
<p>An occasionally connected clients is a software that functions in the same manner while disconnected from the network, as while connected - only with certain restrictions on transactional functionality - the idea is that the user should be least discomforted by disconnections to the network. </p>
<p>I just wanted to get this demo out, it is not polished and some things are not working really but I will keep updating the demo and commenting the source code to make it easier to understand. I&#8217;m not using any MVC patterns to avoid adding any complexity to the code. So it is pretty bare bones.</p>
<p>Steps to compile the application: </p>
<ol>
<li>The application uses LCDS 2.6 beta (<a href="http://labs.adobe.com/technologies/livecycle_dataservices2_6/">available from Adobe Labs</a>) </li>
<li>The application is compiled as a Flex project using Flex Builder 3. (You dont need the project to be a LCDS project, a simple Flex project will do. I create all connections to LCDS server on the fly.) </li>
<li>If you want you can extend it to be an AIR application as well. </li>
<li>The application will run as a simple drop-in to LCDS. </li>
</ol>
<p>Steps to run the application:</p>
<ol>
<li>You can see various usecases by running the application. </li>
<li>You will need to run at least two clients at the same time. </li>
<li>The clients start disconnected from the server. </li>
<li>Click on connect, and then fetch data to get the data in the clients. </li>
<li>You can then start playing around with various controls to see how things change. </li>
</ol>
<p>TODO: I need to put a video demo to show the various functionality. </p>
<p>I will write a more thorough discussion on the topic in a couple of weeks. </p>
<p> <a href="http://creativecommons.org/licenses/by/2.5/in/" rel="license"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" alt="Creative Commons License" src="http://i.creativecommons.org/l/by/2.5/in/88x31.png" /></a>  <br />This <span rel="dc:type" href="http://purl.org/dc/dcmitype/Text" xmlns:dc="http://purl.org/dc/elements/1.1/">work</span> is licensed under a <a href="http://creativecommons.org/licenses/by/2.5/in/" rel="license">Creative Commons Attribution 2.5 India License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prayank.net/flexblog/index.php/2008/05/28/data-synchronization-patterns-in-flex-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adobe launches Creative Suite 4 betas</title>
		<link>http://www.prayank.net/flexblog/index.php/2008/05/28/adobe-launches-creative-suite-4-betas/</link>
		<comments>http://www.prayank.net/flexblog/index.php/2008/05/28/adobe-launches-creative-suite-4-betas/#comments</comments>
		<pubDate>Wed, 28 May 2008 03:19:16 +0000</pubDate>
		<dc:creator>prayank</dc:creator>
		
		<category><![CDATA[Adobe Announcements]]></category>

		<guid isPermaLink="false">http://www.prayank.net/flexblog/index.php/2008/05/28/adobe-launches-creative-suite-4-betas/</guid>
		<description><![CDATA[This is a tad late, but this is the most exciting news since launch of AIR 1.0 and Flex 3.0. 
Adobe Creative Suite public betas are the next version of the next release of its collection of graphic design, Web development and video editing applications. The public beta versions of Adobe Dreamweaver&#174; CS4, Adobe Fireworks&#174; [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tad late, but this is the most exciting news since launch of AIR 1.0 and Flex 3.0. </p>
<p>Adobe Creative Suite public betas are the next version of the next release of its collection of graphic design, Web development and video editing applications. The public beta versions of Adobe Dreamweaver&#174; CS4, Adobe Fireworks&#174; CS4 and Adobe Soundbooth&#174; CS4 will be free downloads on Adobe labs. Try betas for <a href="http://labs.adobe.com/technologies/dreamweavercs4/">Dreamweaver CS4</a>, <a href="http://labs.adobe.com/technologies/fireworkscs4/">Fireworks CS4</a>, and <a href="http://labs.adobe.com/technologies/soundboothcs4/">Soundbooth CS4</a>&#160; and see how the right web tools increase productivity and help our creative professionals create rich, relevant web experiences.</p>
<p><a href="http://labs.adobe.com/technologies/dreamweavercs4/"><img src="http://labs.adobe.com/technologies/dreamweavercs4/images/dreamweavercs4_225x50.jpg" /></a> </p>
<p><a href="http://labs.adobe.com/technologies/fireworkscs4/"><img src="http://labs.adobe.com/technologies/fireworkscs4/images/fireworkscs4_225x50.jpg" /></a></p>
<p><a href="http://labs.adobe.com/technologies/soundboothcs4/"><img src="http://labs.adobe.com/technologies/soundboothcs4/images/soundboothcs4_225x50.jpg" /></a>&#160; </p>
<p>Try out the betas, and get a chance to peek into the future.</p>
<p>Plus, you can also give a holler on enhancements and issues to the dev team. How cool is that? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.prayank.net/flexblog/index.php/2008/05/28/adobe-launches-creative-suite-4-betas/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flex becomes cheaper by $250!</title>
		<link>http://www.prayank.net/flexblog/index.php/2007/10/24/flex-becomes-cheaper-starting-1st-november/</link>
		<comments>http://www.prayank.net/flexblog/index.php/2007/10/24/flex-becomes-cheaper-starting-1st-november/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 00:18:20 +0000</pubDate>
		<dc:creator>prayank</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[Flex Events]]></category>

		<category><![CDATA[MAX2007]]></category>

		<category><![CDATA[Flex 3]]></category>

		<guid isPermaLink="false">http://www.prayank.net/flexblog/index.php/2007/10/03/flex-becomes-cheaper-starting-1st-november/</guid>
		<description><![CDATA[A new pricing was announced for Flex Builder 2 which becomes effective 1st November. Flex Builder 2 without charting currently costs $499.99 at Amazon, its new price starting 1st November 2007 will be $249.99 (that is gonna be a saving of $250!!! ) yoo hoo!
Flex Builder 2 with Charting will become $100 cheaper to $699, [...]]]></description>
			<content:encoded><![CDATA[<p>A new pricing was announced for Flex Builder 2 which becomes effective 1st November. Flex Builder 2 without charting currently costs <a href="http://www.amazon.com/Adobe-Flex-Builder-1-User/dp/B000GT9WHW/ref=sr_1_13/104-1278395-6299131?ie=UTF8&#038;s=software&#038;qid=1191370641&#038;sr=8-13">$499.99 at Amazon</a>, its new price starting 1st November 2007 will be $249.99 (that is gonna be a saving of $250!!! ) yoo hoo!<br />
Flex Builder 2 with Charting will become $100 cheaper to $699, rather than the $799 sold now.</p>
<p>Besides if you buy a support plan for Flex 2 - which costs $99. Then you will get a free upgrade for Flex Builder 3, whenever it comes out. </p>
<p>Flex Builder 3 will be sold in two versions - Standard ($250) and Professional ($700). The Professional version will contain Charting, Advanced Data Grid and other advanced visualization stuff. </p>
<p><strong>Update on upgrade pricing:</strong></p>
<p>    * Flex Builder 2 to Flex Builder 3 Standard Upgrade - $99 US<br />
    * Flex Builder 2 with Charting to Flex Builder 3 Professional Upgrade - $299 US<br />
    * Trade-up from FB Standard to FB Professional - $499 US</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prayank.net/flexblog/index.php/2007/10/24/flex-becomes-cheaper-starting-1st-november/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FlexBuilder for Linux! - Wooo Hooo!</title>
		<link>http://www.prayank.net/flexblog/index.php/2007/10/03/flexbuilder-for-linux-wooo-hooo/</link>
		<comments>http://www.prayank.net/flexblog/index.php/2007/10/03/flexbuilder-for-linux-wooo-hooo/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 00:09:26 +0000</pubDate>
		<dc:creator>prayank</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<category><![CDATA[MAX2007]]></category>

		<guid isPermaLink="false">http://www.prayank.net/flexblog/index.php/2007/10/03/flexbuilder-for-linux-wooo-hooo/</guid>
		<description><![CDATA[Today (Day 2 of Adobe MAX 2007) FlexBuilder for Linux was announced! Woot! Woot! You can download it from: http://labs.adobe.com/technologies/flex/flexbuilder_linux/
Though its an Alpha version, it is still a great news for a Linux lover like-me! too cool!
It is a stripped down version of FlexBuilder for Windows and Mac. But it will get there I guess.
This [...]]]></description>
			<content:encoded><![CDATA[<p>Today (Day 2 of Adobe MAX 2007) FlexBuilder for Linux was announced! Woot! Woot! You can download it from: <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/">http://labs.adobe.com/technologies/flex/flexbuilder_linux/</a></p>
<p>Though its an Alpha version, it is still a great news for a Linux lover like-me! too cool!</p>
<p>It is a stripped down version of FlexBuilder for Windows and Mac. But it will get there I guess.<br />
This release of Flex Builder Linux requires Sun JRE 1.5.x and Eclipse 3.3 and supports the following distributions:</p>
<p>    * SuSE Linux Enterprise Server 10 (x86 32-bit version)<br />
    * RedHat Enterprise Linux WS 4 (x86 32-bit version)<br />
    * Ubuntu 7.0.4 (Feisty) (x86 32-bit version)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prayank.net/flexblog/index.php/2007/10/03/flexbuilder-for-linux-wooo-hooo/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
