<?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; Opinions</title>
	<atom:link href="http://probertson.com/articles/category/articles-by-paul/opinions/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>Changes</title>
		<link>http://probertson.com/articles/2010/05/13/changes/</link>
		<comments>http://probertson.com/articles/2010/05/13/changes/#comments</comments>
		<pubDate>Thu, 13 May 2010 08:48:32 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Life at Adobe]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=445</guid>
		<description><![CDATA[Unfortunately I can&#8217;t give this topic the time it deserves right now, but for those of you who are interested I wanted to let you know of some &#8220;significant life changes&#8221; that are happening to me.
Summary
New job. New city. New house. Moving tomorrow. Offline for a week or two. Don&#8217;t say anything important while I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately I can&#8217;t give this topic the time it deserves right now, but for those of you who are interested I wanted to let you know of some &#8220;significant life changes&#8221; that are happening to me.</p>
<h2>Summary</h2>
<p>New job. New city. New house. Moving tomorrow. Offline for a week or two. Don&#8217;t say anything important while I&#8217;m gone. (Sorry <a href="http://flashandthecity.com/">FATC</a>, especially <a href="http://reflex.io/">Reflex</a>: no breaking announcements or innovation allowed. =)</p>
<h2>1. Job</h2>
<p>I am now no longer working for Adobe. I have started a new job with <a href="http://dedoinc.com/">Dedo Interactive, Inc.</a>, as a Flash/Flex/ActionScript/AIR developer and also as an active collaborator with the UX design group. As <a href="http://www.danieldura.com/archive/my-last-week-at-adobe">Danny</a> and <a href="http://unitedmindset.com/jonbcampos/2010/04/30/new-position-in-dedo-inc/">Jonathan</a> have already described, this is an exciting opportunity with a group that&#8217;s pushing the boundaries of hardware and software solutions. It&#8217;s also exciting for me to be a &#8220;regular developer&#8221; like everyone I hang out with and pretend to fit in with at conferences. Of course that&#8217;s where my roots are &#8212; in being a Macromedia/Adobe customer first before being an Adobe employee &#8212; so I&#8217;m just going back to the place that I&#8217;ve tried my best not to leave anyway.</p>
<h2>2. Location</h2>
<p>Since Dedo is located in Plano (N. Dallas) Texas, naturally it seems that I need to be located there too. Danny has been really great about letting me start as a remote employee. Nevertheless, I am typing this while mostly surrounded by cardboard boxes, as well as a few too many things that I should have already packed into cardboard boxes. In approximately 32 hours a moving truck will pull up to my house and load everything up. Then I&#8217;ll pack my family into a minivan and drive for many hours and days until we get to our new house. (Just signed the mortgage papers today &#8212; ack!)</p>
<h2>3. Family</h2>
<p>Fortunately, my family has agreed to accompany me on this crazy journey. I feel sad for my three young children. They&#8217;re obviously not happy to leave their friends and school and the life that they&#8217;ve known for the last three years. (My youngest doesn&#8217;t remember anything before California, and my middle child barely remembers anything else, in spite of the fact that they were both born in Indiana.) I&#8217;m grateful to have a wonderful wife and special children who make the hard times worth it, and who make the good times good.</p>
<h2>4. Blog, Twitter, open source projects, conferences, etc.</h2>
<p>Frankly, I have no plans to change what I&#8217;ve been doing with any of those. I&#8217;ve never been the most regular blogger or twitterer, and my projects don&#8217;t get updated as often as I&#8217;d like. That probably isn&#8217;t going to change with a new job and a new city. But the vast majority of my work on them has been on my own time anyway, so the fact that I&#8217;m no longer an Adobe employee shouldn&#8217;t make that situation any worse. In fact, the owners of Dedo said that they&#8217;re pleased with my community involvement, and want it to continue. I&#8217;m definitely still using AIR, ActionScript, and SQLite in my work, so I keep finding new things and ways to improve my projects.</p>
<h2>5. Blah blah sentimental stuff</h2>
<p>Adobe is a great employer, and a great company. In spite of all the negativity and mud-slinging that&#8217;s happening right now, I can say that I never felt bad or guilty about working for Adobe. On the contrary, I am proud to have worked for Adobe. I feel like Adobe is a good, ethical company that tries to make business decisions that lead to mutual benefit for partners and customers. (Don&#8217;t bother sharing your experiences to the contrary. I&#8217;m sure I could tell you plenty too. In spite of that, this is my opinion of the company and employees overall.)</p>
<p>In addition to my great employer, living and working and associating with the community in the San Francisco bay area has been a tremendous experience, and I consider myself very fortunate for it. I&#8217;m definitely sorry to leave, especially because of the great opportunities (being near Adobe HQ), the great community (I&#8217;m looking at you <a href="http://www.meetup.com/silvafug/">SilvaFUG</a>), and the great weather =)</p>
<p>To all of you who I&#8217;ve met and become friends with over the last 3 years, farewell, and I look forward to seeing you online and at conferences of the future. I only regret that I didn&#8217;t get to come to one last meeting and tell you goodbye in person.</p>
<p>Meanwhile, I&#8217;ve been amazed to learn how many talented and community-oriented developers call the Dallas-Fort Worth area home. I&#8217;ve already attended one users&#8217; group meeting and plan to attend many more. I look forward to getting to know you better.</p>
<p>As I&#8217;ve been preparing to move, I&#8217;ve been trying to go through my many boxes that I haven&#8217;t touched since the last time I moved across the country. I was a little astounded to find so many of my college (and even a few high school) notes, papers, textbooks, etc. among my possessions. I&#8217;m getting older and more cynical now, plus we have to pay the movers by the pound, so I tried to get rid of as much as I could bear. I was amazed at how much I&#8217;ve forgotten from what I once knew. (Some of my academic papers were quite impressive to me &#8212; and it was astounding to find my 2nd year Hebrew notebook and later my calculus notes, and consider the fact that I wrote all the scribblings in there. =) I also couldn&#8217;t help but think over the many people I&#8217;ve met and known and worked with in Houston (where I grew up), Salt Lake City (where I did my undergraduate), Bloomington Indiana (grad school and my first &#8220;real&#8221; job), and of course most recently the bay area. It&#8217;s quite astounding to consider the path that life has led me on, and how I&#8217;ve ended up where I am today.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/05/13/changes/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>I am 360&#124;Flex (and so can you!)</title>
		<link>http://probertson.com/articles/2010/02/18/i-am-360flex-and-so-can-you/</link>
		<comments>http://probertson.com/articles/2010/02/18/i-am-360flex-and-so-can-you/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:41:32 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=399</guid>
		<description><![CDATA[The next <a href="http://360flex.com/">360&#124;Flex conference</a> is coming up quickly -- <a href="http://360flex.eventbrite.com/">March 7-10, 2010 in San Jose, California</a>. As I've been preparing for the conference and reading some of the things other people are saying about it, I've been reminiscing about past 360&#124;Flex (and other) conferences I've been to, and about how much they've impacted me professionally and personally. (Hint: a lot.)]]></description>
			<content:encoded><![CDATA[<p>(With apologies to <a href="http://www.amazon.com/Am-America-So-Can-You/dp/B0029LHWSQ/">Stephen Colbert</a> =)</p>
<p>The next <a href="http://360flex.com/">360|Flex conference</a> is coming up quickly &#8212; <a href="http://360flex.eventbrite.com/">March 7-10, 2010 in San Jose, California</a>. As I&#8217;ve been preparing for the conference and reading some of the things other people are saying about it, I&#8217;ve been reminiscing about past 360|Flex (and other) conferences I&#8217;ve been to, and about how much they&#8217;ve impacted me professionally and personally. (Hint: a lot.)</p>
<p>But I&#8217;m not here to talk about the past. (Or about <a href="/articles/2010/02/09/thoughts-on-multi-screen-context-app-development/">what I&#8217;m presenting at the conference,</a> since I&#8217;ve already mentioned that.) Instead, I&#8217;d like to talk to you about this 360|Flex, and why I&#8217;m excited to attend and what I&#8217;m looking forward to most. These fall into two categories: <a href="#sessions">Sessions I&#8217;m looking forward to</a>, and <a href="#people">people I&#8217;m excited to meet (or see again)</a>.</p>
<h2 id="sessions">The sessions (in schedule order)</h2>
<p>I combed over the whole schedule, and there is literally not a single time slot that I&#8217;m not looking forward to. Except the ones where I have to choose from two or three awesome-sounding presentations. Frankly, what I&#8217;m <em>not</em> looking forward to about 360|Flex is that I&#8217;ll have to choose not to attend some sessions that I&#8217;m really anxious to see.</p>
<h3>Sunday</h3>
<p><strong>Sunday afternoon</strong>: Joel Hooks: Hands-on development with the Robotlegs AS3 framework (I&#8217;ve mentioned I&#8217;ll be helping with this, but I&#8217;d definitely attend if I wasn&#8217;t)</p>
<h3>Monday</h3>
<p><strong>Keynote</strong>: Is this Deepa&#8217;s first keynote, now that she&#8217;s a Flex Product Manager and not an engineer anymore? She spoke to my users&#8217; group last week talking about Flex &#8220;next&#8221; (i.e. after 4). I have no idea what she&#8217;ll talk about here, but I&#8217;m looking forward to it!</p>
<p><strong>Monday 1</strong>: Already there are too many to choose&#8230;Michael Labriola (Flex components), Chase Brammer (analytics) or Richard Lord (&#8220;Designer Last&#8221; architecture)?</p>
<p><strong>Monday 2</strong>: Drew McClean and RJ Owen - Rules engine with AS3 and Hamcrest (time to find out what the buzz is about), although if I was doing more video work I&#8217;d definitely hit expert David Hassoun&#8217;s session (OSMF), or maybe I should broaden my horizons/prepare for the future with Bryce Barrand (How to find and keep top developers)</p>
<p><strong>Monday 3</strong>: Again, I can&#8217;t decide&#8230;Garth Braithwaite on skinning, or Jesse Warden on Robotlegs and Gaia?</p>
<h3>Tuesday</h3>
<p><strong>Morning panel discussion</strong> (&#8220;Principles for RIA design&#8221;): Don&#8217;t discount this because it&#8217;s early. Keith is a great facilitator (he&#8217;s a co-manager of my local users&#8217; group) and from the things I&#8217;ve heard, there will be lots of great ideas shared in this session.</p>
<p><strong>Tuesday 1</strong>: Alas, I&#8217;m speaking in this slot so I&#8217;ll miss Deepa&#8217;s Flex 4 talk <em>and</em> Aaron Pedersen and James Polanco&#8217;s Flex 4 lifecycle talk. Will anyone notice if I just skip out and go to their sessions instead?</p>
<p><strong>Tuesday 2</strong>: Jacob and Tyler Wright (and Ben Stucki, I think!): &#8220;Reflex: Rethinking Component Design.&#8221; I got to hear about the ideas behind this component/layout framework in conversations at the last 360|Flex conference, and I&#8217;ve been dying to try it out since then. Revolutionary stuff will appear here!</p>
<p><strong>Tuesday 3</strong>: Yet another tough choice: Elad Elrom on TDD, Randy Troppman and Adrew Westberg on GPS in Flex, or Aaron Hardy on Queue and Cache?</p>
<h3>Wednesday</h3>
<p><strong>Keynote</strong>: always fun and informative &#8212; hear the behind-the-scenes of the conference, and win prizes too!</p>
<p><strong>Wednesday 1</strong>: Why do they have to make it so hard to choose! Renaun Erickson (&#8220;AS tips for iPhone games&#8221;), Jeff Tapper (don&#8217;t even know but always extremely valuable), or Sim Bateman (&#8220;Getting Git&#8221;)?</p>
<p><strong>Wednesday 2</strong>: I think I may go to the dark side for a bit, and learn more about Silverlight from Jun Heider. But Nate Beck&#8217;s &#8220;Flexible games&#8221; looks mighty tempting too&#8230;</p>
<p><strong>Wednesday 3</strong>: Eric Fickes with Silverlight, part 2, Shashank Tiwari on multi-touch, or Andy Powell on UX? John and Tom, you&#8217;re making this so hard!</p>
<p><strong>Wednesday 4</strong>: (at least) two presentations worth sticking around for: Matt Guest on Flex text with TLF, and Huyen Tue Dao on Greenthreading</p>
<p>So yes, I&#8217;ve realized I&#8217;m going to have to make two clones of myself (at least) in order to attend all the sessions I want to see. And then I&#8217;ll have to merge them back together somehow. I&#8217;ll get back to you on how that one turns out&#8230;</p>
<h2 id="people">The people</h2>
<p><a href="http://www.richardlord.net/blog/360flex-san-jose">Richard Lord really nailed it</a> when he said that the best part of conferences, especially smaller ones like 360|Flex, is getting to meet and talk with and throw ideas around with other developers. I&#8217;ve learned some good things in the sessions at past conferences, but by far my best memories and most valued times are the ones I spent between sessions and evenings/nights kicking around ideas with others.</p>
<p>These are my &#8220;conference friends&#8221; (and a few &#8220;users&#8217; group friends) who I&#8217;ve met at conferences and always look forward to hanging out with again. I&#8217;m sure you know their names, and like me you may wonder why they&#8217;re actually willing to talk and hang out with someone like me =) But I&#8217;ve never gotten any attitude from these (or other) &#8220;superstars&#8221; that I&#8217;ve met in person at conferences. That&#8217;s reason 1 I love the Flash/Flex community &#8212; these people welcome ideas, and are just excited to meet people and share:</p>
<ul>
<li><a href="http://renaun.com/blog">Renaun Erickson</a></li>
<li><a href="http://david.realeyes.com/">David Hassoun</a></li>
<li><a href="http://www.iheartair.com/">Jun Heider</a></li>
<li><a href="http://dougmccune.com/blog/">Doug McCune</a></li>
<li>Clint Modien (C&#8217;mon Clint, you know you want to be there)</li>
<li><a href="http://lordbron.wordpress.com/">Tom Ortega</a> (his last 360|Flex as an organizer!)</li>
<li><a href="http://www.infoaccelerator.net/blog/">Andy Powell</a></li>
<li><a href="http://toddrothe.com/blog/">Todd Rothe</a></li>
<li><a href="http://blog.digitalbackcountry.com/">Ryan Stewart</a></li>
<li><a href="http://blog.benstucki.net/">Ben Stucki</a></li>
<li><a href="http://blog.mediarain.com/">Bryce Barrand</a></li>
<li><a href="http://jacwright.com/">Jac Wright</a></li>
<li><a href="http://xtyler.com/">Tyler Wright</a></li>
</ul>
<p>And these are the people who I&#8217;ve learned from whose work I&#8217;ve admired online, who I&#8217;m hoping to meet and get to know &#8220;in real life&#8221;:</p>
<ul>
<li><a href="http://blog.simb.net/">Sim Bateman</a></li>
<li><a href="http://twitter.com/garthdb">Garth Braithwaite</a></li>
<li><a href="http://joelhooks.com/">Joel Hooks</a></li>
<li><a href="http://blog.kevinhoyt.org/">Kevin Hoyt</a></li>
<li><a href="http://www.richardlord.net/">Richard Lord</a></li>
<li><a href="http://jesterxl.com/">Jesse Warden</a></li>
<li><a href="http://flexblog.faratasystems.com/">Yakov Fain</a></li>
</ul>
<p>And the best part is, there are plenty of others that I will meet, that I don&#8217;t know (or even know of) yet, but who will be on my &#8220;conference friends&#8221; list for the next 360|Flex =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/02/18/i-am-360flex-and-so-can-you/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Thoughts on multi-screen, multi-context app development</title>
		<link>http://probertson.com/articles/2010/02/09/thoughts-on-multi-screen-context-app-development/</link>
		<comments>http://probertson.com/articles/2010/02/09/thoughts-on-multi-screen-context-app-development/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 01:00:58 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Contextual design]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Multi-screen]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[User-centered design]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=372</guid>
		<description><![CDATA[Around 8 months ago I was asked to start thinking about the now emerging (particularly from a Flash Platform perspective) world of multi-screen application development. What are issues to consider? What guidance should we offer?
It turns out that my thinking on that topic isn&#8217;t going to become anything in the Adobe documentation. So I&#8217;ve sort [...]]]></description>
			<content:encoded><![CDATA[<p>Around 8 months ago I was asked to start thinking about the now emerging (particularly from a Flash Platform perspective) world of multi-screen application development. What are issues to consider? What guidance should we offer?</p>
<p>It turns out that my thinking on that topic isn&#8217;t going to become anything in the Adobe documentation. So I&#8217;ve sort of just been sitting on my ideas with the idea that someday I&#8217;ll probably share them.</p>
<p>Which brings me to this post.</p>
<h2>Aside: upcoming presentations on multi-screen development</h2>
<p>This is really a side note to the main ideas here, but I thought I&#8217;d mention it since it&#8217;s the reason I actually stopped to write this. In one of my mind-wandering moments this morning, I realized that at the upcoming <a href="http://360flex.com/">360|Flex conference (San Jose, March 7-10)</a> I&#8217;ll be involved in two presentations that are directly related to practical aspects of building multi-screen apps:</p>
<ul>
<li>
<p>As part of the pre-conference free training, <a href="http://joelhooks.com/">Joel Hooks</a> and I are doing a four-hour training on using the <a href="http://robotlegs.org/">Robotlegs micro-architecture</a>. (Joel is the main speaker, fortunately, because he&#8217;s one of the core Robotlegs developers and the main &#8220;evangelist.&#8221; I&#8217;ll be helping out, to try and help save his voice and maybe to help find typos. =)</p>
<p>If you&#8217;re wondering what a Robotlegs session has to do with multi-screen apps&#8230;keep reading, it&#8217;s explained below.</p>
</li>
<li>On Tuesday and Wednesday, <a href="http://renaun.com/">Renaun Erickson</a> and I are giving (two separate) presentations about building iPhone apps using Flash Platform tools. My session is more of an intro into the workflow, how it&#8217;s similar to other app building, and how it&#8217;s different. (Plenty of code to look at &#8212; don&#8217;t worry!) Renaun is going to get more into specifics of building a game, as well as some more intermediate/advanced topics like performance.</li>
</ul>
<p>Funny that I never really made that connection until this morning. I guess subconsciously I knew this is a direction I want to move in, and that&#8217;s why I&#8217;ve been focusing my learning (and hence my presenting) on these topics =)</p>
<h2>Background</h2>
<p>While I was partially trying to keep my thinking abstract, from a practical perspective I centered my thoughts around developing using the Flash Platform. So conceptually, what I was thinking about was the idea of making a single &#8220;app&#8221; for multiple screens, which would mean that (in the technology of the next year or so) it could be potentially take several forms:</p>
<ul>
<li>a browser/computer app (Flash Player)</li>
<li>a browser/mobile app (Flash Player)</li>
<li>a desktop app (AIR)</li>
<li>a mobile (iPhone) app (Publisher for iPhone, similar to AIR)</li>
<li>a mobile app for other devices (AIR)</li>
<li>a TV app or widget (<a href="http://tv.adobe.com/watch/max-2009-design/flash-for-the-digital-home-flash-on-tv/">Flash for the digital home</a>)
</ul>
<p>(Obviously many of these are only out in public beta, some have only been vaguely publicly acknowledged, and others may or may not ever exist as actual Adobe products =)</p>
<h2>One app, or many?</h2>
<p>Back when I started thinking about this, there seemed to be two main camps. One group was a strong advocate for the &#8220;single source&#8221; idea: you would build one SWF or one AIR app and distribute that same app on any platforms (desktop/mobile/TV). Obviously a key element to that, especially for desktop/mobile apps rather than browser apps, would be having code that detects screen size and device capabilities and adapts the UI to the device.</p>
<p>The second group felt that it was more likely that developers who are creating an app for multiple screens would actually create multiple apps (from the perspective of the IDE). The apps would obviously share some code, visual assets, etc., but would be different enough that they&#8217;d be created separately and distributed as separate file types. (In the case of apps created for the iPhone, of necessity this has to be true, at least in terms of the publishing part.)</p>
<p>Since I try to be pragmatic about things unless I have a <em>really</em> good reason, I favored the second viewpoint. However, I acknowledge that in some circumstances the first approach might be used. As always, I think that developers are going to use a mix of approaches.</p>
<p>For example, suppose I&#8217;m building an app and I want to create a version for desktop computers, a version for the iPhone, and a version for other mobile devices. Personally I see this not just as an issue of &#8220;porting&#8221; the app from one platform to another. I think that each device has its strengths, and more importantly, each device is used for different purposes and in different contexts. If I&#8217;m building an app for a device, I should definitely be <a href="http://blog.digitalbackcountry.com/2009/10/introducing-contextual-applications/">taking that notion of context into account</a> as I&#8217;m designing the app. That pretty much rules out the possibility of using the exact same app (UI and everything) for both computers and mobile devices, unless I want it to run as a widget-type app on the desktop.</p>
<p class="editornote">Also see: <a href="http://www.adobe.com/devnet/flashplatform/context_apps/">Adobe Flash Platform contextual applications developer center</a></p>
<h2>Adaptable code to the rescue</h2>
<p>On the other hand, that doesn&#8217;t mean that developers will always create completely separate projects. For example, suppose I&#8217;m creating an app for iPhone, and another for another mobile device. Or perhaps I&#8217;m using the Publisher for iPhone to create an iPhone version of my app and an iPad version. If my app is a game where I can more freely discard the conventions of the platforms, perhaps the only platform difference I need to consider is the difference in screen dimensions and pixel density. In that case, it&#8217;s quite possible that I can <a href="http://www.adobe.com/devnet/flash/articles/authoring_for_multiple_screen_sizes.html"use the same source code and have it adapt to the different screen sizes</a>.</p>
<h2>Frameworks to the rescue</h2>
<p>Even for a more line-of-business or productivity app, one of the key ideas in <a href="http://tv.adobe.com/watch/max-2009-develop/preview-flex-for-mobile-devices/">Slider</a>, the future <a href="http://flashmobile.scottjanousek.com/2010/02/12/adobe-flex-for-mobile-whitepaper/">Flex mobile framework</a>, is to (as much as possible) abstract away platform convention differences. For example, if iPhone usually puts the back button on the top, and another platform puts it on the bottom, and another platform puts it in a menu, and another platform has it assigned to a physical button on the device, then Slider might have a &#8220;back&#8221; event that you can hook into, and you can make your app perform the necessary &#8220;back&#8221; tasks regardless of platform.</p>
<h2>Design patterns to the rescue</h2>
<p>And, of course, in some situations you&#8217;ll almost surely need to create different versions of apps for different screens. For example, suppose you&#8217;re building a desktop Twitter client and a mobile Twitter client. Chances are good you&#8217;ll put some functionality into the desktop version that doesn&#8217;t go into the mobile one &#8212; such as previewing images, or maybe Facebook integration. On the other hand, adding a feature like automatic location tagging would make lots of sense in the mobile version, but not so much in the desktop one.</p>
<p>As I was thinking, many months ago, about the idea of efficiently creating different versions of the same app for different devices, a thought hit me like a ton of bricks. This is exactly the use case that the oft-mentioned &#8220;separation of concerns&#8221; is designed for:</p>
<p>Over several years, various &#8220;micro architectures&#8221; and &#8220;application frameworks&#8221; have emerged and waxed and waned in popularity. Many of these architectures are modeled around the &#8220;<a href="http://en.wikipedia.org/wiki/Model-view-controller">Model-View-Controller</a>&#8221; design pattern (or its many variations).</p>
<p>One of the key benefits that these architectures claim is that it helps you keep the pieces of your application separate, without explicit links and dependencies between them. I&#8217;ve looked into and even tried out several of these over the years. One example that is frequently used to describe the notion of separation of concerns, which I always struggled with, goes something like this:</p>
<blockquote><p>
Suppose you&#8217;re creating an app, and you build the user interface and the other logic like server communication and data processing. If you use MVC/separation of concerns, then it&#8217;s really easy to just rip out your whole user interface layer and replace it with a new one.
</p></blockquote>
<p>They usually lost me with that one. As much as I tried, I couldn&#8217;t imagine a situation in which I&#8217;d want to build my app and then just rip out the UI and replace it with a different one <a id="note1src" class="footnote" href="#note1">note 1</a>.</p>
<p>Until now.</p>
<p>Suddenly I had discovered, for myself at least, a real-world use case for the separation-of-concerns-so-you-can-swap-out-the-UI argument. If I&#8217;m building an app for the desktop and mobile, I&#8217;d like to be able to reuse my code where I can. At the same time, some functionality is only going to apply to one app or the other, so it&#8217;d be nice to be able to plug it in cleanly. Oh and by the way, the user interfaces are going to be different, so being able to swap those out is an absolute must.</p>
<p>I&#8217;d always liked micro-architectures in general, if only because I like knowing that I&#8217;m building my app using some pattern or structure that is based on developers&#8217; real-world experience. It&#8217;s much nicer than trying to invent it myself and having to deal with all the pain points they&#8217;ve already gotten over. Now that I am imagining a world where I create multiple versions of the same app, with similar functionality but different user interfaces, suddenly micro-architecture patterns have become indispensable in my mind.</p>
<h2>Conclusion</h2>
<p>These are only just a few of my thoughts about the future world of multi-screen, contextual applications. Like Lee Brimelow, I believe that going forward <a href="http://theflashblog.com/?p=1743">building multi-screen, multi-context apps is going to be a much more common scenario</a>. From my perspective as someone who thinks a lot about user experience design, and trying to optimize tools for the task and context, I think this is one of the most exciting aspects of the current technology revolution. I&#8217;ll definitely continue to share my thoughts and ideas in the future (hopefully more practical ones, too, not just abstract ones like this =)</p>
<h2>Notes</h2>
<p class="footnote" id="note1">Note 1: Just to be clear, I&#8217;m not trying to sound negative about MVC or micro-architectures/frameworks. Most of them provide many benefits, many of which are also related to the idea of separation of concerns, such as making code easier to test, making code cleaner, reducing boilerplate code, providing structure so that teams or developers who inherit a project can get going more quickly, etc. Swapping out the view layer is just one little benefit they mention. (<a href="#note1src">back</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2010/02/09/thoughts-on-multi-screen-context-app-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe opens door for creating alternative SWF players</title>
		<link>http://probertson.com/articles/2008/04/30/adobe-opens-door-fo-alternative-swf-players/</link>
		<comments>http://probertson.com/articles/2008/04/30/adobe-opens-door-fo-alternative-swf-players/#comments</comments>
		<pubDate>Thu, 01 May 2008 05:33:51 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=171</guid>
		<description><![CDATA[Adobe just announced a new project called the Open Screen Project. There&#8217;s a lot going on with the project, so I won&#8217;t try to summarize all the different points and partners. If you read through the material, you&#8217;ll see that a lot of it talks about opening the door for improving access and presentation/experience for [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe just announced a new project called the <a href="http://www.adobe.com/openscreenproject/">Open Screen Project</a>. There&#8217;s a lot going on with the project, so I won&#8217;t try to summarize all the different points and partners. If you read through the material, you&#8217;ll see that a lot of it talks about opening the door for improving access and presentation/experience for mobiles and other devices (the page describes it as &#8220;driving consistent rich Internet experiences across televisions, personal computers, mobile devices, and consumer electronics&#8221;).</p>
<p>In one sense, it&#8217;s a big bunch of companies partnering with Adobe to make it so that interactive content can be accessed on mobile phones (using Flash Player and eventually Adobe AIR, surprise, surprise). And the content isn&#8217;t supposed to be just available, but fully available, using the full capabilities of Flash Player. What? Full Flash Player running on a mobile device? <a href="http://www.engadgetmobile.com/2008/03/06/flash-on-the-iphone-apple-has-goldilocks-syndrome/">Nobody&#8217;s ever complained about that</a>, right? =)</p>
<p>But this isn&#8217;t <em>just</em> an announcement of a partnership to think about what may come someday in the future. As part of all of this, Adobe is doing some concrete things <em>today</em>. There are a few things that Adobe&#8217;s releasing/changing. The most notable of these to me is that Adobe&#8217;s changing the license restrictions on the SWF format (as well as FLV and to allow it to be used not only for creating authoring tools, but players as well. From <a href="http://www.adobe.com/openscreenproject/faq/">the FAQ page</a> (emphasis mine):</p>
<blockquote><p>Publication of an unrestricted SWF file format has long been requested by the Adobe Flash developer community. The longstanding publication of the SWF specification has fostered a vibrant ecosystem of companies and developers who create experiences with Adobe Flash technology and by removing the SWF licensing restrictions we are allowing that growing ecosystem to use the file format for any purpose, <em>including the ability to playback SWF content</em>.</p>
</blockquote>
<p>As you may know, for years Adobe (and Macromedia before them) published the SWF format specification, allowing other companies to create tools that generate SWF files. That&#8217;s why there are all those &#8220;build Flash for free online&#8221; sites and packages that hosting companies offer. That&#8217;s why <a href="http://ncannasse.free.fr/">Nicholas</a> <a href="http://blog.haxe.org/">Cannasse</a> was able to create the awesome <a href="http://www.mtasc.org/">MTASC ActionScript 2.0 compiler</a> back when the only way to compile ActionScript was through the Flash authoring tool. Heck, even Adobe used to try to compete with Flash authoring with their <a href="http://en.wikipedia.org/wiki/Adobe_LiveMotion">LiveMotion</a> <a href="http://www.adobe.com/products/livemotion/">product</a>. (<em>Try</em> being the operative word. After all, Macromedia wasn&#8217;t dumb. They&#8217;d develop Flash version X and Flash Player version X simultaneously, release them both, and only then &#8212; a few months later, really &#8212; publish the SWF spec. At that point competitors could <em>start</em> working on a competing authoring tool. For people who were targeting a very different market that was okay, but for anyone trying to go head-to-head with Flash? No chance.)</p>
<p>Anyway, the license allowed all of that without any royalties or anything. <em>However</em>, there was a big restriction on the license &#8212; if you ever looked at the SWF spec, you could not create an alternative SWF player (i.e. a Flash Player competitor). There&#8217;s a compelling reason for this &#8212; even though the player has always been free for desktop computers and hence not a direct source of revenue, Macromedia knew that it&#8217;s greatest strength was in its &#8220;write once, run anywhere&#8221; capability. Every web designer knows how horrible it is to try and design a page to look even mostly similar in all browsers &#8212; let alone exactly the same. By restricting the creation of alternative SWF players, there is much less chance of alternative &#8220;mostly but not completely&#8221; compliant players showing up on users&#8217; computers.</p>
<p>Of course, that&#8217;s in the past now. As of today the license restriction has been removed, and anyone who wants to can look at <a href="http://www.adobe.com/devnet/swf/">the SWF spec</a> and, if they choose, use that knowledge to create an alternative SWF player. (<a href="http://www.gnashdev.org/">Gnash</a> team I&#8217;m looking at you!) In my opinion, for those groups this is the next best thing to Flash Player itself being open-sourced (and maybe better, since that would put them out of a project). While this does have exactly the negative potential I mentioned above, it&#8217;s a big deal for device manufacturers. If they bet their future on Flash Player, they don&#8217;t want to be stuck if Adobe goes out of business or decides to throw away Flash to focus more on their PostScript printer driver business =) It&#8217;s a risk, and I&#8217;m crossing my fingers that we don&#8217;t get splintered Flash Players all over the place. As <a href="/articles/2007/04/11/thinking-on-open-source-flash-player/">others have said</a>, there are some benefits that hopefully outweigh the risks. Fortunately, Flash is a pretty big brand, and Adobe&#8217;s definitely <em>not</em> releasing their trademarks on Flash, Flash Player, etc. So anyone who makes an alternative SWF player will not be able to call it Flash anything. (Unless Adobe decides to create a certification program for alternative players or something like that &#8212; something which I didn&#8217;t see mentioned at all in the project pages.)</p>
<p>For Flash/Flex/AIR developers, honestly I don&#8217;t think this project opens any doors immediately, but I think it does have a lot of promise for the future. Currently, it&#8217;s pretty hard to create Flash content for a mobile device. You basically have to create a separate version for every device. Many of the devices have Flash Player burned on the ROM, so that player can never be upgraded. If you want to target one of those devices you&#8217;re stuck on Flash 4 (tell target lives forever!) When a new version of Flash Lite is released, it takes months before it is added to devices and those devices get into stores and users&#8217; hands.</p>
<p>So a lot of this is about Adobe and other companies working together to make it so that you can use the same code, targeting a player with the same capabilities, no matter whether you&#8217;re creating content for a PC or a mobile device. For example, part of the plan is to create a set of &#8220;device porting layer APIs for Adobe Flash Player.&#8221; In the words of the FAQ, these are &#8220;device-specific abstractions of Adobe Flash Player that enable it to work on different operating systems and devices.&#8221; Another notable part of the plan is to make it so that the player can be updated just like it can on a PC. Goodness knows I often wish I could update the Flash Player on my Wii!</p>
<p>Plus, the fact that Adobe&#8217;s no longer restricting who can create SWF players, and no longer charging royalties to device manufacturers who include Flash Player in their devices, means it will be cheaper, easier, and safer for companies to include Flash Player on their devices, meaning a larger market for content.</p>
<p>Anyway, I was pretty surprised by all of this, and happy for the potential future growth that this could lead to. Adobe&#8217;s once again making a big bet, and the payoff will be great for all of us if it works out.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/04/30/adobe-opens-door-fo-alternative-swf-players/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Strongly typed arrays &#8212; coming to ActionScript near you</title>
		<link>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/</link>
		<comments>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 21:35:52 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/</guid>
		<description><![CDATA[I&#8217;ve been wanting to have strongly typed arrays in ActionScript for a long time. I was pretty excited when I read that it&#8217;s part of the EcmaScript 4th edition specification (in the form of the Vector class), and much more excited when I heard that the Vector class is being included in Flash Player &#8220;Astro&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to have strongly typed arrays in ActionScript <a href="/articles/2005/03/17/strongly-typed-arrays/">for a long time</a>. I was pretty excited when I read that it&#8217;s part of the <a href="http://wiki.ecmascript.org/">EcmaScript 4th edition</a> specification (in the form of <a href="http://wiki.ecmascript.org/doku.php?id=proposals:vector">the Vector class</a>), and <em>much</em> more excited when I heard that the Vector class is being included in Flash Player &#8220;Astro&#8221; (as <a href="http://www.zeuslabs.us/2008/02/25/live-from-360flex-day-one/">announced</a> <a href="http://ech.net/blog/2008/02/26/360flex-atlanta-day-one-impressions/">at 360 Flex Atlanta</a> by Matt Chotin).</p>
<p>Since the majority of the time when someone&#8217;s using an Array in ActionScript, they really want all the elements to be the same type anyway, this is a really great addition and I think it will be used heavily. The Vector class allows (requires) you to specify the type it will contain at compile time &#8212; both for variable declarations and when creating instances. In both cases the syntax you use is a &#8220;type parameter&#8221; suffix <code>.&lt;T&gt;</code>:</p>
<pre><code>var names:Vector.&lt;String&gt; = new Vector.&lt;String&gt;();</code></pre>
<p>The type parameter syntax is part of a separate EcmaScript 4th edition proposal. Sadly they couldn&#8217;t make the syntax identical to that for generics in C# (and I believe Java does it the same way), which is almost the same but without the initial <code>.</code> (period). (For an interesting read, take a look at <a href="http://wiki.ecmascript.org/doku.php?id=discussion:type_parameters#the_bracket_issue">the history of the various options the committee members considered for representing type parameters</a>.)</p>
<p>Anyway, because you specify the type at compile time, the idea is that the compiler can do the type checking for you for adding and getting elements from a Vector instance. In addition, since using Array (and the runtime type checking and type casting that array access involves) has always been a bottleneck in ActionScript performance, I expect that performance improvements can be expected. (Okay, I&#8217;ve heard anecdotal reports around the office of <em>much</em> better performance for Vector than for Array.)</p>
<p><a href="http://blogs.adobe.com/fcheng/">Francis Cheng</a> (who&#8217;s on the EcmaScript committee) has a couple of nice articles about the  <a href="http://blogs.adobe.com/fcheng/2008/02/vectors.html">Vector class</a> and <a href="http://blogs.adobe.com/fcheng/2008/02/type_parameters_in_ecmascript.html">type parameters</a>, so I won&#8217;t bother recreating everything he&#8217;s written. Definitely worth a read (like everything he writes).</p>
<p>As an (almost) final note, I should point out that I haven&#8217;t seen anything indicating that type parameters will be generally available in &#8220;Astro&#8221; &#8212; just Matt&#8217;s announcement about the Vector class specifically.</p>
<p>And finally, on a personal note, I&#8217;m excited because I get to do the documentation for the Vector class. It&#8217;s always fun getting to write about new features that are personally valuable. And this is one that I&#8217;ve definitely been interested in for a while!</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/03/28/vector-as3-strongly-typed-arrays-redux/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Adobe AIR 1.0 ships! SQL changes, and other thoughts</title>
		<link>http://probertson.com/articles/2008/03/24/air-1_0-final-sql-changes-and-thoughts/</link>
		<comments>http://probertson.com/articles/2008/03/24/air-1_0-final-sql-changes-and-thoughts/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 21:04:26 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2008/03/24/air-1_0-final-sql-changes-and-thoughts/</guid>
		<description><![CDATA[Now that Adobe AIR 1.0 is in the wild, I wanted to post an update about changes that happened with the local SQL database functionality between beta 3 and the final release. Plus, I&#8217;ve had some general thoughts about the release of the software that I thought I&#8217;d share.
For some reason, the final time that [...]]]></description>
			<content:encoded><![CDATA[<p>Now that Adobe AIR 1.0 is in the wild, I wanted to post an update about changes that happened with the local SQL database functionality between beta 3 and the final release. Plus, I&#8217;ve had some general thoughts about the release of the software that I thought I&#8217;d share.</p>
<p class="editornote">For some reason, the final time that I saved this post before publishing it, my changes didn&#8217;t get saved. So if you saw this soon after it was posted, and wondered why it didn&#8217;t really talk about SQL changes, and why it had some messed up headings&#8230;that&#8217;s why. Sadly I&#8217;m sure I can&#8217;t recreate the text as well as I wrote it the first time. But here&#8217;s my best effort&#8230;</p>
<p>First of all, allow me to clear something up. I am aware that Adobe AIR 1.0 shipped almost exactly a month ago, so this shouldn&#8217;t be news to anyone who&#8217;s actually interested in it. I intentionally held off on publishing my thoughts (and a description of changes since beta 3). As a rule, I never post anything in the week or so following a big product announcement &#8212; there are so many &#8220;me too&#8221; posts about the product, and so little actual different thoughts or original ideas, that I don&#8217;t want to clog up the aggregaters by adding to the hubbub (the &#8220;MXNA firehose&#8221; as I&#8217;ve heard <a href="http://weblogs.macromedia.com/jd/">JD</a> describe it).</p>
<p>That&#8217;s not a complete excuse, of course. The truth is also that I&#8217;ve just gotten busy with a lot of post-launch cleanup activities, and of course moving ahead on future projects (Flash Player 10 and AIR 2.0), so I&#8217;ve neglected this post for longer than it deserved.</p>
<p>And now, lest I postpone it any longer, here are a few bits of news and opinion from my corner of the Flex/AIR world:</p>
<ul>
<li><a href="#sql_changes">Local SQL database changes</a></li>
<li><a href="#release">What does &#8220;finished&#8221; really mean?</a></li>
<li><a href="#flex3_source">Go right to the source</a></li>
</ul>
<h2 id="sql_changes">Local SQL database feature changes</h2>
<p>Wait a minute &#8212; didn&#8217;t I say a couple of months ago that as of beta 3 AIR is API frozen? Indeed that was the intention, and with one small exception it&#8217;s true. And that was the first thing that came to my mind when I read the notification (shortly after beta 3 was locked down) that some changes to the SQL functionality had been checked in to source control. But I was correct before &#8212; the API hasn&#8217;t changed &#8212; just one particular behavior has.</p>
<p>The specific change is with how the runtime treats column data types in database tables. In betas 1-3, AIR was consistent with the <a href="http://sqlite.org/datatype3.html#affinity">&#8220;default&#8221; SQLite behavior</a>:</p>
<blockquote>
<p>the type of a value is associated with the value itself, not with the column or variable in which the value is stored&#8230;. All other SQL databases engines that we are aware of use the more restrictive system of static typing where the type is associated with the container, not the value.</p>
<p>In order to maximize compatibility between SQLite and other database engines, SQLite support [<em>sic</em>] the concept of &#8220;type affinity&#8221; on columns. The type affinity of a column is the recommended type for data stored in that column. The key here is that the type is recommended, not required. Any column can still store any type of data, in theory. It is just that some columns, given the choice, will prefer to use one storage class over another. The preferred storage class for a column is called its &#8220;affinity&#8221;.</p>
</blockquote>
<p>So under the &#8220;affinity&#8221; system, if in your <code>CREATE TABLE</code> statement you specify that a column stores INTEGER data, and you write an <code>INSERT</code> statement that stores a String instance in that column, the runtime allows it. (I initially wrote &#8220;it works just fine&#8221; but that may not be true &#8212; since your application may be assuming that values retrieved from that column are always integers.) When I first read about this behavior when we were reviewing the spec for the feature, I recognized that it was different than what I&#8217;d done before, but I figured it was okay &#8212; I&#8217;d just have to be extra careful when inserting values into the database, and enforce the data types myself by convention even if the runtime didn&#8217;t enforce them in practice.</p>
<p>However, the feedback we got from developers was that this doesn&#8217;t really match what they&#8217;re used to from typical web app database code (which likely uses databases such as Oracle, SQL Server, or MySQL). As a result, in the final release, the declared data types of database columns are more strictly enforced. If you declare a data type for a column, then attempt to store a value that isn&#8217;t an instance of that type, the database will try to convert the value to the appropriate type (for example, turning a number into a string, or parsing a string to see if its text is actually a number). If the value can be converted, then the converted value is stored; otherwise, the runtime throws an error. (For more details, see <a href="http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#columnAffinity">the column affinity description in the documentation</a>.)</p>
<p>Personally I&#8217;m pretty happy with this solution. It&#8217;s still a bit more flexible than the databases I mentioned before &#8212; usually they won&#8217;t even try to convert a value, and will just choke if the data type doesn&#8217;t match. But I think that the way it works in AIR 1.0 is consistent philosophically (and actually) with <a href="/articles/2005/11/08/actionscript-3-unit-testing-recommended/">the way data types work in ActionScript 3.0</a> where values can be strongly typed or weakly typed at compile time, but either way at runtime the type must match.</p>
<p>So, what do you do if you were one of the people with more SQLite experience than other db experience, of who otherwise preferred the old behavior? Well, there is still a workaround. If you don&#8217;t declare any data type for your columns, you can store data of any type without causing errors. This isn&#8217;t the same as the previous behavior, but based on some anecdotal observations I&#8217;d guess that developers who intentionally mix data types in columns are less likely to declare a column data type, in any case.</p>
<p>Also, as a side note, I decided to keep the term &#8220;column affinity&#8221; in the documentation even though the behavior changed. I did this for a couple of reasons: 1) Developers who&#8217;d been reading the docs were probably familiar with the term now, and 2) the data types still aren&#8217;t strictly enforced, in the sense that the runtime attempts to convert values before storing them (just as a default SQLite implementation does). For example, just about anything can be stored in a TEXT column without an error occurring. So in that sense, the data type specified in a <code>CREATE TABLE</code> statement is still somewhat of an &#8220;affinity&#8221; rather than a traditional strictly enforced data type.</p>
<h2 id="release">What does &#8220;finished&#8221; really mean?</h2>
<p>Not too many years ago, my definition of a &#8220;release version&#8221; of software was different than it is now. I knew that any software, no matter how much it is tested, is bound to have <em>some</em> bugs in it &#8212; it&#8217;s just not possible to ship software of any notable size without making a mistake somewhere. However, I had enough faith in big software companies that I assumed that when a company declares a product to be a &#8220;release&#8221; or &#8220;shipping&#8221; version, that it at least doesn&#8217;t have any bugs <em>that they know of</em>.</p>
<p>I&#8217;m not sure when I realized that this view is far from reality. I suppose it was probably with the first private beta I was involved with, though maybe it was before that.</p>
<p>In any case, I hope I&#8217;m not shocking anyone&#8217;s sensibilities when I point out the reality, that even though Flex 3 and AIR 1.0 have shipped, they do have bugs &#8212; and <em>Adobe even knows it</em>! The recent openness of Flex, in particular the introduction of the <a href="http://bugs.adobe.com/flex/">public Flex bugbase</a>, makes this reality much more transparent. A quick search on the Flex SDK project, looking only at bugs (as opposed to feature requests), shows 309 &#8220;open&#8221;, &#8220;in progress&#8221;, &#8220;community&#8221;, or &#8220;new&#8221; issues. And that&#8217;s not even taking into account &#8220;deferred&#8221; bugs, such as <a href="https://bugs.adobe.com/jira/browse/SDK-14339">SDK-14339 &#8220;WindowedApplication doesn&#8217;t update/show menu when it changes during runtime&#8221;</a>.</p>
<p>While Adobe AIR doesn&#8217;t have a public bugbase, that doesn&#8217;t mean it&#8217;s any more free of bugs. Try calling the <code>NativeMenu.display()</code> method on a PowerPC Mac running OS X 10.4 and you&#8217;ll see what I mean (hint: the menu appears at the mouse cursor rather than at the specified coordinates).</p>
<p>So what does &#8220;release quality&#8221; software really mean? Well, it means that it doesn&#8217;t have any bugs that are &#8220;showstopper&#8221; issues, or that are &#8220;really bad.&#8221; Yes, I&#8217;m intentionally using non-specific terms here. The reality of life is that if Adobe (or any software company) waited to release software until all known bugs are fixed, the software would never get released. So instead, they use a process that&#8217;s sort of like this (I&#8217;m generalizing and also stating this based on my own observations, not on any review of actual process or guidelines within Adobe):</p>
<ol>
<li>The decision makers figure out a date by which the software should be done. (I&#8217;m not talking about at the beginning of a product cycle &#8212; I&#8217;m starting somewhere in the middle.)</li>
<li>Throughout the process, bugs are reported. Any time a bug is reported, it is investigated and a decision is made as to whether resources can/should be allocated to fixing it. The criteria for this decision are generally based on how severe the bug is (whether it crashes the software/computer, causes data loss, is a usability issue, etc); how hard it is to fix; how much time it will take to fix; how likely it is that someone will run into the bug; whether or not there&#8217;s a workaround; etc.</li>
<li>As the product moves closer to the release date, the threshold for whether a bug will be fixed goes up &#8212; the closer the software is to the release date, the more severe and less difficult to fix a bug must be in order for it to get fixed.</li>
</ol>
<p>This can be frustrating for people who file bugs, like me. Often, due to workload and general stability issues, it&#8217;s not practical for me to start writing the documentation for a feature until it&#8217;s fairly stable and close to finished. But that means that when I do find bugs, there&#8217;s a good chance it&#8217;s too late in the process for the bug to get fixed in time for the product release.</p>
<p>Ah, tradeoffs.</p>
<h2 id="flex3_source">Go right to the source</h2>
<p>Now that Flex 3 has shipped, the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Get+Source+Code">Flex 3 source code</a> is available in the Flex Subversion (SVN) repository. I&#8217;ve actually been accessing it there for a while &#8212; internally we made the switch from Perforce to Subversion around the first of the year. I was pretty worried at the time, because I had never used SVN before. The majority of the Flex 3 work was already done at that point &#8212; they were just in final bug fixing mode. We still had about a week before our content had to be locked down, so I was working furiously to try and finish up some work I was doing on the Flex AIR components. I wasn&#8217;t too excited about the prospect of switching source control systems in the middle of that crunch. Fortunately, SVN turned out to be pretty straightforward. (In case you&#8217;re wondering, I use <a href="http://tortoisesvn.net/">TortoiseSVN</a>). It&#8217;s actually been good for me to learn SVN at work &#8212; it made it easier for me to move some of my code projects over to Google Code (a few that are already there, and a few more that I&#8217;ve started but not posted on <a href="/projects/">my projects page</a> yet). So overall I give SVN thumbs up, and I&#8217;m happy that the Flex source code is available that way.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2008/03/24/air-1_0-final-sql-changes-and-thoughts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AIR beta 3 and local SQL database changes</title>
		<link>http://probertson.com/articles/2007/12/18/air-beta-3-and-local-sql-database-changes/</link>
		<comments>http://probertson.com/articles/2007/12/18/air-beta-3-and-local-sql-database-changes/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 19:55:51 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/12/18/air-beta-3-and-local-sql-database-changes/</guid>
		<description><![CDATA[Note: Sorry for the delay on this article. I composed this article a couple of weeks ago, and then I got busy with work and holidays and I forgot and didn&#8217;t publish it until now =(
If you&#8217;ve been following my posts on AIR and the SQL database functionality, you may have noticed a trend: every [...]]]></description>
			<content:encoded><![CDATA[<p class="editornote">Note: Sorry for the delay on this article. I composed this article a couple of weeks ago, and then I got busy with work and holidays and I forgot and didn&#8217;t publish it until now =(</p>
<p>If you&#8217;ve been following my posts on AIR and the SQL database functionality, you may have noticed a trend: every time there&#8217;s a new beta, I tend to go silent for a few weeks beforehand as I try to get things finished up with the documentation. Well, here we went again &#8212; another period of silence, another AIR beta.</p>
<p>The marketing team kept things pretty low-key with announcing this new beta, especially compared to previous rounds. I&#8217;m not sure of all the reasons for that, but there are a few that are important and helpful for you to know if you&#8217;re developing AIR applications:</p>
<ul>
<li>AIR is now API-frozen &#8212; as of this beta, there <strong>shouldn&#8217;t</strong> be any changes to the AIR apis. In fact, the goal was to have as few API changes as possible between AIR beta 2 and AIR beta 3, as things get closer to being locked down. Naturally, if we find a big security issue that requires us to change an API, we&#8217;re going to consider it &#8212; but aside from that, things are now the way they will be for AIR 1.0 (phew &#8212; it&#8217;s been tiring for me to update apps every beta, and I&#8217;m sure it has been for you, too).</li>
<li>Along with the new AIR beta, Adobe also released a beta of a new product code-named &#8220;<a href="http://labs.adobe.com/technologies/blazeds/">BlazeDS</a>&#8221;. This very cool offering is a free, open-source, slimmed down LiveCycle Data Services &#8212; basically it includes the RPC Components (&#8220;Flash Remoting&#8221;) functionality as well as the Messaging functionality. In addition, we&#8217;re releasing an official specification for the AMF format. While the format was (for the most part) reverse-engineered long ago, I think it&#8217;s great to have something official for all the other open-source offerings like <a href="http://www.amf-php.org/">AMFPHP</a>, <a href="http://www.fluorinefx.com/">Fluorine</a>, etc. to work from.</li>
<li>Along with beta 3, Adobe created the &#8220;<a href="http://www.adobe.com/go/marketplace">Adobe AIR Marketplace</a>&#8221; where developers can post apps for people to download and try out &#8212; basically an extension of the
<li><a href="http://labs.adobe.com/technologies/flex/flexbuilder3/">Flex 3 beta 3 is officially the last Flex 3 beta before Flex 3/AIR 1.0</a> (second paragraph, also in the <a href="http://labs.adobe.com/technologies/flex/faq.pdf">FAQ PDF</a>). &#8216;nuff said =)</li>
</ul>
<p>Of course, following the trend of my going silent before each beta, you can expect that to be magnified as we continue leading up to AIR 1.0. There have been a few things each beta that I wanted to do but had to put off until later &#8212; but of course, this time there isn&#8217;t any &#8220;until later&#8221; &#8212; so it&#8217;s now or never!</p>
<p>Talking specifically about the local SQL database functionality, there were only a few changes this beta, but they&#8217;re pretty significant and maybe even a bit sneaky so you&#8217;ll want to pay attention to them:</p>
<ul>
<li>
<p>Specifying synchronous and asynchronous execution: Synchronous database execution was added to SQLConnection in beta 2. At that point, to specify that a SQLConnection&#8217;s operations were synchronous rather than asynchronous, you had to specify a <code>true</code> parameter in the <code><a href="http://livedocs.adobe.com/labs/flex3/langref/flash/data/SQLConnection.html#SQLConnection()">SQLConnection()</a></code> constructor. Now, however, the <code>SQLConnection()</code> constructor doesn&#8217;t accept any parameters. Instead, you specify the execution mode when you open the connection to the main database. To specify that you want to use synchronous execution, you call the <code><a href="http://livedocs.adobe.com/labs/flex3/langref/flash/data/SQLConnection.html#open()">SQLConnection.open()</a></code> method; to specify async execution, you call the new <code><a href="http://livedocs.adobe.com/labs/flex3/langref/flash/data/SQLConnection.html#openAsync()">SQLConnection.openAsync()</a></code> method.</p>
<p>The most important thing to note surrounding this change is this: <em>if you&#8217;re migrating an app from beta 2 to beta 3, you may be changing the behavior of your app without even realizing it!</em> If you want a connection to be synchronous, you&#8217;ll know you have to change things because the code won&#8217;t compile (<code>SQLConnection()</code> no longer accepts a parameter). However, if you <em>want</em> you connection to be asynchronous, then if you don&#8217;t change anything the code will still work but it will actually use synchronous rather than asynchronous execution. If you have a long-running query and it&#8217;s freezing the UI now, that&#8217;s probably the reason &#8212; the exact code you used previously to specify asynchronous execution (no <code>SQLConnection()</code> parameter, and <code>open()</code> to connect the db) now is the way to specify <em>synchronous</em> execution. If your code doesn&#8217;t cause any errors, you might not even notice immediately because the SQLConnection and SQLStatement events are still triggered even in synchronous execution &#8212; so your &#8220;success&#8221; event listeners will still get called (but error listeners won&#8217;t &#8212; the operations will throw exceptions instead).</p>
</li>
<li>There were a couple of changes to the SQLError class and related classes: The <code>SQLError.code</code> property was removed (because it already inherited <code>errorID</code> from Error) and the <code>details</code> property was added, providing a more detailed error message in certain cases. Along with this, the SQLErrorCode class was removed entirely (tragically &#8212; I spent a fair amount of time hammering out those error descriptions with Jason, the engineer for the feature).</li>
</ul>
<p>I think that&#8217;s it, but please let me know if I&#8217;ve forgotten another change!</p>
<p>In the mean time, In addition to the SQL database stuff I&#8217;ve been doing more with another part of AIR that I&#8217;ve previously been working on as I&#8217;ve had time &#8212; the AIR-related Flex components. This release includes a new one, the FlexNativeMenu component, which is pretty slick. Watch for more on this in the (hopefully near) future!</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/12/18/air-beta-3-and-local-sql-database-changes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Player Astro&#8217;s identity crisis (or &#8220;What will ActionScript be like when it &#8216;grows up&#8217;?&#8221;)</title>
		<link>http://probertson.com/articles/2007/10/15/future-actionscript-apis-high-level-or-low-level/</link>
		<comments>http://probertson.com/articles/2007/10/15/future-actionscript-apis-high-level-or-low-level/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 20:09:19 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/10/15/future-actionscript-apis-high-level-or-low-level/</guid>
		<description><![CDATA[Note: On Nov. 1, 2007 I made a small change to the title of this article. The original title was &#8220;Flash Player Astro&#8217;s personality conflict&#8230;&#8221; (substituting &#8220;identity crisis&#8221; in the current title with &#8220;personality conflict&#8221;). However, I realized that &#8220;personality conflict&#8221; wasn&#8217;t the most accurate term for what I was trying to communicate, and &#8220;identity [...]]]></description>
			<content:encoded><![CDATA[<p class="editornote">Note: On Nov. 1, 2007 I made a small change to the title of this article. The original title was &#8220;Flash Player Astro&#8217;s personality conflict&#8230;&#8221; (substituting &#8220;identity crisis&#8221; in the current title with &#8220;personality conflict&#8221;). However, I realized that &#8220;personality conflict&#8221; wasn&#8217;t the most accurate term for what I was trying to communicate, and &#8220;identity crisis&#8221; seemed like a better fit.</p>
<p>If you attended the North America MAX 2007 conference or tried to keep up with the news that was pouring out, you probably know that <a href="http://aralbalkan.com/1048">in the day 1 keynote address Emmy Huang and Justin Everett-Church demoed three new features of &#8220;Astro&#8221;</a> (the &#8220;next version&#8221; of Flash Player):</p>
<ul>
<li>An improved text engine, allowing new capabilities like bi-directional text, re-flowing column text fields, and more.</li>
<li>The ability to create custom graphic filters, rather than being limited to the built-in set  in ActionScript.</li>
<li>&#8220;Postcards in space&#8221; 3D transformations that can be applied to display objects to position/rotate them in 3D space.</li>
</ul>
<p>I think there&#8217;s something funny about these three features and the way they&#8217;ve chosen to implement them. I didn&#8217;t really notice it when I first watched the demo video (no, I wasn&#8217;t at MAX), but later it jumped out at me as I was reading some of the responses to the demo in the PaperVision 3D email list, and even more so as I listened to <a href="http://theflashblog.com/?p=287">the video interview that Lee Brimelow did with Justin Everett-Church later during MAX</a>, in which Justin clarifies and expands on the three Flash Player features that were described. If you don&#8217;t want to jump away to watch the video (although it&#8217;s really good for understanding the new features) here&#8217;s a transcript of the most important statements Justin makes relating to my idea:</p>
<blockquote><p>
(:29) Justin: &#8220;[Astro&#8217;s &#8216;3D effects&#8217; and PaperVision 3D] are kind of <strong>fairly different from each other</strong>&#8230;<strong>3D effects is kind of &#8216;3D for the rest of us&#8217;</strong>. If you wanted to try and use the 3D effects to do more complicated things there may be some APIs that might help you but you know PaperVision&#8217;s an excellent solution, you&#8217;re just not going to replace one with the other, they&#8217;re going after different objectives.&#8221;
</p></blockquote>
<blockquote><p>
(2:40) Lee: &#8220;There was a lot [of buzz] around filters and the ability to create your own filters, and we heard &#8216;Hydra&#8217; mentioned. So what exactly is it? Is it a new programming language?&#8221;</p>
<p>Justin: &#8220;So Hydra is a new language, it&#8217;s a pixel shader language. The Hydra language itself is <strong>very consistent with other pixel shader languages&#8230;the port between [Hydra and other pixel shader languages] is really easy</strong>.&#8221;
</p></blockquote>
<blockquote><p>(4:10) Justin: &#8220;So our new text layout engine is <strong>really a group of hooks in the Flash Player</strong> that are <strong>lower level than we&#8217;ve ever had before</strong>. On top of that we&#8217;re building a series of components so they will do things like multi-column flow, inline HTML, bidirectional text, ligatures, lots of complex [?] sorts of things. But <strong>those components are developed in ActionScript 3.0</strong> and will be deployed as part of your application. <strong>The hooks that are there are going to be exposed to developers</strong> so if you want to build your own component, if what we do isn&#8217;t exactly suiting your needs then you&#8217;ll be able to build a first-class text control.&#8221;
</p></blockquote>
<p>Notice that, based on the way Justin describes it, the idea for the improved text engine is that the actual functionality provided by Flash Player/ActionScript is very low-level, and Adobe provides components that give the higher level functionality we expect from a standard text field object (as well as additional enhanced versions).</p>
<p>Think about that for a moment.</p>
<p>Imagine if the flash.text.TextField class, the display object that&#8217;s used any time text is displayed in an ActionScript app, were actually a component on top of some lower-level API &#8212; and non-Adobe developers could freely write their own version of the TextField class, using those same low-level APIs.</p>
<p>By the same token, imagine if the built-in filters (the flash.filters.* classes) were actually &#8220;components&#8221; or library classes written on top of some lower-level API. (In fact, I think that&#8217;s how lots of developers see them, especially since they all derive from the flash.filters.BitmapFilter base class &#8212; with the notable issue that developers can&#8217;t create their own BitmapFilter subclasses and use them in ActionScript.) So imagine if you <strong>were</strong> allowed to create your own BitmapFilter subclass, and Flash Player would use it along with any of the Adobe-provided filters.</p>
<p class="editornote">Yes, obviously the low-level aspect of the filters involves writing them in Hydra, not in ActionScript, and I really don&#8217;t have any idea how that&#8217;s all going to get hooked together. Just bear with me &#8212; I&#8217;m trying to describe big concepts here, not small details =)</p>
<p>Can you see what I&#8217;m getting at? That&#8217;s exactly what&#8217;s happening with two of the three new Flash Player features that were presented at MAX &#8212; Adobe is providing a low-level API, much lower than what most developers are going to need to use, and then they&#8217;re also providing components or libraries that will be the standard tool that most people will actually use. I think that&#8217;s an interesting approach, and one that the advanced developer community is going to really latch on to even while it doesn&#8217;t cause any pain or extra work for the typical developer.</p>
<p>However, compare that to the 3D (or 2.5D, as it&#8217;s often called) functionality that was shown at MAX. As Justin says, it&#8217;s intentionally a high-level API &#8212; 3D &#8220;for the rest of us&#8221; &#8212; compared to projects like PaperVision 3D that are working to provide full-fledged 3D modeling, textures, virtual world capabilities, etc. The PaperVision community <a href="http://osflash.org/pipermail/papervision3d_osflash.org/2007-October/011495.html">isn&#8217;t</a> <a href="http://osflash.org/pipermail/papervision3d_osflash.org/2007-October/011567.html">so</a> <a href="http://osflash.org/pipermail/papervision3d_osflash.org/2007-October/011568.html">thrilled</a> about this. Naturally they don&#8217;t think the player needs a high-level 3D API &#8212; they see PaperVision as providing the high-level API, and <a href="http://osflash.org/pipermail/papervision3d_osflash.org/2007-October/011581.html">they&#8217;d much rather see the player provide new low-level APIs and/or improved processing power that allows them to do more, better</a> with their higher-level APIs. (I&#8217;m paraphrasing and probably mis-describing this to some extent, since by I am by no means a 3D expert or even intermediate-level developer.)</p>
<p class="editornote">As another aside, it occurs to me that the idea that Flash Player APIs are &#8220;high level functionality provided by the Flash Player team written in ActionScript&#8221; isn&#8217;t actually new. It&#8217;s a well-known fact that a notable amount of the Flash Player functionality is actually written in ActionScript and not in C++ or C or assembler code. In those cases the only difference between the built-in functionality and an external ActionScript library that you or I write is that the ActionScript code comes pre-installed in Flash Player and doesn&#8217;t have to be part of a SWF file download. An interesting historical note related to this is the history of the XML class (the old-school one that lives on as flash.xml.XMLDocument). The XML class was introduced in Flash Player 5, and in that release it was written entirely in ActionScript and consequently suffered from some speed issues in how it parsed XML. The ActionScript developer community (<a href="http://www.waxpraxis.org/">Branden Hall</a>, I believe) wrote an alternative implementation known as XMLNitro that was faster than the built-in one. Back then in ActionScript 1, it was fairly straightforward to &#8220;redefine&#8221; methods of the built-in classes so that the player used your own ActionScript code instead, so that&#8217;s what many people did to get faster XML parsing. Funny, isn&#8217;t it, that with the newer constructs added in ActionScript 2.0 and ActionScript 3.0, we&#8217;ve also lost some functionality &#8212; namely the ability to overwrite built-in functionality with our own code. That was <em>definitely</em> a low-level capability that was previously available in Flash Player.</p>
<p>Interestingly, even in modern (i.e. post Adobe-Macromedia merger) history this idea of &#8220;low level APIs with higher-level components on top for normal use&#8221; isn&#8217;t completely new in &#8220;Astro&#8221;. One obvious precedent is the Flex framework; however, the example I&#8217;m thinking of is part of the Flash authoring tool. Historically Flash authoring was released simultaneously with new versions of Flash Player, and consequently there were always new authoring tool features that corresponded to new player features (obvious example: the filters and blend modes that were added in Flash 8 to Flash authoring as visual tools and to Flash Player as ActionScript APIs). Interestingly, however, in Flash CS3 there were some authoring tool features that were added that didn&#8217;t have a corresponding player API. Specifically I&#8217;m referring to the &#8220;copy motion as ActionScript&#8221; feature that allows you to select a tween sequence on the timeline and copy it &#8220;as ActionScript&#8221; &#8212; the animation becomes ActionScript code that you can paste somewhere and use to re-create the animation programmatically. What I think is notable about that authoring tool functionality is that the pasted code doesn&#8217;t work as-is via a player API &#8212; rather, it requires some external ActionScript libraries that were included with Flash CS3 (the fl.motion.* and fl.transitions.* packages). So the functionality underlying that feature of Flash CS3, one of the headline features of the product (created by none other than <a href="http://www.robertpenner.com/">Robert Penner</a>), was completely independent of the core Flash Player APIs and was instead provided by an external library.</p>
<p>Think about it this way: the Flash authoring tool team wanted to include functionality that wasn&#8217;t provided in core Flash Player ActionScript. It was specifically a &#8220;high level&#8221; type of functionality &#8212; simple scripted animation. Other people have written their own APIs to do the same thing, using the ActionScript &#8220;low level&#8221; APIs (display object properties, enterFrame events, etc.) and the Flash authoring &#8220;high level&#8221; approach does the same thing &#8212; it provides a library of code to simplify a certain task, so that users can easily create the effects they want, within the limitations of the high level library. I see this as another existing example of this idea of core ActionScript providing low-level functionality, with third parties <strong>and also Adobe</strong> providing high-level functionality in the form of ActionScript libraries that build on top of that low-level functionality.</p>
<p>Now, going into the future, there is a new Flash Player feature that allows the player to cache certain Adobe-approved code libraries, so the user downloads them once and then they&#8217;ve got them for every future site they visit that uses the same library. We&#8217;ve heard that the Flex framework is going to be the first such &#8220;cacheable&#8221; library. However, if this feature had existed earlier it could obviously have been used for the ActionScript classes that are used to support the Flash CS3 simplified animation (&#8220;copy motion&#8221;) functionality. For that matter, the Flash CS3 UI components could be given the same treatment and be available as a cacheable library, although that might be less necessary by virtue of their &#8220;intentionally lightweight&#8221; design.</p>
<p>While I really can&#8217;t say for sure, it seems like it&#8217;s not a stretch that the new text components would be distributed this way, especially since, as Justin points out, &#8220;those components are developed in ActionScript 3.0 and will be deployed as part of your application.&#8221;</p>
<p>I think that, going into the future, this is a potential direction I can see Flash Player and ActionScript moving in:</p>
<ul>
<li>Flash Player/core ActionScript provides low-level APIs</li>
<li>Adobe provides components or libraries written in ActionScript that provide high-level-enough (&#8220;medium-level&#8221;?) functionality such that most common use cases and functionality are provided for. Probably these components/libraries are external, player-cacheable code libraries rather than part of Flash Player itself.</li>
<li>Third-party developers can likewise create their own components and libraries that either build on the Adobe-provided components/libraries or provide alternate implementations.</li>
</ul>
<p>Of course, the obvious exception to this way of working is the new 3D effects, which are very high level and are essentially the end user functionality, rather than providing low-level building blocks on which Adobe and/or third party developers can build more robust libraries.</p>
<p>What do you think of this future? Does it sound good, or scary? I&#8217;d love to hear your thoughts on this one&#8230;</p>
<p class="editornote">Disclaimer: While I am an Adobe employee, I actually had very little knowledge of these &#8220;Astro&#8221; features until watching the MAX keynote presentation. I had heard general descriptions of some of them, but certainly nothing like the level of detail that was given by Emmy and Justin in the keynote and follow-up interview. Likewise, since then I haven&#8217;t gotten any additional &#8220;insider&#8221; information about these or other future Flash Player features. Obviously some of what I say in this post is speculation about the future, and I readily admit that it is indeed speculation and nothing more &#8212; I don&#8217;t have insider knowledge on this, and I might be completely wrong about all of it. =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/10/15/future-actionscript-apis-high-level-or-low-level/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The future of Flex application frameworks-my thoughts</title>
		<link>http://probertson.com/articles/2007/10/12/flex-frameworks-future/</link>
		<comments>http://probertson.com/articles/2007/10/12/flex-frameworks-future/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 16:55:14 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Application Design]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/10/12/flex-frameworks-future/</guid>
		<description><![CDATA[This post started out as my notes from the Oct. 11, 2007 SilvaFUG user&#8217;s group meeting, which included two talks on Flex application frameworks, but by the end I realized it was more of a restatement of (filtered through my opinion) some of the important forward-looking ideas that came out of the audience discussions and [...]]]></description>
			<content:encoded><![CDATA[<p>This post started out as my notes from the Oct. 11, 2007 SilvaFUG user&#8217;s group meeting, which included two talks on Flex application frameworks, but by the end I realized it was more of a restatement of (filtered through my opinion) some of the important forward-looking ideas that came out of the audience discussions and the presentations at that meeting. So I think it rambles more than I would normally like, but I was trying to capture my &#8220;raw thoughts&#8221; while the meeting was progressing.</p>
<p>If you&#8217;re interested in a summary of the talks, I&#8217;m afraid I didn&#8217;t do that. (But I highly recommend viewing the presentations:</p>
<ul>
<li><a href="http://adobechats.adobe.acrobat.com/p49294102/">Grant Strake on moving ZoomFlex from a homegrown framework to Cairngorm</a></li>
<li><a href="http://adobechats.adobe.acrobat.com/p12266504/">Ali Mills and Luke Bayes comparing various Flex application frameworks</a></li>
</ul>
<p>What I&#8217;ve written here is primarily just thoughts that I wanted to save for myself; things that maybe I don&#8217;t think about as often as I should, or things I want to remember about the audience of Flex and other Adobe developer products. Because I&#8217;m interested in the developer community, much of the focus is on points about the developer community that I sometimes need to remind myself of.</p>
<h2>Grant Straker</h2>
<p>The first speaker was Grant Straker, talking about his company&#8217;s choice to use a homegrown framework, and eventual decision to migrate it to Cairngorm instead. His company (<a href="http://www.strakerinteractive.co.uk/">Straker Interactive</a>) has a RAD product (&#8220;ZoomFlex,&#8221; I believe it&#8217;s called) that bundles ColdFusion and Flex to create apps quickly &#8212; you use wizards to define data structures, and the product generates database structure, backend ColdFusion, and front-end Flex code for apps using that data. (The idea is that developers then take those Flex files and customize the front-end forms, style the app, etc.)</p>
<p>Here are some interesting thoughts/points I picked up:</p>
<ul>
<li>Originally they chose not to use Cairngorm for the underlying framework for their generated code. The reason: while there are some developers who build big, fancy, complex enterprise apps, there&#8217;s also a group of developers who &#8220;just want to know what they need to know to get their job done&#8221; &#8212; which often means build basic CRUD apps as quickly and easily as possible (e.g. web-enabling existing databases, spreadsheets, etc.). This latter group was/is more in their target audience.</li>
<li>Code can be written in different ways &#8212; they try to generate code so that it&#8217;s clear and obvious what it does, and so that it can be easily extended by developers of varying levels of experience (key: don&#8217;t assume a high level of experience).</li>
<li>In retrospect, he wishes they had just stuck with Cairngorm in the beginning. Now, 1.5 years later, there&#8217;s a large community, examples, documentation, etc. making it easier for a less-experienced developer to learn enough Cairngorm that they can understand it and use it.</li>
<li>I was really amazed by how much code they are able to generate for developers. I&#8217;ve read some things about code generation tools, but I&#8217;ve never tried them out (due to the organizations I&#8217;ve worked for, and perhaps due to my personality as a developer who likes to have &#8220;control&#8221; of the code). However, I&#8217;ve definitely seen the down side of that, which is that I end up writing a lot of redundant or very similar code (especially for data access and manipulation). The &#8220;alternative&#8221; approach certainly has some attractions&#8230;</li>
<li>Part of what they include is a library of pre-built UI components. The process of migrating these components to Cairngorm has been challenging at times. One of the principles of many frameworks including Cairngorm is that the user interface code is separate from the &#8220;model&#8221; (the underlying data). However, some components by nature lend themselves to having knowledge of their underlying data (e.g. their video player component) so figuring out how to structure those components is complicated.</li>
</ul>
<h2>Luke Bayes and Ali Mills - Evaluating application frameworks for Flex</h2>
<p><a href="http://asserttrue.com/">Luke and Ali</a> came into this presentation with no background in any of the major frameworks (other than the Flex framework). This is good because they didn&#8217;t have any biases, but it means they may have some non-best-practices too.</p>
<p>This was a great talk, but there was a lot of info in a short time so again, I&#8217;m not going to bother trying to write detailed notes. I highly recommend watching <a href="http://adobechats.adobe.acrobat.com/p12266504/">the recording</a>.</p>
<p>However, once again in this presentation (in particular in the discussion afterwards) some of the same ideas came up. Luke in particular expressed a reluctance to have a prescriptive framework, because he doesn&#8217;t want to be &#8220;told how to code.&#8221; That opinion resonated with most of the audience there &#8212; but at the same time, everyone also acknowledged that the audience at a user&#8217;s group presentation isn&#8217;t really an accurate representation of the broad Flex developer community (especially the even broader community of developers who are considering Flex or who will be Flex developers in the future). If the Flex community is going to continue to grow, and be more accessible to new developers, it would be very helpful to have some prescriptive application frameworks that give people a predefined, standard architecture within which they can build their app (in the same way that Flex&#8217;s components provide user interface elements and layout elements that give developers a big head-start in building an app, compared to straight ActionScript or Flash).</p>
<p>What is the &#8220;next frontier&#8221; of Flex developers? Is it the &#8220;VB developer&#8221;<a class="footnote" href="#noteVBDeveloper">1</a> (the &#8220;behind-the-firewall&#8221; corporate developer). If so, then to support that group of developers we&#8217;re going to need prescriptive frameworks that are easy to get into (&#8220;accessible&#8221; in Luke and Ali&#8217;s terms), that do as much work for you as they can, but that still don&#8217;t get in the way as an app grows in complexity.</p>
<p>At the same time, more advanced Flex developers may not want such a framework, and they certainly aren&#8217;t going to want to have to carry along the &#8220;baggage&#8221; (meaning both prescriptive architecture imposed on them, and literal baggage in download size) that would come along with such a framework if they&#8217;re not using it.</p>
<p>Personally, I think that&#8217;s an extremely important point for both Adobe and third-party framework developers to keep in mind going into the future.</p>
<p id="noteVBDeveloper">&#8220;VB Developer&#8221; is my name for a developer who works in a medium-large corporation or organization, perhaps coding apps for a group within that organization, who doesn&#8217;t really want to learn everything there is to know about Flex (or their language of choice), or become a &#8220;guru,&#8221; but rather just wants to build their app and make it work nicely, but do so as quickly and painlessly as possible. Yes, the name &#8220;VB developer&#8221; is rather dated, since at this stage in history most such developers are doing web-based apps, probably using ASP.NET or J2EE in a large, standardized org or perhaps PHP or Ruby in a smaller or more independent group.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/10/12/flex-frameworks-future/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why doesn&#8217;t Adobe&#8217;s AIR dev guide mention SQLite? A response to Tim Anderson</title>
		<link>http://probertson.com/articles/2007/06/19/air-sql-docs-dont-mention-sqlite-my-response/</link>
		<comments>http://probertson.com/articles/2007/06/19/air-sql-docs-dont-mention-sqlite-my-response/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 03:11:44 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[local SQL database]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/06/19/air-sql-docs-dont-mention-sqlite-my-response/</guid>
		<description><![CDATA[Yesterday Tim Anderson asked a question: &#8220;Why doesn&#8217;t Adobe&#8217;s AIR dev guide mention SQLite?&#8221; As the author of the &#8220;Working with local SQL databases&#8221; chapter in the AIR Developers Guide that Tim refers to, as well as the related sections of the AIR language reference, I guess I know better than most people the answer [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday Tim Anderson asked a question: &#8220;<a href="http://www.itwriting.com/blog/?p=253">Why doesn&#8217;t Adobe&#8217;s AIR dev guide mention SQLite?</a>&#8221; As the author of the &#8220;<a href="http://livedocs.adobe.com/labs/air/1/devappsflex/SQL_01.html">Working with local SQL databases</a>&#8221; chapter in the AIR Developers Guide that Tim refers to, as well as the <a href="http://livedocs.adobe.com/labs/flex/3/langref/localDatabaseSQLSupport.html">related</a> <a href="http://livedocs.adobe.com/labs/flex/3/langref/flash/data/package-detail.html">sections</a> of the AIR language reference, I guess I know better than most people the answer to that question. Unfortunately, although it was a consciously considered decision that underwent a reasonable amount of discussion, I can&#8217;t promise that the reasoning is absolutely irrefutable logic that will stand the test of time. But then, if it was, Tim probably wouldn&#8217;t have asked the question =)</p>
<p class="editornote">Note: This post won&#8217;t make as much sense unless you read <a href="http://www.itwriting.com/blog/?p=253">Tim&#8217;s post</a> first. So I&#8217;ll pause for a moment while you go read it &#8212; don&#8217;t worry, it&#8217;s not nearly as long as this one =)</p>
<p>As suggested by John Dowdell in the comments on Tim&#8217;s post, the biggest reason why SQLite isn&#8217;t mentioned by name in the documentation is a somewhat complex matter involving the timing of when the feature was developed, deadlines for when the documentation had to be done in order to include it in the beta release, and the timing of when Google Gears was announced.</p>
<h2>Background: Development schedules, marketing announcements, and the realities of human limits</h2>
<p>If you don&#8217;t mind, I&#8217;ll start off with a bit of background/context on the timing of the local SQL database feature being developed and the agreement with Google.</p>
<p class="editornote">Note: Admittedly I&#8217;m making educated guesses on the timing described here, based on things I observed but without actually being involved in the conversations between Adobe and Google.</p>
<p>Before any sort of agreement about synchronized APIs and common code had been reached, perhaps before it had even started, Adobe, and presumably Google, had both separately developed most of their respective implementations of database functionality based on SQLite. Naturally, at the point that they agreed to make their APIs agree with each other, both companies could have chosen to postpone releasing their implementations until the final, synchronized API was finished. Not surprisingly, both companies felt it was more important to get something out to developers sooner (even if it wasn&#8217;t the &#8220;synchronized API&#8221;) rather than later when things were final. From a public visibility perspective, Google made their announcement first, so they have the benefit of being perceived as the &#8220;original&#8221; and I expect many developers expected the AIR API to be identical when it was released (about a week and a half later, it&#8217;s important to note). </p>
<p>I wasn&#8217;t involved in any of the planning or discussion surrounding the AIR-Google Gears &#8220;synchronized API&#8221; decision, and in fact I didn&#8217;t know anything about it until I read the public announcements. (If you can, imagine <em>my</em> reaction when I read that the APIs were going to be aligned &#8212; since I had just finished the API reference documentation the previous week! =) The fact that I wasn&#8217;t involved in the conversations doesn&#8217;t bother me and makes sense to me &#8212; there wasn&#8217;t really any compelling reason why I should have been involved in those conversations &#8212; but obviously that had a direct impact on my ability to anticipate the consequences of that announcement while I was writing the documentation. By the time the announcement was made, it was too late to go back and change the documentation, and <em>definitely</em> too late for us to actually change the API.</p>
<p>With that background, let me address some of the specific points that Tim raises. He asks the question, &#8220;why doesn&#8217;t Adobe&#8217;s AIR dev guide mention SQLite?&#8221;, and gives three points about why he isn&#8217;t pleased that SQLite isn&#8217;t mentioned:</p>
<h2>1. &#8220;It stinks&#8221;</h2>
<p>Of course, what I&#8217;ve said up to this point suggests that, were it not for the Google Gears announcements, Adobe might not have ever announced that we are using SQLite. I can&#8217;t speak for alternative futures, of course, but I think it&#8217;s possible that Adobe would never have mentioned SQLite in the documentation. Does that &#8220;stink&#8221; as Tim suggests? Is it discourteous? I can definitely understand the sentiment behind those expressions. I&#8217;m a firm believer in &#8220;credit where it&#8217;s due.&#8221; When I wrote the documentation, I certainly didn&#8217;t mean it as a discourtesy or to minimize my opinion of the value of SQLite that SQLite was not mentioned. I think SQLite is a great tool, and I&#8217;m very glad it exists, and that the authors have been so generous with the license.</p>
<p>On the other had, as Tim notes, Adobe has no legal obligation to acknowledge that they included source code from SQLite. Nor does Adobe have any obligation to acknowledge that a significant part of the documentation on the SQL dialect was adapted from the SQLite documentation, because the authors were even kind enough to secure public domain releases for the documentation &#8212; although I will readily admit that I did in fact adapt portions of the SQLite documentation &#8212; which was very helpful because it saved me a lot of duplicate effort!</p>
<p>So, were we intentionally trying to hide the fact that it was SQLite? No, although we chose not to advertise the fact either, for a few reasons:</p>
<ul>
<li>Our intention was to provide sufficient documentation so that a developer wouldn&#8217;t have any need to look at the SQLite documentation. (In fact, due to the short time frame for getting things done, one idea that was considered and rejected was just to point developers to the SQLite documentation for the first beta release.) With that decision made, we realized that there wasn&#8217;t any <em>absolute</em> need to make reference to SQLite.</li>
<li>In many respects, the choice of SQLite was originally considered to be an &#8220;implementation detail&#8221; &#8212; something that developers didn&#8217;t really need to know or care about. Obviously in the wake of the Google Gears announcements, there is now more reason why it <em>does</em> matter (to some developers) that Adobe chose to use SQLite.</li>
<li>
<p>In fact, when you get down to it, the choice of SQLite could <em>still</em> be considered an &#8220;implementation detail.&#8221; After all, consider what happens in the future when AIR version 5 or 10 is released. What if SQLite is no longer the best choice for an embedded database? Should AIR developers be limited by the fact that AIR is absolutely tied to SQLite? As long as the API continues to work, and the older file-format databases are supported, and older applications continue to run, how much does it matter whether the embedded database is SQLite or something else?</p>
<p>Obviously that&#8217;s not a highly likely scenario. From a practical standpoint, even if another database engine were used, it would be pretty involved to ensure backwards compatibility, both with the API and especially with the supported SQL dialect.</p>
</li>
</ul>
<p>In summary, when the time came to decide whether to explicitly mention SQLite in the documentation, it came down to this. As we all know, it&#8217;s common practice in the software industry, including at Adobe, that when a certain aspect of a feature is considered an &#8220;implementation detail&#8221; and &#8220;not important to developers,&#8221; that aspect of the feature isn&#8217;t described in the documentation. Sometimes developers find out anyway, either through their own experimentation, or through experience, or whatever. Even if Adobe didn&#8217;t announce that the AIR local database engine was based on SQLite, it&#8217;s highly likely that it would have come out sooner rather than later. That&#8217;s fine &#8212; developers can choose to use the knowledge they acquire, and Adobe can choose to change things that aren&#8217;t documented.</p>
<p>As I&#8217;ve said, at the time the documentation was being written and finalized, the word I was going on was that the fact that the engine uses SQLite is an implementation detail. I gave some thought to whether we should explicitly mention that the database uses SQLite &#8212; certainly there were advantages and disadvantages either way. The issue was discussed by me, members of management, and the lead engineer for the feature. In the end, however, for the reasons listed above, and without any knowledge (at least on my part) of the very-soon-to-be-forthcoming Google Gears alignment announcement, we decided that the priorities fell on the side of not stating that the database uses SQLite.</p>
<p>Having said all that, as a result of the announcements relating to Adobe AIR and Google Gears, it <em>is</em> public knowledge that Adobe is using SQLite. Although it may not make sense to anyone but me, that announcement &#8220;changes the balance&#8221; of priorities in my mind, so in fact at this point I agree with Tim that the benefits of mentioning in the documentation that the database uses SQLite (giving credit where it&#8217;s due, and guiding developers to other SQLite tools that might help them) outweigh the potential downsides of stating it in the documentation (the unlikely but can&#8217;t-rule-it-out-completely possible future case in which we no longer use SQLite for the underlying database engine, and the possibility of distracting/confusing developers who read the SQLite documentation and find something that&#8217;s not supported in AIR and wonder why).</p>
<p>Even as I write this, I acknowledge that my stated set of reasons, and this description of trying to find the best balance between the tradeoffs of &#8220;officially&#8221; disclosing information versus &#8220;officially&#8221; keeping information &#8220;undocumented&#8221; sounds very fuzzy. And I agree that the value of giving credit to the authors of SQLite is a compelling reason for stating in the documentation that AIR uses SQLite. I&#8217;m afraid I can&#8217;t completely communicate <a href="/articles/2007/06/11/adobe-air-local-sql-databases-and-my-role/#personal">how fast and furiously we were working to get this feature (and the associated documentation) done</a> for the beta, and consequently how we tried to make the best choices we could in a limited time frame. And again, without the smallest clue of the then-forthcoming Google Gears announcement.</p>
<p>Fortunately, as Tim points out, &#8220;this is all beta, of course, so it can change.&#8221; So, Tim, allow me to tell you that your feedback has helped us to realize that the value of giving credit to the authors of SQLite outweighs any potential drawbacks, and I will shortly be adding explicit mention of the fact that the runtime uses SQLite for its local SQL database functionality. <a href="/articles/2007/06/11/adobe-air-local-sql-databases-and-my-role/">A week ago I asked for feedback on the SQL documentation</a>, and while this wasn&#8217;t exactly what I had in mind, it is nonetheless appreciated and hopefully it&#8217;s clear that it has been taken into consideration.</p>
<h2>2. &#8220;It&#8217;s unhelpful&#8221;</h2>
<p>Tim makes the suggestion that it would be helpful to &#8220;set out exactly how AIR&#8217;s SQLite differs from the standard build.&#8221; I think that sounds like a useful suggestion; I&#8217;ve made a note to research the topic and see how difficult it would be to compile that information, and how we could usefully incorporate it into the documentation. I admit that the thought didn&#8217;t even occur to me (which doesn&#8217;t surprise me &#8212; I have some good ideas sometimes, but I certainly don&#8217;t ever have all the good ideas =).</p>
<p>Although I acknowledge that it sounds like an idea with merit, the devil&#8217;s advocate in me impels me to admit that specifying how AIR&#8217;s SQLite implementation is different from other SQLite implementations isn&#8217;t as much of a priority as some of the other tasks that I&#8217;ve got in the lineup. It turns out that there were several things that I wanted to write, and we just didn&#8217;t have time to get them all in for the beta release. Since the SQLite library is designed for use as an embedded database, and the target audience (developer-wise) for AIR is developers with web development experience, chances are the majority of the target audience for AIR hasn&#8217;t ever programmed for SQLite. That means that documentation comparing AIR&#8217;s implementation to other implementations will probably only be useful for a minority of AIR developers &#8212; which unfortunately is something that we have to take into account when we&#8217;re scheduling the &#8220;features&#8221; that are chosen to be included in the documentation.</p>
<p>Nevertheless, I do think that it&#8217;s a good suggestion, and in some ways I think that it will be useful to more advanced developers whether they&#8217;ve used SQLite or not, so I&#8217;ll see what I can do.</p>
<h2>3. Skepticism that the AIR and Google Gears APIs will align</h2>
<p>Hopefully my earlier background information has made it clear that the reason the APIs don&#8217;t align right now is really a matter of scheduling, engineering effort, design effort, and a desire on the part of both companies to get their technologies into the hands of developers, and not any sort of conspiracy. I will say that I know for certain that the effort to align the APIs is still going on.</p>
<h3>&#8220;A big hole in the AIR sandbox&#8221;</h3>
<p>Tim makes a side note at this point, that the difference between the AIR approach to SQLite and the Google Gears approach has some security implications. This is an important point, so I&#8217;ve written <a href="/articles/2007/06/21/securing-air-sql-database/">a separate post in which I&#8217;ve discussed why the two systems use different models, and how to address some of the potential security issues</a>.</p>
<h2>Summary: Tim&#8217;s wish list</h2>
<p>Going back to Tim, he concludes with a &#8220;wish list&#8221; of three things he&#8217;d like to see happen in the AIR documentation and implementation:</p>
<blockquote><ul>
<li>Proper credit for SQLite in the docs.</li>
<li>Use the Gears code - full text search could be very useful - and deliver on the promise of aligning the API.</li>
<li>Failing that, set out exactly how AIR’s SQLite differs from the standard build.</li>
</ul>
</blockquote>
<p>I&#8217;ll consider these one at a time:</p>
<h3>Proper credit for SQLite in the docs</h3>
<p>As Tim and I have both mentioned, SQLite is in the public domain, so in fact from a legal definition Adobe is already giving &#8220;proper credit&#8221; (that is, no credit required) for SQLite. I&#8217;m certain that&#8217;s not what Tim had in mind, and I&#8217;ve also mentioned that I believe it&#8217;s worthwhile to give credit to the authors of SQLite. As I&#8217;ve also said, I&#8217;m planning to add in at least a couple of prominent places a statement that AIR uses SQLite for its database functionality. If that&#8217;s not what you had in mind, Tim, please let me know.</p>
<h3>Use the Gears code - full text search could be very useful - and deliver on the promise of aligning the API.</h3>
<p>I&#8217;m 100% certain Adobe is not going to &#8220;use the [Google] Gears code,&#8221; at least not wholesale &#8212; the two products have already been developed in isolation much too much for that to work (in my opinion &#8212; but of course I&#8217;m not the engineer). Nevertheless, I agree that full text search could be very useful &#8212; I would love to see it make it in to AIR as well &#8212; and as I&#8217;ve said here and also last week, Adobe and Google are continuing to work on aligning their database APIs.</p>
<h3>Failing that, set out exactly how AIR’s SQLite differs from the standard build.</h3>
<p>This statement is actually a bit misleading, I think, since I&#8217;m certain Google Gears doesn&#8217;t use a 100% &#8220;standard&#8221;, out of the box SQLite build. (For that matter, I&#8217;m not sure what a &#8220;standard&#8221; SQLite build would be, since the whole point of SQLite is to be an embedded database, built into another product, and not to stand on its own.)</p>
<p>All that notwithstanding, as I&#8217;ve mentioned I have now assigned myself the task of researching the changes that we&#8217;ve made from what someone who&#8217;s used SQLite in another product might expect, and (time permitting) to add a section to the documentation describing those differences.</p>
<h2>Conclusion</h2>
<p>I realize this whole post is long, and meanders quite a bit, and probably doesn&#8217;t show the degree of concrete explanation (or completely serious consideration) that might be desirable. I believe that we made the decisions we made for good reasons, using the information we had available at the time. I&#8217;m also glad that we&#8217;ve only released a beta and not the final version yet, and I&#8217;m glad that Tim&#8217;s post caused me and others in Adobe to sit up and take notice, and reconsider some of our decisions in light of the new information that&#8217;s become available since the time when we previously made them.</p>
<p>And once again, if anyone has thoughts or suggestions about the AIR local SQL database documentation, please don&#8217;t hesitate to share them. I&#8217;ll try not to post an essay in response to each one =)</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/06/19/air-sql-docs-dont-mention-sqlite-my-response/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Book Review: ActionScript 3.0 Cookbook</title>
		<link>http://probertson.com/articles/2007/04/03/actionscript-3-cookbook-review/</link>
		<comments>http://probertson.com/articles/2007/04/03/actionscript-3-cookbook-review/#comments</comments>
		<pubDate>Tue, 03 Apr 2007 17:30:16 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Book reviews]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/04/03/actionscript-3-cookbook-review/</guid>
		<description><![CDATA[With the release of Flex 2 and ActionScript 3.0, I started to watch for new books coming out. Admittedly the numbers have been smaller than I expected, but the first book to hit the shelves &#8212; one I&#8217;ve been anticipating with enthusiasm &#8212; is the ActionScript 3.0 Cookbook by Joey Lott, Darron Schall, and Keith [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of Flex 2 and ActionScript 3.0, I started to watch for new books coming out. Admittedly the numbers have been smaller than I expected, but the first book to hit the shelves &#8212; one I&#8217;ve been anticipating with enthusiasm &#8212; is the ActionScript 3.0 Cookbook by Joey Lott, Darron Schall, and Keith Peters.</p>
<h2>Book summary</h2>
<p>This book obviously covers ActionScript 3.0, the (as of this writing) most current version of ActionScript. ActionScript 3.0 is used in Adobe Flex, including Adobe&#8217;s Flex Builder tool; it is also the language used in the not-yet-but-soon-to-be-released Adobe Flash CS3 (a.k.a. &#8220;Blaze&#8221; or version 9). However, since the book was written primarily while Flex was in beta, and Flash was not even released as a public alpha, all the recipes that involve the IDE refer specifically to Flex Builder. The book is written and organized in the O&#8217;Reilly &#8220;cookbook&#8221; format, where each chapter includes several &#8220;recipes&#8221; written as a problem, a solution to the problem, and a discussion/explanation of the solution. I think of books like this as &#8220;task-based reference&#8221; books &#8212; they&#8217;re meant to be used like a reference, that you can look up something you want when you need it &#8212; but they show how to accomplish a particular task rather than showing how to use a particular language element. That way, if you know you want to do something in particular (e.g. &#8220;simulate rolling dice in ActionScript&#8221;) but don&#8217;t know which methods or properties you would use to accomplish the task, you can just look it up in the book and it will tell you.</p>
<h2>What I liked best</h2>
<p>There are several aspects of this book that offer a lot of value. The ones which stood out most to me are:</p>
<h3>Coverage of specific use cases and more advanced functionality</h3>
<p>Some parts of ActionScript 3.0 have very obvious uses&#8212;the DropShadowFilter class, for example, has a pretty obvious use. However, there are several aspects of the language (such as the Bitmap class, the ByteArray class, the DisplacementMap filter, the ConvolutionFilter, etc.) that provide very &#8220;open-ended&#8221; functionality. There are lots of different things you can do with them, but you have to know what they are and understand some particular programming topic (like graphics manipulation or working with byte data) in order to make use of them. This book describes how to perform some of the tasks that can be performed using these &#8220;open-ended&#8221; classes. This, in my opinion, is the perfect use of the cookbook format.</p>
<p>In the topics where it shines, this book really shines. I was very impressed with the sophistication of many of the topics that are covered (for example, topic 4.10 &#8220;Cards&#8221;).</p>
<h3>Supplemental code library</h3>
<p>The book has a significant library of supplemental code (available as a free download). Several of the recipes use the code in this library to accomplish their tasks. For example, the solution to the recipe &#8220;Simulating Dice&#8221; is to &#8220;use the NumberUtilities.random() method [from the supplemental code library] to generate random numbers in the desired range.&#8221; In truth I can see plusses and minuses to this approach. It definitely saves time for the reader &#8212; if you&#8217;re on a deadline and trying to build that Dungeons &amp; Dragons simulator then having the code already written is a big benefit. It also saves pages in the book, and avoids the need for in-depth explanations (and nearly-redundant explanations, such as those for &#8220;Simulating a coin toss&#8221; and &#8220;Simulating dice&#8221;) since all the book needs is a few lines demonstrating how to call the method in the supplemental code. However, if you&#8217;re the reader who wants to learn more, or to understand the principles behind the solution as well as the code needed to carry out those principles, you&#8217;re left feeling pretty empty. I think one possible compromise (which isn&#8217;t done) might be to have a more in-depth explanation for such sections, perhaps showing a few relevent lines of code extracted from the code library, demonstrating how the code library works and how you might adapt it or build your own similar solution.</p>
<h3>Breadth of topic coverage</h3>
<p>The ActionScript 3.0 documentation that comes with Flex 2 includes two main parts: the <a href="http://livedocs.macromedia.com/flex/201/langref/">reference documentation</a>, and a book called &#8220;<a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part5_ProgAS_155_1.html">Programming ActionScript 3.0</a>.&#8221; However, due to various factors there are several topics that aren&#8217;t covered in &#8220;Programming ActionScript 3.0&#8221; in the Flex 2 release. These include topics such as working with TextField objects, filters, and bitmap manipulation, among others. The &#8220;ActionScript 3.0 Cookbook&#8221; can help to fill in these gaps because it does provide coverage of some of those &#8220;missing&#8221; topics. Admittedly, one of the reasons those topics aren&#8217;t covered in the Flex 2 documentation is because they are largely irrelevent for a Flex-only application&#8212;for example, in Flex you use the TextArea component or TextInput component to display text, rather than just a TextField component. In any case, they do get some coverage in the &#8220;ActionScript 3.0 Cookbook.&#8221; As a side note, several new chapters are being added to &#8220;Programming ActionScript 3.0,&#8221; to be released with the next version of Flash, covering many of these parts of ActionScript that aren&#8217;t commonly used in Flex, such as text fields, movie clips, more on display programming, video, sound, filters, and so on.</p>
<h2>Room for improvement</h2>
<p>As you may have gathered from the previous section, one way I judge a computer book is how well it supplements the manufacturer-provided documentation rather than just rehashing the same material (see <a href="#disclaimers">disclaimer</a>). I also think it&#8217;s important for a book to be consistent to its purpose. If it&#8217;s supposed to be a reference, it should just be a reference. If it&#8217;s supposed to be an instructional book written as a series of lessons, it should stick to that format. With a topic like ActionScript there&#8217;s no way a single book can be all these things, so I think it&#8217;s important for the book to stick to what it does best, and let other books fill in other roles.</p>
<p>As the preceding paragraph implies, I have some disagreements with this book in terms of its overlap with the ActionScript 3.0 documentation and its consistency with its stated goal of being a &#8220;cookbook.&#8221;</p>
<h3>Too much redundancy with the official documentation</h3>
<p>The question I kept asking myself as I was reading through this book is &#8220;what is a cookbook, really?&#8221; In my mind, a &#8220;cookbook&#8221; is a book whose topics are more &#8220;edgy&#8221; or involved than what you might find in the core documentation. It should cover how to accomplish specific tasks that aren&#8217;t easily figured out and aren&#8217;t found elsewhere (again, especially not in the main documentation). It should also include &#8220;hacks&#8221; or workarounds to accomplishing things that aren&#8217;t readily available using the built-in functionality of the language. After all, I can learn (for example) the syntax for writing a class or the syntax for adding a display object to the screen by reading the built-in documentation, so why would I need to buy a cookbook to tell me how? On the other hand, the built-in documentation doesn&#8217;t (and likely will never) tell me how to do more specific implementation tasks, like &#8220;simulating rolling dice&#8221; or &#8220;creating a graphical texture,&#8221; but they&#8217;re common enough programming problems that those are topics I&#8217;d expect to find in a cookbook.</p>
<p>Admittedly, when I first started working with ActionScript 3.0, one of the first thoughts that came to me was &#8220;I wonder what they&#8217;re going to put in the ActionScript Cookbook.&#8221; ActionScript 3.0 by itself is a big improvement over the previous version, and many of the things that used to require workarounds are really straightforward now &#8212; so I wondered what they&#8217;d do to replace all of those topics in the book. Unfortunately it looks like they didn&#8217;t do anything to replace them.</p>
<p>As I mentioned in the &#8220;good&#8221; section, there are lots of topics covered in this book that fit squarely in what I consider to be an appropriate cookbook topic. But there are also plenty of topics that I think should have been left in the built-in documentation rather than needing to repeat them in the ActionScript 3.0 Cookbook. Some key examples are topics related to basic syntax. For example, &#8220;Creating a Custom Class&#8221; and its related topics &#8220;Creating Properties that Behave as Methods,&#8221; &#8220;Creating Static Methods,&#8221; &#8220;Creating Subclasses,&#8221; etc. All of these topics are covered in the built-in documentation, both in a basic form and in greater depth than this book can afford. In addition, these aren&#8217;t topics that a person is going to need to look up frequently. Chances are, a person who&#8217;s new to ActionScript or who&#8217;s been using it for a while and wants to &#8220;move up&#8221; to using custom classes will need that information. However, once a person has created a handfull of custom classes, they&#8217;re not going to need to look up the syntax in the book any more&#8212;they&#8217;ll already know it or else they&#8217;ll just look at a class they created, etc. So there&#8217;s little benefit to that content being provided in this book.</p>
<h3>Too much discussion on some topics</h3>
<p>This is related to the previous criticism. For example, I said that I thought it was redundant for the ActionScript 3.0 Cookbook to have a recipe for &#8220;Creating a Custom Class&#8221; since that topic is covered in detail in the in-product documentation. However, suppose the publisher wants to fill up the topic list. Or suppose a person who&#8217;s &#8220;moving up&#8221; to creating custom classes has read the chapter on creating a custom class in Programming ActionScript 3.0, and has a decent understanding of the concepts, but just can&#8217;t remember the syntax. I admit that there could be some value in having a quick reference place to turn to to find the syntax for creating a custom class. However, at that point the person doesn&#8217;t want to read through four pages of explanation about creating a custom class &#8212; they just want to see the recipe solution and copy it into their own code. Unfortunately, this book could do that, but it doesn&#8217;t. Rather than just give a nice model of a custom class, it spends four pages talking about it. The section on display programming is even more bulky &#8212; while they might justifiably have had several one-page-or-less-each recipes on things like &#8220;adding a display object to the display list,&#8221; &#8220;removing an object from the display list,&#8221; &#8220;reordering objects on the display list,&#8221; etc., the book spends 14 pages talking about what the display list is and how it works. That&#8217;s nice, but it&#8217;s not the point of this book in my opinion. The built-in documentation has even more thorough, detailed explanations about what the display list is, what types of objects can be used, etc. If the cookbook wants to do its readers a service, it should trim that fat, which would make it easier to find the specific method name or syntax &#8212; a quick resource to turn to for those &#8220;I know I&#8217;ve seen this before but I can&#8217;t quite remember how to do it&#8221; sorts of questions.</p>
<h2>Conclusion</h2>
<p>In summary, I have mixed feelings about this book. When it&#8217;s good, it really shines&#8212;the sections that go into more depth or into a more advanced topic than Adobe&#8217;s ActionScript 3.0 documentation are really valuable. However, a significant part of the book is redundant with the documentation, doesn&#8217;t cover it in as much detail as the built-in documentation, but covers it in so much detail that the benefits of the &#8220;cookbook&#8221; format are lost.</p>
<h2>Book details</h2>
<ul>
<li>Title: ActionScript 3.0 Cookbook (On <a href="http://www.amazon.com/ActionScript-3-0-Cookbook-Joey-Lott/dp/0596526954">Amazon.com</a>) (<a href="http://www.oreilly.com/catalog/actscpt3ckbk/index.html">Publisher&#8217;s page</a>) </li>
<li>Authors: Joey Lott, Darron Schall, and Keith Peters </li>
<li>Publisher: O&#8217;Reilly </li>
<li>Copyright year: 2007</li>
<li>ISBN 10: 0-596-52695-4 </li>
<li>ISBN 13: 978-0-596-52695-5 </li>
</ul>
<h2 id="disclaimers">Disclaimers</h2>
<ol>
<li>As a contract employee, I helped write the Flex 2 ActionScript documentation, including one chapter and parts of other chapters in &#8220;Programming ActionScript 3.0&#8221; as well as a handful of samples for the ActionScript language reference. I now work as a full-time employee for Adobe, and one of my current roles is as lead writer of &#8220;Programming ActionScript 3.0&#8221; for the Flash version 9 release&#8212;so I obviously I am not unbiased about the Adobe-provided ActionScript documentation. </li>
<li>I received this book at a heavily discounted price in exchange for writing this review. While it&#8217;s impossible to remove myself from that detail completely, I have tried my best to make this an unbiased review. Want to know how to get discounted books in exchange for making reviews? Contact your <a href="http://www.adobe.com/cfusion/usergroups/">local Adobe Users&#8217; Group</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/04/03/actionscript-3-cookbook-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;Introduction to ActionScript 3.0&#8221;: slides, files, and recording</title>
		<link>http://probertson.com/articles/2007/03/15/actionscript-3-introduction-files/</link>
		<comments>http://probertson.com/articles/2007/03/15/actionscript-3-introduction-files/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 13:47:10 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2007/03/15/actionscript-3-introduction-files/</guid>
		<description><![CDATA[A few weeks back (February 21, 2007) I gave a presentation titled &#8220;Introduction to ActionScript 3.0&#8221; to the Indiana University Flash Users&#8217; Group. The bulk of the presentation was a comparison between previous ActionScript versions and ActionScript 3.0, looking at syntax, the object model, event handling, how code runs in Flash Player, and more. I [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks back (February 21, 2007) I gave a presentation titled &#8220;Introduction to ActionScript 3.0&#8221; to the <a href="http://www.indiana.edu/~iufug/">Indiana University Flash Users&#8217; Group</a>. The bulk of the presentation was a comparison between previous ActionScript versions and ActionScript 3.0, looking at syntax, the object model, event handling, how code runs in Flash Player, and more. I also discussed the underlying standards that ActionScript 3.0 is based on and gave some thoughts on why you would (or wouldn&#8217;t) want to use ActionScript 3.0 rather than ActionScript 2.0.</p>
<p>Anyway, if you&#8217;re interested in this topic, the following links may be useful to you:</p>
<ul>
<li>A <a href="/resources/2007/03/15/ActionScript3Intro_IUFUG_2007-02-21.zip">Slides (with lots of notes!) and example files/code</a> (271 KB .zip)</li>
<li>A <a title="Recording of my Feb. 21 2007 Introduction to ActionScript 3.0 presentation" href="http://adobechats.adobe.acrobat.com/p80054401/">recording of the presentation</a>, in case you want to actually hear what I had to say =)</li>
</ul>
<p>As always, feel free to <a href="#respond">add a comment</a> or <a href="/about/contact/">contact me</a> if you have any questions or thoughts.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2007/03/15/actionscript-3-introduction-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multiple AS3 classes in one file</title>
		<link>http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/</link>
		<comments>http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/#comments</comments>
		<pubDate>Fri, 28 Jul 2006 20:42:37 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://probertson.com/?p=122</guid>
		<description><![CDATA[Since you could do it in early betas of Flex 2, but can't seem to now, some people have been wondering if it's possible to have multiple ActionScript 3.0 classes defined in a single .as file. Here's a look at how to do it, and why you might or might not want to.]]></description>
			<content:encoded><![CDATA[<p>Several months ago I wrote a little something about <a href="/articles/2005/11/08/actionscript-3-unit-testing-recommended/">compile-time and runtime error checking in ActionScript 3</a>, borrowing from Bruce Eckels&#8217; relatively well known example of &#8220;speaking pets.&#8221; In an attempt to be succinct and keep the code listings easy, I put all the class definitions within a single package (intended to be in a single .as document); the main class was public and the others were private, because of a compiler requirement that you could only have one public class per file. Unfortunately, I wrote the example using Flex Public Beta 2 (or maybe even Beta 1). In the subsequent betas and final release, a couple of changes rendered that code invalid:</p>
<ol>
<li>You are no longer allowed to use the private (or protected) access modifiers on class definitions.</li>
<li>You are no longer allowed to define multiple classes within a package block in a single .as file &#8212; essentially, a single .as file will have one public class, and the file&#8217;s name must match the class name &#8212; which makes it easier for the compiler to find classes, I imagine.</li>
</ol>
<p>Point 1, no more private or protected classes, seems to be pretty concrete (i.e. it&#8217;s part of the ActionScript 3.0 syntax). Frankly I don&#8217;t really mind this &#8212; the notion of a private class doesn&#8217;t really make sense (if it&#8217;s private, no other class can access it, after all). In the example I wrote, I used the private modifier because the compiler required it, in order for me to keep all the classes in a single  .as document. I think when I first wrote the example, with public alpha 1, I used inner classes (classes defined inside other classes), but inner classes were removed from the syntax before the public betas were released.</p>
<p>Interestingly, point 2, that you can&#8217;t have multiple classes defined in a package block in a .as file, seems to be a limitation of the Flex compiler (that is, mxmlc) rather than a part of the syntax of ActionScript. First of all, as many people figured out, you <strong>can</strong> still have multiple classes defined in a .as file &#8212; you can just only include one of them in the package block, and the others must be defined outside the package, and cannot have any access modifier specified. Because they&#8217;re defined outside the package, these special classes are available to any class defined in the .as file, including the public class defined in the package block, but are not accessible to any other class. So you can still abstract out certain functionality to other classes, as you might do with a private inner class, but there&#8217;s just a difference in where it&#8217;s defined.</p>
<p>However, as I said, the rule about only having one public class per package block is (at least from what I can tell) only a limitation of the Flex compiler, not a part of ActionScript 3 syntax. Using the Flash 9 Public Alpha&#8217;s compiler, you <strong>can</strong> define a .as file with multiple classes defined in a single package block, and it compiles and runs just fine. You also don&#8217;t have the restriction that class names must match file names, or that files must be in a folder structure corresponding to their package structure. In fact, you can even have multiple <code>package</code> blocks in a single .as file, as long as the packages all appear before any classes defined outside of packages (I&#8217;m not sure if that&#8217;s a bug or intentional behavior).</p>
<p>Here is a file that demonstrates all of the variations that I have tried so far. Put the contents of this first listing in an external .as file &#8212; from what I can tell, the file&#8217;s name must match the name of one of the public classes it contains (e.g. I called my file &#8220;PubClass.as&#8221;).</p>
<pre><code>package test
{
	public class PubClass
	{
		public function PubClass()
		{
			trace("PubClass constructor");
			var myExternalClass:ExternalClass = new ExternalClass();
			var myOtherPubClass:OtherPubClass = new OtherPubClass();
			var myInternalClass:InternalClass = new InternalClass();
		}
	}

	public class OtherPubClass
	{
		public function OtherPubClass()
		{
			trace("OtherPubClass constructor");
		}
	}

	internal class InternalClass
	{
		public function InternalClass()
		{
			trace("InternalClass constructor");
		}
	}
}

package package2
{
	public class Package2PubClass
	{
		public function Package2PubClass()
		{
			trace("Package2PubClass Constructor");
		}
	}
}

class ExternalClass
{
	public function ExternalClass()
	{
		trace("ExternalClass Constructor");
	}
}</code></pre>
<p>I then put this code in the Actions panel on frame 1 of a FLA, in the same folder as the .as file:</p>
<pre><code>import test.PubClass;
import test.OtherPubClass;
import package2.Package2PubClass;

var myPubClass:PubClass = new PubClass();
var myOtherPubClass:OtherPubClass = new OtherPubClass();
var myPackage2PubClass:Package2PubClass = new Package2PubClass();</code></pre>
<p>The result looks like this:</p>
<pre><code>PubClass constructor
ExternalClass Constructor
OtherPubClass constructor
InternalClass constructor
OtherPubClass constructor
Package2PubClass Constructor</code></pre>
<p>Again, note that this code won&#8217;t work when compiled with the Flex compiler (e.g. using Flex Builder or the Flex Framework SDK). This only works with the Flash 9 ActionScript 3 Preview Public Alpha.</p>
<p>And now, for my opinion of this whole business&#8230;</p>
<p>Truth be known, I&#8217;m pretty sure I&#8217;ll still write all my classes in separate .as files. Why? To keep compatibility with Flex, and because I personally think it&#8217;s a better organization scheme. True, it sometimes seems a little silly to make a new .as file for a very small class, but later if that class grows, or even if it doesn&#8217;t, and you&#8217;re trying to find it, it will be much easier if it&#8217;s in its own .as file, and in a folder structure corresponding to its package. However, I know there are some people who want to be able to write multiple classes in a single .as file, and for instructional examples like the ones in the article I mentioned earlier, it&#8217;s convenient to be able to define multiple classes in a single document, so you can put them all in a code listing and just write &#8220;copy and paste all this code&#8221; rather than needing instructions about which code to place in which .as document.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>&#8220;YouTube&#8221; as a video format?!?</title>
		<link>http://probertson.com/articles/2006/06/21/youtube-video-format/</link>
		<comments>http://probertson.com/articles/2006/06/21/youtube-video-format/#comments</comments>
		<pubDate>Wed, 21 Jun 2006 23:51:22 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2006/06/21/youtube-video-format/</guid>
		<description><![CDATA[I was a little surprised by a web page which offered a video in three different formats: Windows Media, QuickTime and ... YouTube? Here are a few thoughts on this, leading to the conclusion that Flash Player might be too ubiquitous for its own good.]]></description>
			<content:encoded><![CDATA[<p>Today I was emailed the following link:</p>
<p><a href="http://honeybrown.ca/Pubs/BumpTop.html">http://honeybrown.ca/Pubs/BumpTop.html</a></p>
<p>It goes to a page with links to videos of BumpTop, an experimental desktop UI &#8212; which I found interesting. However, what I found even more interesting was the selection of video format/player options, shown in this screen grab:</p>
<div><img src="/resources/2006/06/21/bumptop-choose-video-format.png" width="422" height="134" alt="Screen capture of the 'choose video format' interface from a web page, which has three options: Windows Media, QuickTime, and YouTube" /></div>
<p>Notice the three available options: Windows Media, QuickTime, and &#8230; YouTube?</p>
<p>Don&#8217;t get me wrong; this certainly isn&#8217;t the first time I&#8217;ve heard of the <a href="http://youtube.com/">YouTube video sharing service</a>. However, it <em>is</em> the first time I&#8217;ve seen YouTube used as a media format option. (In case you don&#8217;t know, like <a href="http://video.google.com/">Google Video</a>, <a href="http://dynamic.abc.go.com/streaming/landing">ABC</a>, AOL, and others, YouTube uses Flash Video (.flv) as the format for its video files &#8212; there is no such thing as &#8220;YouTube&#8221; video format).</p>
<p>So, at the risk of sounding a little like <a href="http://weblogs.macromedia.com/jd/">John Dowdell</a>, I was a little disappointed that credit for the video format (and the actual player requirements, for that matter) were going to YouTube rather than Flash Player.</p>
<p>As I pondered this, I had a thought I hadn&#8217;t had before. Perhaps in the case of web video, Flash Player&#8217;s ubiquity and customizability has been the reason that it&#8217;s the great secret among video players. Think about the typical web video experience, say for a movie trailer web site 2-3 years ago. You go to the movie web site, you click on the link for the trailer, and what do you see: a big list of links titled &#8220;choose your video player format: Windows Media, QuickTime, Real &#8230;)&#8221;  Or even worse, the dreaded &#8220;missing plugin&#8221; dialog or the puzzle piece icon.</p>
<p>Compare that to the experience that most people have with YouTube, or Google video. You arrive at the page. The video works. It plays in a branded skin that blends in nicely with the page (well, assuming the designer did his/her job right). Unless you right-click, you have no idea that it&#8217;s Flash&#8230;and really, how many people are going to do that?</p>
<p>In terms of ubiquity and customizability, I’d say Flash Player as a video player is much less likely to be recognized, simply because the end user doesn’t need to be able to recognize it in order to use it &#8212; they don&#8217;t need to worry about whether they can make the video work, because <strong>it just does</strong>. So I guess what I&#8217;m starting to wonder is, is Flash Player  a victim of its own success?</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2006/06/21/youtube-video-format/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Book Review: Foundation ActionScript Animation</title>
		<link>http://probertson.com/articles/2006/02/08/foundation-actionscript-animation-review/</link>
		<comments>http://probertson.com/articles/2006/02/08/foundation-actionscript-animation-review/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 18:52:35 +0000</pubDate>
		<dc:creator>Paul Robertson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles by Paul]]></category>
		<category><![CDATA[Book reviews]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://probertson.com/articles/2006/02/08/foundation-actionscript-animation-review/</guid>
		<description><![CDATA[I've been a longtime fan of the work of Keith Peters. For years he's given away examples on his web site; however, I've always found it to be a bit of work to dissect his examples and figure out how and why they work the way they do. So frankly my biggest reason for wanting to read this book was the hope that I would get insight into "how Keith Peters thinks."]]></description>
			<content:encoded><![CDATA[<p>To begin, I&#8217;ve been a longtime fan of the work of <a href="http://bit-101.com/">Keith Peters</a>, the author of this book. He is a well-known Flash developer, particularly for his ActionScript animation. For years he&#8217;s given away examples on his web site; however, I&#8217;ve always found it to be a bit of work to dissect his examples and figure out how and why they work the way they do. So frankly my biggest reason for wanting to read this book was the hope that I would get insight into &#8220;how Keith Peters thinks.&#8221;</p>
<h2>Book summary</h2>
<p>This book is an in-depth look at the topic of scripted animation in ActionScript. By &#8220;scripted animation&#8221; I mean making objects move using ActionScript, as opposed to the traditional approach of creating animation using the Flash timeline. The primary focus of the book is on creating animation for simulating real-world physics: making things move; simulating bouncing, gravity, springing, and friction; creating objects you can &#8220;throw,&#8221; and so on. Finally, an additional section gives an introduction to basic 3-D concepts and techniques. Most of the well-known and engaging Flash content uses these techniques; although they are particularly geared towards use in games and physics simulations. Since this book focuses on a specific application of ActionScript, it is definitely not a basic book or an introduction to ActionScript in general &#8212; I think that a good understanding of ActionScript syntax is essential to understand this book.</p>
<h2>What I liked best </h2>
<p>This book is well-written in terms of the sequence and clarity of the examples. He starts out explaining the basic principles (mostly trigonometry formulas) which underly the different animation behaviors. For the most part this is done in a clear, easy to understand way, even if you haven&#8217;t studied math for several years (like me) &#8212; all his examples are of common uses of the formula in ActionScript, and he&#8217;s quick to point out which formulas you&#8217;ll use all the time and which ones you&#8217;ll use less frequently.</p>
<p>I found the way he ordered the content, and the examples within each section, to be particularly helpful. Most topics build on the previous one, with clear and obvious connections between them. After a few chapters I found myself &#8220;thinking like Keith Peters&#8221; &#8212; or at least that&#8217;s how I described it to myself. For instance, at one point he explains the principle of acceleration, and how to apply it, tying it back concretely to the earlier discussion on basic trig principles. A few sections later he introduces the topic of gravity, which, he points out, is really just a form of acceleration. This made the sections easy to follow, and very shortly I was reading explanations of how to create advanced effects that have wowed me for years, and I was not only understanding the code that creates the effect, but also the underlying principles behind the code. By the middle of the book, I even found myself predicting which basic principles could be used to create other advanced effects; something that made me realize that this book not only was teaching me the basic principles and several common effects, but more importantly, how to apply the principles to create other effects which aren&#8217;t necessarily explained in detail in the book.</p>
<h2>Room for improvement</h2>
<p>No book is perfect, of course, as any author will likely admit. These are the most noteworthy problems I found with this book. But let me say up front that I think the book is well-written enough and in-depth enough that it is worth owning in spite of these specific shortcomings.</p>
<h3>Narrow example domain</h3>
<p>I can&#8217;t complain too much about this one, but the examples both in code and in concepts in the book are almost entirely focused on creating video games in Flash. However, I think it&#8217;s much more common to use these techniques for other things like user interface effects, something which (as far as I remember) wasn&#8217;t even mentioned in the book. Admittedly, the video game and physics simulation examples are certainly more clear and obvious, but I think it would have been nice to at least have a few examples of things like an animated menu, a window that flies into view, or something from a different type of application other than video games.</p>
<h3>Unnecessary basic concepts</h3>
<p>In the introductory portions of the book, Keith faces the typical book-author dilemma of &#8220;what should I assume is the prior knowledge of the reader.&#8221; The book includes a couple of sections introducing basic ActionScript concepts such as functions and event handlers. However, I think those sections are ones he should have just left out completely &#8212; the quick summary treatment isn&#8217;t enough to really teach those concepts well if somebody doesn&#8217;t already have experience with them, and it&#8217;s just annoying filler for the reader who does already know what those things are. I think if anyone is to the point in their ActionScript experience where they are really ready for this book, they should already have a good grasp on functions and event handlers. Interestingly, he doesn&#8217;t explain other syntactic structures like loops and conditional statements at all.</p>
<h3>ActionScript version confusion</h3>
<p>One of the stated goals of the way the code is written is that &#8220;it will work in ActionScript 2.0, and with few or no changes it will work in ActionScript 1 also.&#8221; I disagree with this choice; I think at this point (two and a half years after the introduction of AS2, with ActionScript 3 already in the public eye) I don&#8217;t think there&#8217;s a very good reason to cater to the ActionScript 1 audience. Don&#8217;t get me wrong; I still see job postings which specify &#8220;knowledge of AS1&#8221; as a requirement, so I know it&#8217;s not obselete, but the differences are small enough (at least for the examples in this book) that I think it would have been better to just write the examples in pure AS2, and let people who need the code in AS1 work out the differences, especially since teaching AS1 isn&#8217;t a stated goal of the book.</p>
<p>Unfortunately what you get instead is that the code examples contain a mx of AS2 and AS1, without any real reason for doing so (other than, I assume, because that is the author&#8217;s personal style). For example, consider this (abbreviated) code listing from the book:</p>
<pre><code>init();
function init():Void
{
	force = 0.5;
	vx = 0;
	vy = 0;
	.
	.
	.
}
function onEnterFrame():Void
{
	var dx:Number = _xmouse - arrow._x;
	var dy:Number = _ymouse - arrow._y;
	.
	.
	.
}</code></pre>
<p>In this example, notice that the variables in the &#8220;onEnterFrame&#8221; function are explicitly declared (using the var statement) and given a data type (e.g. Number); this means they are declared as local variables to the function, and are not available outside the function. This is good ActionScript 2.0 practice. However, in the &#8220;init&#8221; function, the variables are used, but are not declared using the var statement and are not given a data type; they are just used, which dynamically creates them in the script &#8212; an AS1 practice which isn&#8217;t good practice in AS2. The reason they are used this way is because those variables need to be available to the whole script &#8212; not just within the &#8220;init&#8221; function. However, that isn&#8217;t clear from the code &#8212; I only know that because the book explicitly says so. The intention of the code could be made explicit, and the code made pure AS2, simply by declaring those variables outside of any function. In this case that would mean adding these three lines somewhere in the code (somewhere outside of a function declaration, that is; ideally right at the top where they&#8217;re plainly visible):</p>
<pre><code>var force:Number;
var vx:Number;
var vy:Number;</code></pre>
<p>This happens to be an issue that I&#8217;m really picky about, perhaps more so than other people. Nevertheless, I think it&#8217;s an important one, especially since if you try to move the code to ActionScript 3, it must follow the strict AS2 rules. This means that moving into the future the reader has to do the work of figuring out how to make the examples conform to AS3 syntax, where it could have been easy to make the code work for AS2 and AS3, a better goal in my opinion than making it work for AS1 and AS2.</p>
<h2>Conclusion</h2>
<p>Although the book has a few shortcomings (at least in my opinion) which will require the reader to have a solid grounding in ActionScript 2.0 syntax in order to make the best use of it, overall I think it is a very well-written, easy to understand and thorough guide to the subject of ActionScript animation. Considering it comes from a Flash developer who is one of the most well-known for this type of work, I think it is a great book to have if you are interested in learning more about that subject.</p>
<h2>Book details</h2>
<ul>
<li>Title: <a href="http://www.friendsofed.com/book.html?isbn=1590595181">Foundation ActionScript Animation: Making Things Move</a></li>
<li>Author: Keith Peters</li>
<li>Publisher: <a href="http://friendsofed.com/">Friends of ED</a></li>
<li>Copyright year: 2006</li>
<li>ISBN: 1-59059-518-1</li>
</ul>
<p class="editornote">Disclaimer: I received this book at a heavily discounted price in exchange for writing this review. While it&#8217;s impossible to remove myself from that detail completely, I have tried my best to make this an unbiased review. Want to know how to get book discounts for making reviews? Contact your <a href="http://www.macromedia.com/cfusion/usergroups/">local <span class="cut">Macromedia</span> Users&#8217; Group</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://probertson.com/articles/2006/02/08/foundation-actionscript-animation-review/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
