<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Words, punctuated &#187; Projects</title>
	<atom:link href="http://probertson.com/articles/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://probertson.com</link>
	<description>Thoughts on web development, user-centered design, code, etc. by Paul Robertson</description>
	<lastBuildDate>Tue, 20 Jul 2010 21:29:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Data &#8220;paging&#8221; in AIR SQLite</title>
		<link>http://probertson.com/articles/2010/04/07/data-paging-in-air-sqlite/</link>
		<comments>http://probertson.com/articles/2010/04/07/data-paging-in-air-sqlite/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 19:25:10 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=435</guid>
		<description><![CDATA[I got an interesting question a few days ago that I thought I&#8217;d share:
My application has thousands of records in one particular table that I need to populate the display with. I was wondering if I can implement paging to speed up the retrieval of those records?
In fact he specifically wanted to know if it [...]]]></description>
			<content:encoded><![CDATA[<p>I got an interesting question a few days ago that I thought I&#8217;d share:</p>
<blockquote><p>My application has thousands of records in one particular table that I need to populate the display with. I was wondering if I can implement paging to speed up the retrieval of those records?</p></blockquote>
<p class="editornote">In fact he specifically wanted to know if it was possible to do data paging with the SQLRunner class in my <a href="/projects/air-sqlite/">air-sqlite library</a>. The answer is yes it works, without even needing any changes to the library. See below for how to do that.</p>
<p>The easiest way to implement data paging (in other words, getting only a subset of a query&#8217;s results at a time) in a <code>SELECT</code> statement is to use the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/localDatabaseSQLSupport.html#select"><code>LIMIT..OFFSET</code> clause</a> in the <code>SELECT</code> statement.</p>
<p>In summary, you can put a <code>LIMIT</code> clause at the end of a <code>SELECT</code> statement and the result set will only include the specified number of rows:</p>
<pre class="brush:sql">SELECT * FROM myTable
LIMIT 3</pre>
<p>Then to get the next 3 rows, you add an <code>OFFSET</code> value:</p>
<pre class="brush:sql">SELECT * FROM myTable
LIMIT 3 OFFSET 3</pre>
<p>Fortunately, you can use statement parameters for the LIMIT and OFFSET values (although the docs don&#8217;t mention this &#8212; shame on me!):</p>
<pre class="brush:sql">SELECT * FROM myTable
LIMIT :limit OFFSET :offset</pre>
<p>Then you just specify values for those parameters and you&#8217;re good to go.</p>
<p>I tested this using the SQLRunner class by adding a <a href="http://github.com/probertson/air-sqlite/blob/master/tests/tests/com/probertson/data/SQLRunnerExecute.as">new set of unit tests</a> and it worked just fine without any changes to the library. (Hooray for unit tests and FlexUnit support in Flash Builder 4 &#8212; they made it nice and easy to test this out since I already had the infrastructure in place.)</p>
<p>Here is <a href="http://github.com/probertson/air-sqlite/blob/master/tests/sql/LoadRowsParameterizedLimitOffset.sql">the SQL statement I used for the unit test</a> using <code>LIMIT..OFFSET</code> with parameters:</p>
<pre class="brush:sql">SELECT colString,
colInt
FROM main.testTable
LIMIT :limit OFFSET :offset</pre>
<p>And here is <a href="http://github.com/probertson/air-sqlite/blob/master/tests/tests/com/probertson/data/SQLRunnerExecute.as#L125">the line of code that calls the statement</a> (modified slightly for readability). <code>test_result</code> is the result handler function. The parameters object specifies that I want 7 result rows, starting with row number 3 (i.e. skipping 2):</p>
<pre class="brush:actionscript3">_sqlRunner.execute(SQL, {limit:7, offset:2}, test_result);</pre>
<p class="editornote">As <a href="#comment-74422">Peter points out in the comments</a>, another approach to do something similar to data paging with AIR is to specify a number of rows to retrieve as the first argument to the <code>SQLStatement.execute()</code> method, then call the <code>SQLStatement.next()</code> method to retrieve additional rows from the same statement. This technique is <a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7d4c.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7d46">described in the documentation</a> so I won&#8217;t go into more detail about it here except to say that it does have a couple of drawbacks (mentioned in my comment below) that make it less suitable for data paging (but still very useful).</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/04/07/data-paging-in-air-sqlite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AIR SQLite library updates</title>
		<link>http://probertson.com/articles/2010/04/02/air-sqlite-library-updates/</link>
		<comments>http://probertson.com/articles/2010/04/02/air-sqlite-library-updates/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 09:18:14 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=432</guid>
		<description><![CDATA[A couple of people have reported a bug in my AIR SQLite utility library. I also recently used it to help build a Robotlegs demo app for the 360&#124;Flex Robotlegs training, and in the process I discovered a missing feature I needed (namely, the ability to get back the SQLResult objects after running a batch [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of people have reported a <a href="http://github.com/probertson/air-sqlite/issues/closed/#issue/1">bug</a> in my <a href="/projects/air-sqlite/">AIR SQLite utility library</a>. I also recently used it to help build a Robotlegs demo app for the 360|Flex Robotlegs training, and in the process I discovered a missing feature I needed (namely, the ability to get back the SQLResult objects after running a batch of statements using <code>SQLRunner.executeModify()</code>).</p>
<p><strong>Warning!</strong> To add the missing feature I had to introduce a non-backwards-compatible api change. Read the details in the <a href="/projects/air-sqlite/#history">project history</a>.</p>
<p>So, the bug is <a href="http://github.com/probertson/air-sqlite/commit/09f2e5cd8ea2c854e5a28475a0fd19f12526e44b">fixed</a>, the feature is <a href="http://github.com/probertson/air-sqlite/commit/27fbeab18a2e8bc1bff194cbc669e9e64c5dd822">added</a>, the version number is incremented (0.1.1 beta), and the <a href="http://github.com/probertson/air-sqlite">code</a> and <a href="http://github.com/probertson/air-sqlite/downloads">SWC</a> are live on Github.</p>
<p><a href="http://github.com/probertson/air-sqlite/downloads">Download the version 0.1.1 SWC</a></p>
<p><a href="/projects/air-sqlite/#history">Read about the changes</a></p>
<p>In conjunction with the release I also added a couple of new examples to the <a href="/projects/air-sqlite/">project page</a>, including a <a href="/projects/air-sqlite/#shortexamples">&#8220;bare bones&#8221; code only example</a> for quick starters, and links to an <a href="/projects/air-sqlite/#robotlegsexamples">example of using the library in a Robotlegs application</a> (the example app from the 360|Flex training).</p>
<p>Enjoy, and as always feel free to report problems as <a href="http://github.com/probertson/air-sqlite/issues">issues in Github</a> or in the <a href="/projects/air-sqlite/#respond">comments on the project page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/04/02/air-sqlite-library-updates/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New project: AIR SQLite utilities</title>
		<link>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/</link>
		<comments>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:44:55 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=367</guid>
		<description><![CDATA[I&#8217;m excited to announce that I&#8217;m &#8220;officially&#8221; releasing a new open-source project that I&#8217;ve been using on personal and work projects for over a year.
For lack of a better name, I call it my &#8220;AIR SQLite utility library&#8221;
The code currently contains one major piece of functionality (well, two different variations on one bit of functionality), [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited to announce that I&#8217;m &#8220;officially&#8221; releasing a new open-source project that I&#8217;ve been using on personal and work projects for over a year.</p>
<p>For lack of a better name, I call it my &#8220;<a href="/projects/air-sqlite/">AIR SQLite utility library</a>&#8221;</p>
<p>The code currently contains one major piece of functionality (well, two different variations on one bit of functionality), which is a SQL &#8220;query runner&#8221; library. This is a wrapper for the AIR SQL classes that allows you to run a SQL statement by just passing a few bits of information:</p>
<ul>
<li>The text of the SQL statement itself</li>
<li>An object containing properties with the values for any statement parameters in the SQL</li>
<li>A Function to call when the operation completes</li>
<li>A failure Function</li>
<li>(optionally) a class to use as the data type for the data returned from a <code>SELECT</code> statement</li>
</ul>
<p>The library does all the work of creating SQLStatement objects and caching prepared queries, as well as pooling SQLConnection instances so you can execute multiple statements simultaneously. It also has a variation that allows you to specify a &#8220;batch&#8221; of statements to execute, and they are executed in order in a transaction.</p>
<p>I&#8217;ve also got an additional utility to add to the library. It&#8217;s a &#8220;database copy&#8221; utility that allows you to create a &#8220;deep copy&#8221; of a database &#8212; all it&#8217;s tables, views, etc. &#8212; with or without data. The key reason why this is useful is that you can use it to create an encrypted database from an unencrypted database (and vice-versa). It&#8217;s written and tested, but I decided to modify the structure slightly before releasing it, so it&#8217;s not checked in yet.</p>
<p>I&#8217;ve put the details about how it works and why it&#8217;s designed that way in <a href="/projects/air-sqlite/">the project page</a>. In case you&#8217;ve ever wondered how I design apps, I think the examples and this library give some insight into how I actually do my database-driven AIR app development. At least, how I structure the data-access part of my apps.</p>
<p>On (another) personal note, this project is also my first project that I&#8217;ve posted to <a href="http://github.com/probertson">my Github repository</a> (as opposed to projects I&#8217;ve forked). It was actually posted-but-not-advertised on Google code for a month or so, but I decided to move to Github because the collaboration and checkin-without-network-connection features are so awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/02/03/new-project-air-sqlite-utilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new (old) tool for AIR SQLite development</title>
		<link>http://probertson.com/articles/2009/04/22/a-new-old-tool-for-air-sqlite-development/</link>
		<comments>http://probertson.com/articles/2009/04/22/a-new-old-tool-for-air-sqlite-development/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:41:33 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=272</guid>
		<description><![CDATA[This is pretty much old news by internet time standards, but I haven&#8217;t had time to write about it until now. (We&#8217;re working hard to make future Flex/AIR/ActionScript/Flash documentation more focused on how you actually use documentation, better than ever before.)
A couple of years ago, before AIR beta 1 (&#8220;Apollo&#8221;), I wrote a tool for [...]]]></description>
			<content:encoded><![CDATA[<p>This is pretty much old news by internet time standards, but I haven&#8217;t had time to write about it until now. (We&#8217;re working hard to make future Flex/AIR/ActionScript/Flash documentation more focused on how you actually use documentation, better than ever before.)</p>
<p>A couple of years ago, before AIR beta 1 (&#8220;Apollo&#8221;), I wrote a tool for testing SQL statements in AIR. Later (I can&#8217;t remember exactly when) I released it under the name &#8220;<a href="/projects/doppler-air-sql-admin-tool/">Doppler</a>.&#8221; I had plans to make it a full-fledged database management tool, but those plans never really panned out. I&#8217;ve told this story lots of times now, about how I now use (and even help develop) <a href="http://www.dehats.com/drupal/?q=node/58">David Deraedt’s “Lita” SQLite admin tool</a>.</p>
<p>However, &#8220;Doppler&#8221; in its current form served a different need than Lita &#8212; Lita is great for creating and managing database structure (you&#8217;ll never have to write a CREATE TABLE statement again), but it isn&#8217;t as strong for testing individual SQL statements. Over the past several months I&#8217;ve been doing some &#8220;serious&#8221; app development, working on an AIR app that makes heavy use of SQLite. I found my little tool to be quite handy, and also found and implemented a number of small improvements that make it much more useful.</p>
<p>Since my original intentions were never going to come to fruition, and I had new future plans for the app, I decided a new name was in order. Since it is for running SQL statements, &#8220;run&#8221; was an easy and obvious choice. So now, (several weeks after posting it), allow me to officially introduce you to the <a href="/projects/run-air-sqlite-query-testing-tool/">Run! AIR SQL query authoring and testing tool</a> &#8212; the next generation of Doppler.</p>
<p>If you look at the <a href="/projects/run-air-sqlite-query-testing-tool/#history">full feature list for the latest release</a>, you&#8217;ll see that I&#8217;ve added several types of changes. A few of the ones that I&#8217;ve found most useful in my day-to-day work are:</p>
<ul>
<li>Auto-update and badge install &#8212; no more downloading the .air file (admittedly not a big deal) and no more uninstall and reinstall each time there&#8217;s a new version (a big deal)</li>
<li>&#8220;Recent SQL files&#8221; and &#8220;Recent databases&#8221; menu items</li>
<li>Opening and saving SQL files (plus keyboard shortcuts)</li>
<li>&#8220;Row count&#8221; and &#8220;execution time&#8221; displayed for SELECT statements</li>
<li>Line numbers and auto-indent in the SQL panel</li>
</ul>
<p>And yes, I did say &#8220;day-to-day&#8221; work. On some days, Run! has been my primary IDE, as I&#8217;m writing and testing and rewriting large SQL statements. It&#8217;s been kind of strange and kind of fun building a developer tool and using it as much as I use Run!.</p>
<p>I&#8217;ve already gotten a bug report and I&#8217;m working on features for the next big release, so if you have thoughts or comments please comment on the project page!</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/04/22/a-new-old-tool-for-air-sqlite-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A useful tool, the joy of shipping code, and a great developer</title>
		<link>http://probertson.com/articles/2009/03/12/useful-tool-joy-of-shipping-code/</link>
		<comments>http://probertson.com/articles/2009/03/12/useful-tool-joy-of-shipping-code/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:23:09 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=240</guid>
		<description><![CDATA[If you use David Deraedt&#8217;s great AIR SQLite administration tool Lita, you probably already saw that he just pushed an update (v. 1.2) a few days ago. Aside from my general happiness from seeing that this release fixes some bugs and adds new features that were important to me, this release has personal significance for [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://www.dehats.com/">David Deraedt</a>&#8217;s great <a href="http://www.dehats.com/drupal/?q=node/58">AIR SQLite administration tool Lita</a>, you probably already saw that he just pushed an update (v. 1.2) a few days ago. Aside from my general happiness from seeing that this release fixes some bugs and adds new features that were important to me, this release has personal significance for me as well. As David <a href="http://www.dehats.com/drupal/?q=node/75">noted last week</a>, I have joined him as a contributor to the project. So in fact, some of those bug fixes and new features were done by me! I&#8217;ve discovered that there are few feelings greater than wanting a feature in a tool you use every day, and then actually implementing it. =) Upgrading is more fun when you see your own bugs in the release notes, too =)</p>
<p>As David pointed out, the fact that I&#8217;m an Adobe employee and am participating in the project doesn&#8217;t mean it&#8217;s now an official Adobe product (for good or bad). I&#8217;m doing this 100% on my own time. And my role is still pretty small &#8212; David is certainly the lead, main, primary, controlling, etc. author. I just file bugs as I find them, add some comments about feature requests, and fix issues when I know how to.</p>
<p>In case you&#8217;re curious, the back story is really pretty straightforward. I started writing my own version of an AIR SQLite admin tool back before AIR beta 1, but never had time to take it beyond a &#8220;query runner&#8221; tool. Late in 2008 I discovered Lita, and once I started using it I realized that 1) it is implemented in a similar way to many of the ideas I had, and 2) It&#8217;s already got a big head start in features, so there&#8217;s not much point in me trying to &#8220;compete&#8221; or anything like that, especially for something that I wasn&#8217;t planning to make money from.</p>
<p>After using it for a while I discovered a few bugs, and decided to email David about them. (He and I had communicated a bit previously, about the <a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS8AFC5E35-DC79-4082-9AD4-DE1A2B41DAAF.html">encrypted database functionality added in Adobe AIR 1.5</a> and how to integrate it into Lita.) I think I probably mentioned in that message that I would be willing/interested to fix issues myself as I have time. Fortunately David was very kind and accepted my offer. So, as I said, now when I find issues I get to fix them myself, which is nice because I can fix them quickly, but also adds some responsibility since now the burden is on me to make those changes myself =)</p>
<p>As a side note, I really want to point out that David is a really great developer &#8212; something I appreciate greatly as we work in the same codebase. It is a big testament to his architectural and coding skills that I was able to dive right in and fix four bugs/feature requests in a very short time (literally a matter of minutes after first looking at the code). I&#8217;ve learned a lot just from seeing his code, and now I&#8217;m anxious to read his <a href="http://www.dehats.com/drupal/?q=node/32">&#8220;Flex Architecture Fundamentals&#8221; series</a> to learn more about the thinking behind the great code.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/03/12/useful-tool-joy-of-shipping-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Please test: updated ActionScript GZIP library with Flash Player 10 support</title>
		<link>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/</link>
		<comments>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 22:40:50 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=232</guid>
		<description><![CDATA[Since I first created my ActionScript GZIP library as a test of Adobe AIR&#8217;s file compression capability, the number one request I&#8217;ve received has been to add support for Flash Player-only projects. With the release of Flash Player 10 last fall, I couldn&#8217;t use the lack of player support as an excuse any more. So [...]]]></description>
			<content:encoded><![CDATA[<p>Since I first created my <a href="/projects/gzipencoder/">ActionScript GZIP library</a> as a test of Adobe AIR&#8217;s file compression capability, the number one request I&#8217;ve received has been to add support for Flash Player-only projects. With the release of Flash Player 10 last fall, I couldn&#8217;t use the lack of player support as an excuse any more. So now I&#8217;ve just been using the &#8220;not enough time&#8221; excuse&#8230;</p>
<p>But not any more. A few days ago I checked in a beta (barely tested) version of that adds support for Flash Player 10 (browser) projects. It&#8217;s not linked from the main google code project page yet, but you can get to it from the <a href="http://code.google.com/p/ascompress/downloads/list">GZIP encoder project downloads page</a>.</p>
<p>The download that adds Flash Player 10 support is &#8220;ascompress-.2.0.zip&#8221;. It now includes two SWC files:</p>
<ul>
<li>GZIPEncoder_AIR.swc is the full package, with all the same features as the previous release (.1.0.2).</li>
<li>
<p>GZIPEncoder_Flash.swc is the Flash-Player-only version. It only compresses/uncompresses ByteArrays, and doesn&#8217;t have any support for files.</p>
<p>Of course, since Flash Player 10 also adds local file opening/saving support that uses ByteArray data for the files, you could easily write your own code to prompt the user for a gzip file, or compress a file and prompt the user to save it. For an example of opening and saving files from Flash Player 10, see my quick start article: &#8220;&#8221;</p>
</li>
</ul>
<p>As I implied when I described this as &#8220;beta (barely tested)&#8221; I haven&#8217;t done a lot of testing of this code yet. I don&#8217;t actually anticipate that there will be issues &#8212; really all I did was refactor the code into two classes instead of one &#8212; but that doesn&#8217;t mean there won&#8217;t be any issues, of course. =) If you&#8217;re interested, and especially if you&#8217;re one of the people who&#8217;s asked for this support, I would love it if you try it out and let me know how it works for you. If you&#8217;re willing to test it out, I&#8217;ll be happy to quickly make any fixes necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/02/27/actionscript-gzip-library-flash-player-10/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Undo and redo in ActionScript textfields</title>
		<link>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/</link>
		<comments>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:29:14 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Sites to remember]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=227</guid>
		<description><![CDATA[As I&#8217;ve mentioned I&#8217;ve been doing a lot of AIR database work, so I&#8217;ve been spending literally hours a day working in my AIR SQL query runner app. The good news is that means I&#8217;ve been finding/fixing bugs and adding features!
One thing I&#8217;ve been wishing for the last week or so is undo/redo functionality as [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve <a href="/articles/2009/01/26/updates-to-doppler-air-sql-query-testing-tool/">mentioned</a> I&#8217;ve been doing a lot of AIR database work, so I&#8217;ve been spending literally hours a day working in my <a href="/projects/doppler-air-sql-admin-tool/">AIR SQL query runner</a> app. The good news is that means I&#8217;ve been finding/fixing bugs and adding features!</p>
<p>One thing I&#8217;ve been wishing for the last week or so is undo/redo functionality as I&#8217;m editing query text. Coincidentally, I just found out that <a href="http://jacwright.com/blog/">my 360|Flex friend Jac Wright</a> has written <a href="http://code.google.com/p/undo-textfields/">a library for undo and redo in Flash Player (ActionScript) text fields</a>. The previous link is to the Google Code project; here&#8217;s his <a href="http://jacwright.com/blog/112/undo-redo-for-all-textfields/">introductory blog post about the &#8220;undo textfields&#8221; library</a>. (via <a href="http://www.xtyler.com/code/163">Tyler Wright</a> via <a href="http://www.flexstuff.co.uk/">Gilles Guillemin</a>/Twitter)</p>
<p>Admittedly I haven&#8217;t tried this yet, and I&#8217;ve asked whether it&#8217;s been tested in AIR so I don&#8217;t know whether it will actually be feasible as-is. But I&#8217;ve got my fingers crossed! =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/02/12/undo-and-redo-in-actionscript-textfields/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Now updated: &#8220;Doppler&#8221; AIR SQL query testing tool</title>
		<link>http://probertson.com/articles/2009/01/26/updates-to-doppler-air-sql-query-testing-tool/</link>
		<comments>http://probertson.com/articles/2009/01/26/updates-to-doppler-air-sql-query-testing-tool/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 06:20:45 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Elsewhere on the web]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sites to remember]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=224</guid>
		<description><![CDATA[I just wanted to write a quick note to say that I&#8217;ve released an update to my &#8220;Doppler&#8221; AIR SQL admin tool. You can get it from the Doppler project page. (I&#8217;ve been working on an actual real application, one with a fair amount of database work, so naturally I&#8217;ve found motivation to fix some [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to write a quick note to say that I&#8217;ve released an update to my &#8220;Doppler&#8221; AIR SQL admin tool. You can get it from the <a href="/projects/doppler-air-sql-admin-tool/">Doppler project page</a>. (I&#8217;ve been working on an actual real application, one with a fair amount of database work, so naturally I&#8217;ve found motivation to fix some lingering bugs and add some missing functionality.)</p>
<p>As with previous versions, if you&#8217;ve been using the app you&#8217;ll need to uninstall it before installing the new version. Someday I&#8217;ll add updating support, but I&#8217;m not going to promise anything real soon.</p>
<p>Along with this release, I&#8217;ve also made a change to how I describe the tool, and to my future intentions for it. I&#8217;ve always had it in my mind to make this a full-fledged database admin tool, similar to the tools that come with SQL Server or other enterprise databases. However, time has obviously not allowed me to do that, and in the mean time other tools have been released by other developers. I&#8217;ve found one, <a href="http://www.dehats.com/drupal/?q=node/58">David Deraedt’s “Lita” SQLite admin tool</a> that is sufficiently mature that I use it in my day-to-day work now and it definitely beats doing things by hand! There are still improvements to be made and features to be added, but when I&#8217;ve reported bugs and feature requests he&#8217;s been quick to respond and release updates.</p>
<p>So while I&#8217;m sure nobody&#8217;s been holding their breath waiting for me to finish the &#8220;admin tool&#8221; portion of my app, I just wanted to clarify the new direction I&#8217;m taking it &#8212; or rather, the fact that I&#8217;m not planning to take it in as many new directions! (Hence the change in title for the project from &#8220;AIR SQL admin tool&#8221; to &#8220;AIR SQL query testing tool.&#8221;)</p>
<p>That doesn&#8217;t mean I&#8217;m done developing this tool by any means. In past jobs where I did heavy database development, and in a project I&#8217;m currently working on that involves heavy database development, I find it very useful to have two different kinds of database tools &#8212; one for creating and managing database objects and structure, and another for testing queries. While Lita does in fact have a tab for testing queries, I personally find Doppler to be a bit (not a lot, but a bit =) more developed in that specific area. On the other hand, Lita certainly does a lot in the db management space that Doppler doesn&#8217;t do. So I find the tools very complementary in terms of my actual development work.</p>
<p>As always, I welcome feedback, questions, thoughts, etc. And thanks to everyone who&#8217;s already reported bugs and offered suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2009/01/26/updates-to-doppler-air-sql-query-testing-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AIR 1.5 encrypted SQLite database &#8212; how to use it, best practices, and new projects</title>
		<link>http://probertson.com/articles/2008/11/18/air-1_5-encrypted-sqlite-database-how-to/</link>
		<comments>http://probertson.com/articles/2008/11/18/air-1_5-encrypted-sqlite-database-how-to/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 08:30:25 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Life at Adobe]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=214</guid>
		<description><![CDATA[Over a year ago I described a potential area of concern for using a SQLite database with an AIR application &#8212; because all apps use the same database engine, any AIR app can read any other app&#8217;s database (as long as it can find the database file).
As you may have heard among all the news [...]]]></description>
			<content:encoded><![CDATA[<p>Over a year ago I described <a href="/articles/2007/06/21/securing-air-sql-database/">a potential area of concern for using a SQLite database with an AIR application</a> &#8212; because all apps use the same database engine, any AIR app can read any other app&#8217;s database (as long as it can find the database file).</p>
<p>As you may have heard among all the news that&#8217;s coming out from MAX right now, <a href="http://www.adobe.com/devnet/logged_in/rchristensen_lpolanco_air_1.5.html">Adobe AIR 1.5 has just been released</a>. Most of the features of AIR 1.5 are features that were introduced with Flash Player 10. However, one new feature in AIR 1.5 that helps address the easy-to-read database issue is AIR 1.5&#8217;s new support for AES encrypted databases.</p>
<p>I&#8217;ve had the interesting and at times complex job of writing the documentation for this new feature. The bulk of the new documentation is in a new section &#8220;<a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS8AFC5E35-DC79-4082-9AD4-DE1A2B41DAAF.html">Using encryption with SQL databases</a>&#8221; in the SQL database chapter of the manual &#8220;Developing Adobe AIR Applications&#8221;.</p>
<p>It&#8217;s pretty straightforward to use an encrypted database. You have to create the database as an encrypted db. To create or open it, you call the SQLConnection class&#8217;s <code>open()</code> or <code>openAsync()</code> methods, just as you normally do, and there&#8217;s a new parameter where you provide a 16-byte ByteArray encryption key for the database. That&#8217;s all there is to it.</p>
<p>The SQLConnection class also has a new <code>reencrypt()</code> method, that you use to change the encryption key of an already encrypted database.</p>
<p>If you want to see some code examples, check out the documentation listed above, or see these quick start articles on the Adobe developer center:</p>
<ul>
<li><a href="http://www.adobe.com/devnet/air/flex/quickstart/encrypted_database.html">Working with the encrypted local SQLite database (Flex)</a></li>
<li><a href="http://www.adobe.com/devnet/air/flash/quickstart/encrypted_database_flash.html">Working with the encrypted local SQLite database (Flash)</a></li>
<li><a href="http://www.stage.adobe.com/devnet/air/ajax/quickstart/encrypted_database.html">Working with the encrypted local SQLite database (HTML/JavaScript)</a></li>
</ul>
<p>There are a couple of parts of the new documentation that I think are particularly interesting (although I&#8217;m obviously biased since I wrote it all):</p>
<ul>
<li><a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS34990ABF-C893-47ec-B813-9C9D9587A398.html">Considerations for using encryption with a database</a> talks about some of the various reasons you may want to use an encrypted database, and some of the differences in how you might architect your application to account for the desired level of security and privacy.</li>
<li>
<p><a href="http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS61068DCE-9499-4d40-82B8-B71CC35D832C.html">Example: Generating and using an encryption key</a> goes into great depth into one technique for creating an encryption key for your database. You have to provide a ByteArray encryption key to encrypt your database. How you come up with that encryption key can have a big impact on the actual security of your app data.</p>
<p>This was definitely the most involved example I&#8217;ve written for the documentation. the techniques it uses were specified to me by security engineers at Adobe. The documentation goes into lots of detail describing how these techniques are used and why. Both the code and the text went through a series of reviews by engineers and security experts.</p>
<p>I ended up writing the example as a simple UI, plus a class that anyone can just pull into their own app (rather than having to pull apart the example and turn it into something you can use. I&#8217;m also excited to share that <a href="http://mikechambers.com/">Mike Chambers</a> and <a href="http://weblogs.macromedia.com/cantrell/">Christian Cantrell</a> decided that this &#8220;encryption key generator&#8221; class is useful enough that it&#8217;s now included in the <a href="http://code.google.com/p/as3corelib/">open-source ActionScript 3.0 core library (as3corelib) project</a>.</p>
</li>
</ul>
<p>Now that AIR 1.5 is out the door, I&#8217;ve updated my <a href="http://probertson.com/projects/doppler-air-sql-admin-tool/">AIR database admin tool</a> to support encrypted databases (when you try to open an encrypted database it prompts you for an encryption key, which you enter as a Base-64 string). I already mentioned that I wrote the encryption key generator class that&#8217;s now in as3corelib. I&#8217;ve also got at least one more new encrypted database-related open-source project that I&#8217;m about to release&#8230;but I&#8217;ll wait until the MAX &#8220;firehose&#8221; dies down a bit before I write more about that one. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/11/18/air-1_5-encrypted-sqlite-database-how-to/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>360&#124;Flex slides for &#8220;AIR SQLite: An optimization conversation&#8221;</title>
		<link>http://probertson.com/articles/2008/08/22/360flex-slides-for-air-sqlite-optimization-conversation/</link>
		<comments>http://probertson.com/articles/2008/08/22/360flex-slides-for-air-sqlite-optimization-conversation/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 00:16:24 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=188</guid>
		<description><![CDATA[Updates (Oct. 30, 2008): The video of my presentation has been posted, so I added a link to it at the bottom of this post. Also, I just learned about another AIR-based SQLite admin tool which looks interesting, so I added it to the list of resources even though it&#8217;s obviously not discussed in the [...]]]></description>
			<content:encoded><![CDATA[<p class="editornote">Updates (Oct. 30, 2008): The video of my presentation has been posted, so I added a link to it at the bottom of this post. Also, I just learned about another AIR-based SQLite admin tool which looks interesting, so I added it to the list of resources even though it&#8217;s obviously not discussed in the presentation.</p>
<p>As I mentioned briefly before, this week I presented at the 360|Flex San Jose (August 2008) conference. My presentation was titled &#8220;Adobe AIR SQLite: An optimization conversation.&#8221; As I mentioned in the presentation, the term &#8220;optimization&#8221; could mean a few different things &#8212; for example, optimization meaning improving performance, or optimization meaning improving developer productivity. While my presentation focused mostly on the first type of optimization, I included suggestions for tools, libraries, and strategies that fall in the &#8220;developer productivity&#8221; type of optimization as well.</p>
<p>Anyway, as always I&#8217;m happy to make my presentation materials available. Here are the slides (with some notes) from my presentation:</p>
<p><a href="/resources/2008/08/22/air_sqlite_optimization_slides.zip">&#8220;Adobe AIR SQLite: An optimization conversation&#8221; slides</a> (PDF in .zip - 504kb)</p>
<p>I don&#8217;t really have any specific code examples, apart from what&#8217;s in the slides, so there&#8217;s no &#8220;source code&#8221; download. However, I did link to a lot of external tools and resources (including a few of my own). To save you the trouble of digging into the PDF, here are the links:</p>
<p>Tools</p>
<ul>
<li><a href="http://coenraets.org/blog/2008/02/air-based-sqlite-admin-updated-for-beta-3/">Cristophe Coenraets&#8217; &#8220;SQLite Admin&#8221;</a></li>
<li><a href="/projects/doppler-air-sql-admin-tool/">My tool for testing queries</a></li>
<li><a href="http://www.dehats.com/drupal/?q=node/59">&#8220;Lita&#8221; by David Deraedt</a> (I learned about this one after the presentation, so it&#8217;s not discussed in my slides/video, but I thought it&#8217;d be worth mentioning anyway.)</li>
</ul>
<p>Application architecture/patterns/libraries</p>
<ul>
<li><a href="http://www.peterelst.com/blog/2008/04/07/introduction-to-sqlite-in-adobe-air/">SQLite MXML wrapper classes</a> (Peter Elst)</li>
<li><a href="http://www.brandonellis.org/?p=49">Data access layer</a> (Brandon Ellis)</li>
<li><a href="http://code.google.com/p/asqlib/">asqlib SQL statement generator</a> (Miran Loncaric)</li>
<li>&#8220;Command&#8221; classes (me) as <a href="/projects/addressbook/">demonstrated by my AddressBook sample application</a></li>
<li><a href="http://code.google.com/p/air-activerecord/">AIR ActiveRecord source</a> and <a href="http://jacwright.com/blog/79/air-activerecord-is-open-source/">blog post explaining its usage</a> (Jacob Wright)</li>
<li><a href="http://www.ericfeminella.com/blog/2008/06/22/air-cairngorm-20/">AIR SQLite Cairngorm services</a> (Eric Feminella)</li>
<li>Connection and statement pools, mentioned (with source code) in the article <a href="http://www.adobe.com/devnet/air/flex/articles/air_sql_operations.html">User experience considerations with SQLite operations</a> (Daniel Rinehart)</li>
</ul>
<p>Finally, as you may have heard, Adobe sponsored the recording of every presentation at 360|Flex, and they&#8217;re all going to be made available free of charge via a channel in Adobe Media Player. They&#8217;re rolling them out in phases, <span class="cut">and mine isn&#8217;t available yet. When it is, I&#8217;ll update this post with the video as well.</span> Update: the video is <a href="http://onflash.org/ted/2008/10/360flex-sj-2008-air-sqlite-optimization.php">now available on Ted Patrick&#8217;s blog</a> as well as in Adobe Media Player.</p>
<p>In the mean time, 360|Flex was full of awesome presentations. I wasn&#8217;t able to get to all the ones I wanted to see, due to conflicts and me trying to finish up preparation for my presentation. So I&#8217;m going to be spending some time watching many of those videos as well. If you&#8217;d like to see the videos, Ted Patrick has posted instructions on his blog:</p>
<p><a href="http://www.onflex.org/ted/2008/08/360flex-sessions-media-rss-feed.php">How to view 360|Flex San Jose 8/08 session videos in Adobe Media Player</a></p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/08/22/360flex-slides-for-air-sqlite-optimization-conversation/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>New project: ActionScript Regular Expressions Testing Tool</title>
		<link>http://probertson.com/articles/2007/05/18/project-announcement-regexp-tool/</link>
		<comments>http://probertson.com/articles/2007/05/18/project-announcement-regexp-tool/#comments</comments>
		<pubDate>Fri, 18 May 2007 19:11:03 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/05/18/project-announcement-regexp-tool/</guid>
		<description><![CDATA[Over the last couple of weeks I&#8217;ve been working on a Flex project where I&#8217;ve had to make heavy use of regular expressions. As always seems to happen when I work with regular expressions in any language, I found that one of the more complex parts of the process was just figuring out the exact [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I&#8217;ve been working on a Flex project where I&#8217;ve had to make heavy use of regular expressions. As always seems to happen when I work with regular expressions in any language, I found that one of the more complex parts of the process was just figuring out the exact regular expression pattern to use.</p>
<p>Having been down this road before with other languages, I decided to put together a simple tool for testing out regular expressions. I wanted to be able to enter a pattern and a test string, and have it check to see if it was a match. That way, I could test out various possible good matches (and non-matches) to see if they give the right result. I was using named capturing groups quite a bit on this project, so I added an extra feature where it shows all the groups that are captured as well.</p>
<p>Anyway, I realized this might be useful for anyone who&#8217;s trying to use regular expressions in an ActionScript 3.0 project, so I thought I&#8217;d make it available.</p>
<p>Want to test it out? Visit the <a href="/projects/actionscript-regexp-test/">project page</a> to see the tool and download the source code.</p>
<p>If you have comments or improvements for the project, feel free to add a note in the comments on the project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/05/18/project-announcement-regexp-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML-RPC client updated</title>
		<link>http://probertson.com/articles/2007/01/10/xml-rpc-client-updated/</link>
		<comments>http://probertson.com/articles/2007/01/10/xml-rpc-client-updated/#comments</comments>
		<pubDate>Wed, 10 Jan 2007 17:12:05 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/01/10/xml-rpc-client-updated/</guid>
		<description><![CDATA[In case anybody follows my site just to get updates on my XML-RPC client library&#8230; I&#8217;ve just released an updated version of my XML-RPC client library project.
The library is still in ActionScript 2.0&#8212;I haven&#8217;t finished porting it to ActionScript 3.0 yet, although I&#8217;ve started.
This release (.3 beta) contains a single bug fix. In anticipation of [...]]]></description>
			<content:encoded><![CDATA[<p>In case anybody follows my site just to get updates on my XML-RPC client library&#8230; I&#8217;ve just released an updated version of my <a href="/projects/xmlrpc/">XML-RPC client library project</a>.</p>
<p>The library is still in ActionScript 2.0&#8212;I haven&#8217;t finished porting it to ActionScript 3.0 yet, although I&#8217;ve started.</p>
<p>This release (.3 beta) contains a single bug fix. In anticipation of porting the library over to ActionScript 3.0, I wrote a series of unit tests, and&#8212;what do you know&#8212;I found a bug in the code that parses date values returned from an XML-RPC service call. I guess <a href="/articles/2005/11/08/actionscript-3-unit-testing-recommended/">unit tests really are useful for ActionScript</a> =).</p>
<p>I also added a new <a href="/resources/projects/xmlrpc/docs/history.html">project history page</a> and a new <a href="/resources/projects/xmlrpc/docs/examples.html#stepbystep">step-by-step example of how to make an XML-RPC call</a>, in response to some user feedback and questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/01/10/xml-rpc-client-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
