<?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>much ado about something &#187; development</title>
	<atom:link href="http://www.rictus.com/muchado/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rictus.com/muchado</link>
	<description>nj on design and development</description>
	<lastBuildDate>Thu, 14 Apr 2011 19:54:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Demystifying Molehill, part 1</title>
		<link>http://www.rictus.com/muchado/2011/02/28/demystifying-molehill-part-1/</link>
		<comments>http://www.rictus.com/muchado/2011/02/28/demystifying-molehill-part-1/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 23:15:27 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Molehill]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=137</guid>
		<description><![CDATA[Another year, another new project. Flex Mobile is well underway, and I&#8217;ve transitioned over to a group within Adobe working on gaming technologies. Of course, Adobe products, and Flash in particular, are heavily used in game development, and we&#8217;ve started to increase our focus on gaming over the past year. One of the first key [...]]]></description>
			<content:encoded><![CDATA[<p>Another year, another new project. <a href="http://labs.adobe.com/technologies/flex/mobile/">Flex Mobile</a> is well underway, and I&#8217;ve transitioned over to a group within Adobe working on gaming technologies. Of course, Adobe products, and Flash in particular, are heavily used in game development, and we&#8217;ve started to increase our focus on gaming over the past year. One of the first key technologies we&#8217;re delivering is a GPU-accelerated 3D API in the Flash Player codenamed &#8220;Molehill&#8221;, which enables incredibly beautiful and incredibly performant 3D content to be built using Flash. And just last weekend, we&#8217;ve put up our <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/">first public pre-release of Molehill</a> as part of the Flash Player Incubator program on Adobe Labs.</p>
<p>Now, if you&#8217;re a hardcore 3D programmer, you&#8217;ll know exactly what to do with Molehill, and Thibault Imbert has a <a href="http://www.bytearray.org/?p=2555">great introduction to the API for you</a>. But if you&#8217;re anything like me, and your development experience has been in the world of 2D graphics or UI, you might find even this introductory material pretty head-scratching. Vertex and fragment shaders? Index buffers? Assembly language? LOLWUT?</p>
<p>I&#8217;ve just recently been learning more about GPU-based 3D programming myself, so I thought I&#8217;d try to make a molehill out of the 3D development mountain, and write an introduction to what this stuff is all about for those of us who are coming from the 2D world. In this first post, I&#8217;ll generally describe how modern GPUs work. I&#8217;m planning to write a follow-up post with more detail on how you actually work with the GPU for 3D graphics, and then another follow-up on how you can leverage the GPU for incredibly fast 2D graphics as well.</p>
<p>One caveat—I may say a few things that aren&#8217;t strictly true, mostly because I might be deliberately oversimplifying, but also because I might just be ignorant. Overall, I don&#8217;t think this picture of the world is too misleading, but please feel free to correct me in the comments.</p>
<p><strong>Update</strong>: One fundamental point I meant to make when I originally wrote this post, but forgot to add, is that Molehill rendering is completely separate from display list rendering. All of the drawing that Molehill does basically ends up in a single layer that essentially draws into the background behind all of your display list content—the two don&#8217;t interact at all. I&#8217;ll discuss how you can leverage Molehill for 2D in a future post.</p>
<h2><span id="more-137"></span>GPUs are scary and complicated!</h2>
<p>That was certainly what I assumed before I started reading up on them. It&#8217;s true that developing high-quality performant 3D renderers using a GPU requires a lot of cleverness and math. But it turns out that you can describe what modern (programmable) GPUs do very simply:</p>
<ol>
<li><strong>GPUs draw triangles really, really fast.</strong></li>
<li><strong>GPUs do basic matrix and vector arithmetic really, really fast.</strong></li>
<li><strong>It&#8217;s up to you to tell the GPU exactly what to do with those capabilities.</strong></li>
</ol>
<p>That&#8217;s pretty much it. At the end of the day, modern GPUs are basically just really fast at drawing triangles and doing certain kinds of math. So fast that, unlike the Flash-style rendering you&#8217;re used to, you don&#8217;t program it like a display list, with minimal updates when things change. Since even a tiny change in your camera location or viewing angle means that all of the objects in your world are in slightly different places on the screen and with slightly different perspective relative to your view, you generally just tell the GPU to redraw the whole screen every frame. (Of course, there&#8217;s lots of optimizations you should do to make this work faster&#8230;but fundamentally you&#8217;re redrawing a lot more stuff than you would normally think of doing in the CPU-based 2D world.)</p>
<h2>So what&#8217;s the big deal? I can draw a triangle really fast too.</h2>
<p>The real power of the GPU is in how you tell it to draw those triangles and what math you tell it to do. Conceptually, the model (for programmable GPUs, which is what Molehill supports) is actually pretty simple, which is why the Molehill API only has a couple of dozen methods. It&#8217;s using the model effectively that gets complicated, as we&#8217;ll see later.</p>
<p>Here&#8217;s the basic way you work with a programmable GPU for a standard 3D rendering scenario. In each frame:</p>
<ol>
<li><strong>Triangles. </strong>Send the GPU a bunch of triangles, expressed in terms of their vertices, as well as other associated data like texture coordinates (which map vertices to locations in a texture bitmap).</li>
<li><strong>Textures.</strong> Send the GPU a bunch of bitmaps to be used for textures that will be mapped onto triangles in step 4 below.</li>
<li><strong>Vertex shader.</strong> Upload a &#8220;vertex shader&#8221; program, which does some math on each vertex from step 1 in order to produce a final vertex position, as well as other optional outputs that are up to you.</li>
<li><strong>Fragment shader.</strong> Upload a &#8220;fragment (or pixel) shader&#8221; program. The GPU does built-in math to interpolate between the vertices on each triangle so it can call your pixel shader on each pixel in each triangle. Your shader does some math on each pixel, accessing textures from step 2 as necessary, in order to figure out what color that pixel should be.</li>
<li><strong>Z-buffer. </strong>The GPU has a &#8220;Z-buffer&#8221; that stores the depth of each pixel it draws on the screen. If a pixel from a new triangle would be behind the last pixel that was written to the same screen location, it doesn&#8217;t redraw the pixel.</li>
<li><strong>Lather, rinse, repeat.</strong> Repeat the above steps one or more times per frame.</li>
<li><strong>Present.</strong> Once you&#8217;re done with all your drawing for the frame, you swap the buffer the GPU has been drawing to out to the screen, and it&#8217;s presented to the user. Now you&#8217;re ready to clear the buffer and start all over again for the next frame.</li>
</ol>
<p>And that&#8217;s it. Simple, right?</p>
<h2>Wait a minute. What about colors, curved surfaces, lights, reflections, cameras, perspective projection, and so on?</h2>
<p>The GPU doesn&#8217;t know anything about any of that. This is the fundamental difference between older, &#8220;fixed-function&#8221; GPUs and modern programmable GPUs: the GPU makes very few assumptions about the actual meaning of all the data it&#8217;s processing. It knows about vertices, triangles, and pixels (or &#8220;fragments&#8221;, which are so-called because the edges of the triangle divide the pixels they cross into fragments). It also knows how to sample locations from texture bitmaps. Everything else—all the computation that actually decides which triangles to display, where the triangles should end up relative to the camera, or what colors the pixels should be given the current lights and textures—is either done by your application code on the CPU before you start uploading stuff to the GPU, or by the vertex and fragment shader programs that you upload to the GPU.</p>
<p>This means that you have complete power over how the GPU processes your geometry and textures. But with great power comes great responsibility—and a lot of coding, both in your application and in the shader programs you have to write to get anything to display.</p>
<p>Fortunately, you won&#8217;t have to write all that code yourself. Many members of the Flash community have written 3D frameworks and are now porting them to the Molehill API—including Alternativa, Away3D, Flare3D, Minko, Sophie3D, Yogurt3D, and more. In these frameworks, you don&#8217;t deal directly with the GPU, shaders, etc. at all. Instead, you typically interact with a &#8220;scene graph&#8221;, which is analogous to the Flash display list. It&#8217;s a persistent tree of objects that you can add and remove and set properties on. You just specify what geometry you want, how it should look, and where it should go in the world, and the framework takes care of sending it to the GPU and providing the appropriate shaders.</p>
<p>If the world of GPU programming doesn&#8217;t look like it&#8217;s for you, stop reading right now and go check out all those great frameworks. If you feel like digging in at a lower level, though, check out my next blog post, which will get into more details that bridge the gap between the high-level GPU description I gave above and <a href="http://www.bytearray.org/?p=2555">Thibault&#8217;s API introduction</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2011/02/28/demystifying-molehill-part-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Flex and mobile development at MAX 2010</title>
		<link>http://www.rictus.com/muchado/2010/09/27/flex-and-mobile-at-max-2010/</link>
		<comments>http://www.rictus.com/muchado/2010/09/27/flex-and-mobile-at-max-2010/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 18:51:51 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=98</guid>
		<description><![CDATA[Adobe MAX 2010 is now just a month away, and we&#8217;re starting to prepare for a bunch of sessions where we&#8217;ll be talking about mobile development using &#8220;Hero&#8221;, the next version of the Flex SDK. Because this is my blog, I&#8217;ll flog my own session first: I&#8217;ll be running a &#8220;Bring Your Own Laptop&#8221; (BYOL) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://max.adobe.com/">Adobe MAX 2010</a> is now just a month away, and we&#8217;re starting to prepare for a bunch of sessions where we&#8217;ll be talking about mobile development using &#8220;Hero&#8221;, the next version of the Flex SDK.</p>
<p>Because this is my blog, I&#8217;ll flog my own session first: I&#8217;ll be running a &#8220;Bring Your Own Laptop&#8221; (BYOL) lab on <a href="http://bit.ly/cvJbpC">Building Mobile Flex Applications</a>. The way these labs work is that you, er, bring your own laptop, and we give you bits to install on it for the session. Also, if you have an Android 2.2 phone, bring it (and the phone&#8217;s USB cable) along too&#8211;though that&#8217;s not required for this lab.</p>
<p>Glenn Ruehle and Chiedo Acholonu from the Flex Mobile team will be presenting <a href="http://bit.ly/9KGMRj">Deep Dive into Mobile Development with the Flex SDK</a>, which will go into detail about the mobile development features we&#8217;re adding in &#8220;Hero&#8221;, and how to optimize your development process as well as your applications when building across multiple screens.</p>
<p><a href="http://frishy.blogspot.com/">Ryan Frishberg</a>, another engineer on Flex Mobile, will be presenting a session on <a href="http://bit.ly/dkDl3x">Performance Tips and Tricks for Flex and Flash Development</a>. This session will discuss optimizing both desktop and mobile applications, and describe common performance problems that developers of every level can encounter when building Flex and Flash applications.</p>
<p>Evangelist <a href="http://coenraets.org/">Christophe Coenraets</a> will be presenting both a <a href="http://bit.ly/cdZbfY">session</a> and a <a href="http://bit.ly/b1ZjZT">BYOL lab</a> on building data-driven mobile applications with Flex &#8220;Hero&#8221; and AIR for Android. His sessions will be focused more on the data connectivity side rather than the basics of mobile application and UI development.</p>
<p>And from outside the building, we have <a href="http://rjria.blogspot.com/">RJ Owen</a> and <a href="http://scalenine.com">Juan Sanchez</a> from <a href="http://www.effectiveui.com/">EffectiveUI</a> presenting <a href="http://bit.ly/ctT9ot">Screens of Possibility: Pushing Multiscreen Experiences with Spark and Flex</a>, discussing their experiences designing and developing on desktop and mobile devices. I can&#8217;t reveal details of the app they&#8217;ll be showing off in this session, but I&#8217;ve seen some early comps and I think it&#8217;s going to be very cool.</p>
<p>Of course, there&#8217;s going to be plenty more at MAX about mobile development, Flex, and AIR; check out the <a href="http://max.adobe.com/sessions/catalog/">MAX Session Catalog</a> for the complete list. Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2010/09/27/flex-and-mobile-at-max-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile development features coming in Flex &#8220;Hero&#8221;</title>
		<link>http://www.rictus.com/muchado/2010/07/01/mobile-development-features-coming-in-flex-hero/</link>
		<comments>http://www.rictus.com/muchado/2010/07/01/mobile-development-features-coming-in-flex-hero/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 03:01:17 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=91</guid>
		<description><![CDATA[It&#8217;s been quite awhile since I last posted, but I&#8217;ve been keeping busy. Now that we&#8217;ve released Flash Catalyst CS5, I&#8217;ve shifted my focus to helping lead the team working on mobile application development features in Flex and Flash Builder. Last night we posted the public announcement of the next version of Flex, code-named &#8220;Hero&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite awhile since I last posted, but I&#8217;ve been keeping busy. Now that we&#8217;ve released <a href="http://www.adobe.com/products/flashcatalyst/">Flash Catalyst CS5</a>, I&#8217;ve shifted my focus to helping lead the team working on mobile application development features in Flex and Flash Builder. Last night we posted the <a href="http://blogs.adobe.com/flex/archives/2010/06/introducinghero.html">public announcement</a> of the next version of Flex, code-named &#8220;Hero&#8221;, which will include the first version of our mobile development features.</p>
<p>If you&#8217;ve been following Flex over the last year or so, you might have heard of a related effort, code-named &#8220;Slider&#8221;, which was going to be a separate version of the framework that would be specifically optimized for mobile devices. What we&#8217;ve found over the past year is that vast improvements in Flash and AIR runtime performance on mobile devices, as well as the rapidly increasing power of modern touchscreen smartphones, have made it unnecessary for us to split off a separate framework. So going forward, we&#8217;ll have a unified framework for both desktop and mobile development, and &#8220;Hero&#8221; will be the first fruit of this approach.</p>
<p>For a good overview of our plans for mobile development, take a look at the <a href="http://download.macromedia.com/pub/labs/flex/mobile/flexmobile_whitepaper.pdf">Flex and Mobile whitepaper</a>, <a href="http://labs.adobe.com/technologies/flex/mobile/faq.html">FAQ</a>, and <a href="http://labs.adobe.com/technologies/flex/mobile/">Adobe Labs page</a>. We&#8217;ve also started to post draft specs for the mobile features (as well as the rest of Hero) to the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Hero">Flex Open Source site</a>, and we&#8217;ll be rolling out more over time.</p>
<p>I&#8217;m excited that we&#8217;ve started talking about our mobile Flex efforts publicly, and look forward to revealing more over the next few months. Watch this space!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2010/07/01/mobile-development-features-coming-in-flex-hero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snackr is now open source!</title>
		<link>http://www.rictus.com/muchado/2008/06/05/snackr-is-now-open-source/</link>
		<comments>http://www.rictus.com/muchado/2008/06/05/snackr-is-now-open-source/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 06:01:52 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Snackr]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=56</guid>
		<description><![CDATA[The flood of Snackr downloads has finally slowed down to about 150 a day. Over 13,000 people have downloaded it so far; it looks like maybe about 500-600 people are running it daily&#8211;not bad for a little side project Various people have requested the source code, so I&#8217;ve decided to host it on Google Code [...]]]></description>
			<content:encoded><![CDATA[<p>The flood of <a href="http://snackr.net/">Snackr</a> downloads has finally slowed down to about 150 a day. Over 13,000 people have downloaded it so far; it looks like maybe about 500-600 people are running it daily&#8211;not bad for a little side project <img src='http://www.rictus.com/muchado/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Various people have requested the source code, so I&#8217;ve decided to host it on Google Code at <a href="http://snackr.googlecode.com/">http://snackr.googlecode.com/</a>. You can file bugs/enhancement requests on the <a href="http://code.google.com/p/snackr/issues/list">Issues tab</a> there (the issues and wish list items from snackr.net have been migrated there), and check out the source anonymously using Subversion (instructions are on the <a href="http://code.google.com/p/snackr/source/checkout">Source tab</a>).</p>
<p>The source is currently in an interim state&#8211;there are a couple of half-implemented features (the ability to &#8220;star&#8221; items to read later, and the Google Reader integration that <a href="http://usereccentric.com">Rob</a> is working on)&#8211;but you should be able to run what&#8217;s there (the GR stuff isn&#8217;t hooked up at all to the UI yet, and the &#8220;star&#8221; functionality works but the UI is slightly broken). I&#8217;m planning to post interim test builds there once in awhile as well.</p>
<p>The source also probably isn&#8217;t the prettiest code ever <img src='http://www.rictus.com/muchado/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , and I haven&#8217;t finished commenting it, but I&#8217;m hoping to continue cleaning it up and refactoring over time. Feel free to check it out, and let me know if you have suggestions&#8211;or, better yet, patches you&#8217;d like to submit!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2008/06/05/snackr-is-now-open-source/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Snackr is everywhere!</title>
		<link>http://www.rictus.com/muchado/2008/05/14/snackr-is-everywhere/</link>
		<comments>http://www.rictus.com/muchado/2008/05/14/snackr-is-everywhere/#comments</comments>
		<pubDate>Wed, 14 May 2008 06:56:26 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Snackr]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=52</guid>
		<description><![CDATA[Wow&#8211;nearly 600 people have downloaded Snackr in the last two days! Thanks to everyone who&#8217;s sent mail or posted comments; it&#8217;s great to know people like it. The most common requests so far seem to be: Allow multiple selection in the feed list, so you can delete a bunch of feeds at once. It seems [...]]]></description>
			<content:encoded><![CDATA[<p>Wow&#8211;nearly 600 people have downloaded <a href="http://snackr.net">Snackr</a> in the last two days! Thanks to everyone who&#8217;s sent mail or posted comments; it&#8217;s great to know people like it. The most common requests so far seem to be:</p>
<ul>
<li>Allow multiple selection in the feed list, so you can delete a bunch of feeds at once. It seems like a lot of people imported large feed lists from their existing blog readers, then realized they didn&#8217;t want to actually see all of those feeds in Snackr.</li>
<li>Support Asian language characters. Currently, Snackr uses Myriad Web, and the font is embedded in order to make fade animations work properly for text, but that font only has Latin characters. I&#8217;ll either need to add an option to use the system font (and turn off fade animations), or maybe build a version that embeds a font with Asian characters in it (though that would probably lead to a huge installer).</li>
<li>Ability to keep a list of items to read later (e.g. by starring them). I&#8217;ve been wanting this for awhile but haven&#8217;t gotten around to implementing it yet&#8211;now I have some incentive!</li>
<li>Posting the source. I do really want to do this, but I need to set aside some time to make the code slightly less embarrassing <img src='http://www.rictus.com/muchado/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>I also noticed today as I was using it on my machine that for some short posts, the popup seems to &#8220;bobble around&#8221; a bit and end up at a very thin size (it&#8217;s different from the jittery animation on Vista/Linux; this is happening even on OS X). It&#8217;s intermittent, but it reproduces pretty regularly on certain kinds of posts. Has anybody else seen this? I&#8217;ll have to look into it&#8211;it must be a recent injection, as I never noticed it before.</p>
<p>I&#8217;m planning to make regular updates to Snackr, though things are pretty busy; I&#8217;m hoping I can carve out enough time to release a new version in a couple of weeks. Snackr should automatically notify you when an update is available.</p>
<p>Keep those cards and letters coming!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2008/05/14/snackr-is-everywhere/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Snackr, an RSS ticker built using AIR and Flex</title>
		<link>http://www.rictus.com/muchado/2008/05/12/snackr-an-rss-ticker-built-using-air-and-flex/</link>
		<comments>http://www.rictus.com/muchado/2008/05/12/snackr-an-rss-ticker-built-using-air-and-flex/#comments</comments>
		<pubDate>Mon, 12 May 2008 08:00:28 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Snackr]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=45</guid>
		<description><![CDATA[I realized a few months ago that, unlike pretty much everyone else I know, I don&#8217;t regularly use an RSS reader. Not that I haven&#8217;t tried—I used FeedDemon early on, and more recently tried out Google Reader—but never managed to form the habit of checking them regularly. Both of them are fine apps; the problem [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rictus.com/muchado/wp-content/uploads/2008/05/snackr-icon-flat-64.png"><img class="alignleft alignnone size-medium wp-image-49" style="float: left; padding-right: 10px" title="snackr-icon-flat-64" src="http://www.rictus.com/muchado/wp-content/uploads/2008/05/snackr-icon-flat-64.png" alt="" width="64" height="64" /></a>I realized a few months ago that, unlike pretty much everyone else I know, I don&#8217;t regularly use an RSS reader. Not that I haven&#8217;t tried—I used <a href="http://www.feeddemon.com/">FeedDemon</a> early on, and more recently tried out <a href="http://www.google.com/reader/">Google Reader</a>—but never managed to form the habit of checking them regularly. Both of them are fine apps; the problem was with me. Every time I sat down and saw that I had a gazillion unread items in my hundreds of feeds, I didn&#8217;t know where to start. Eventually I just gave up trying to keep up.</p>
<p>Around the same time I came to this realization, <a href="http://www.adobe.com/products/air/">Adobe AIR 1.0</a> was publicly released. I wanted to try to write an AIR app just for fun, and it occurred to me that I might be able to make something that would solve my RSS problem.</p>
<p>The result is <a href="http://snackr.net/">Snackr</a>, a ticker-like widget that lives on the bottom (or side) of your screen and scrolls random items from your RSS feeds. (It&#8217;s called &#8220;Snackr&#8221; because it lets you nibble on your feeds. Guffaw.) Here&#8217;s what it looks like on my desktop:</p>
<p style="text-align: left;"><a href="http://www.rictus.com/muchado/wp-content/uploads/2008/05/screenshot-bottom-full.jpg"><img class="alignnone size-full wp-image-51" title="screenshot-bottom-full" src="http://www.rictus.com/muchado/wp-content/uploads/2008/05/screenshot-bottom-full.jpg" alt="" width="500" height="312" /></a></p>
<p style="text-align: left;">I&#8217;m actually finding Snackr really useful—it helps me keep up with blogs I want to keep up with, and also gives me a great smattering of items from sources I wouldn&#8217;t normally read regularly. Please try it out and let me know if you like it! (Of course, it&#8217;s still an alpha, so please expect bugs; there&#8217;s a list of <a href="http://snackr.net/issues.html">known issues</a> on the Snackr website.)</p>
<p style="text-align: left;">Snackr has also been really fun to write, and along the way I figured out some tips and tricks for doing various things with Flex and AIR. Some notes on that after the jump.</p>
<p style="text-align: left;"><span id="more-45"></span></p>
<p style="text-align: left;">Snackr is written in Flex 3 (and, of course, AIR). I hadn&#8217;t done any AIR development when I started writing it, and it&#8217;s a testament to how well AIR is designed that I got the basic thing up and running in a weekend. Of course, most of that was due to my familiarity with Flex, but the fact that AIR makes it trivially easy to package up a normal Flex app as a desktop app is easy to take for granted. With almost no work, I went from being a Flex developer to a cross-platform desktop app developer.</p>
<p style="text-align: left;">Once I got the basic ticker UI up and running, I started exercising more AIR-specific functionality. Initially, I kept all the feed items in memory, but decided to try out AIR&#8217;s local database capability to improve Snackr&#8217;s memory footprint. Like a lot of other things in AIR, it was dead easy to set this up; I&#8217;m not a database/SQL guru, but it was very straightforward to build out the database code. (I used synchronous mode for simplicity; it would have been much more complex had I tried to do it in asynchronous mode—as with all other Flash/Flex/AJAX programming, asynchronicity is one of the toughest things to manage cleanly, especially if you have a chain of things you want to happen in sequence.)</p>
<p style="text-align: left;">The next thing I did was build the animation for the popup windows. I ran into a couple of little snags here. I started by trying to just animate the Flex Window component using standard Flex effects, but that didn&#8217;t seem to work, probably because setting (say) the x and y of the window component doesn&#8217;t actually set the position of the underlying AIR NativeWindow. So, to get it to work correctly, I directly animated the &#8220;bounds&#8221; property of the underlying AIR NativeWindow class. In order to keep both the position and size of the bounds in sync as I animated, I wrote my own AnimateBounds effect—this was easy to achieve by subclassing TweenEffect and just converting the bounds property of NativeWindow to an array of numbers as TweenEffect expects.</p>
<p style="text-align: left;">I also had to be careful when drawing the &#8220;bubble&#8221; background in my popup window&#8217;s updateDisplayList() function. Before I added the animation, the background drew fine, but I found that during the animation it didn&#8217;t seem to redraw at the right size at each step. I discovered that I had to ignore the standard unscaledWidth/unscaledHeight being passed into updateDisplayList(), and (once again) just look directly at the AIR NativeWindow bounds to get the width and height to use. I&#8217;m guessing that during fast animations, the bounds of the Flex Window component don&#8217;t update synchronously with the NativeWindow bounds.</p>
<p style="text-align: left;">Around the time I was finishing up the animation stuff, we released the alpha version of AIR for Linux. Just for grins, I installed Ubuntu in VMWare on my Mac and tried it out—and amazingly enough, it worked! Well, with one snag. As Linux folks know, window transparency is something that&#8217;s only recently been supported in Linux, and not all window managers have it. I couldn&#8217;t figure out how to get a transparency-supporting window manager set up, so I just punted; the popups look okay without it (though they look like rectangles rather than bubbles).</p>
<p style="text-align: left;">There was a bigger issue, though. I noticed that unlike on Mac OS X and Windows XP, the popup animation was really jittery on Linux. Later on, when I tried Snackr out on Windows Vista, I noticed some jitter there too (although it&#8217;s not nearly as bad as on Linux). I haven&#8217;t yet figured out exactly what causes this—I filed a bug with the AIR team—but I&#8217;m guessing that on Vista and Linux, even when I set both the position and size of the popup at the same time, the OS either (1) processes them separately, so they get out of sync, or (2) processes the move immediately by directly blitting the window at its current size before I get a chance to redraw it on the resize event. (This mostly comes into play because I&#8217;m actually animating the popups upwards, so both the position and size have to change at the same time. It wouldn&#8217;t be an issue if you&#8217;re just growing a window larger or smaller but keeping it at the same position.)</p>
<p style="text-align: left;">The final issue, and probably the biggest one, is that there&#8217;s no way currently to have Snackr act like a true docking window—it can&#8217;t tell the OS to reduce the available space of the desktop, so if you maximize a window, the window will overlap Snackr. There isn&#8217;t currently an API for this in AIR, so there&#8217;s no real way to work around this for now. To compensate, I&#8217;ve added a bunch of convenient ways to get Snackr out of your way; you can toss it around the screen to different sides, put it on a second monitor, or collapse it temporarily.</p>
<p style="text-align: left;">Other than that, all the functionality I&#8217;ve put in Snackr has been really easy to implement. AIR makes it really simple to support multiple monitors, for example. And it&#8217;s also pretty easy to implement auto-update—you have to set up whatever logic you want to figure out when a new version is available (e.g. by downloading an XML file from a website), but once you retrieve a newer installer it&#8217;s a single function call to run the updater to install it.</p>
<p style="text-align: left;">I&#8217;m planning to put up the source somewhere eventually, but I want to clean it up a bit first (yes, my coding habits are sloppier at home than at work). I definitely plan to continue to add features to it—since I&#8217;m using it myself, I have a lot of incentive to keep it up. Also, my colleague <a href="http://usereccentric.com">Rob Adams</a> (who was the first person to use Snackr besides myself, and has given me lots of great feedback) is planning to add some features to it as well—notably, making it synchronize the feed list and read items with Google Reader, so you can use it as an adjunct to your normal blog reading habits instead of a replacement. (Please feel free to bug him if you want this feature.)</p>
<p style="text-align: left;">Enjoy Snackr—I&#8217;d love to get your feedback!</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2008/05/12/snackr-an-rss-ticker-built-using-air-and-flex/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Video interview with me about Thermo</title>
		<link>http://www.rictus.com/muchado/2008/04/23/video-interview-with-me-about-thermo/</link>
		<comments>http://www.rictus.com/muchado/2008/04/23/video-interview-with-me-about-thermo/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 22:01:07 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Thermo]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/?p=38</guid>
		<description><![CDATA[It&#8217;s been busy here in Thermo-land, as we work furiously (no really! we&#8217;re furious people!) to turn our vision into reality. I have a fun side project that I&#8217;m going to post about in a little bit once I get a few bugs worked out. In the meantime, here&#8217;s a video interview that Ryan Stewart, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been busy here in Thermo-land, as we work furiously (no really! we&#8217;re furious people!) to turn our vision into reality. I have a fun side project that I&#8217;m going to post about in a little bit once I get a few bugs worked out. In the meantime, here&#8217;s a video interview that <a href="http://blog.digitalbackcountry.com/">Ryan Stewart</a>, Thermo evangelist extraordinaire, did with me about designer/developer workflow in Thermo and Flex 4. It was our first video, so it&#8217;s a little blurry and off-center, but just pretend it&#8217;s artsy and edgy and you&#8217;ll be fine. (We did edit out the part where the siren went off when someone went out the wrong door in the cafeteria.)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="255" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="id" value="showplayer" /><param name="quality" value="best" /><param name="src" value="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;feedurl=http%3A%2F%2Fonairbustourlive%2Eblip%2Etv%2Frss&amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F718167&amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" /><embed id="showplayer" type="application/x-shockwave-flash" width="400" height="255" src="http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;feedurl=http%3A%2F%2Fonairbustourlive%2Eblip%2Etv%2Frss&amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F718167&amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf" quality="best"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2008/04/23/video-interview-with-me-about-thermo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updated Reflection component</title>
		<link>http://www.rictus.com/muchado/2008/02/21/updated-reflection-component/</link>
		<comments>http://www.rictus.com/muchado/2008/02/21/updated-reflection-component/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 21:02:15 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/2008/02/21/updated-reflection-component/</guid>
		<description><![CDATA[A number of people have written me over the past few months to mention that they&#8217;ve had trouble getting the Reflection component to work in various cases. I haven&#8217;t had time to look at each of the problems, but I do have an updated version of Reflector.as that may work better. If you&#8217;ve been having [...]]]></description>
			<content:encoded><![CDATA[<p>A number of people have written me over the past few months to mention that they&#8217;ve had trouble getting the <a href="http://www.rictus.com/muchado/2006/07/05/live-reflection-component/">Reflection component</a> to work in various cases. I haven&#8217;t had time to look at each of the problems, but I do have an <a href="http://www.rictus.com/muchado/wp-content/uploads/2008/02/reflector.as" title="Reflector.as">updated version of Reflector.as</a> that may work better. If you&#8217;ve been having trouble with the original Reflector code, try this one out and let me know if it fixes your problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2008/02/21/updated-reflection-component/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Frequently Questioned Answers about Thermo</title>
		<link>http://www.rictus.com/muchado/2007/10/07/thoughts-on-thermo/</link>
		<comments>http://www.rictus.com/muchado/2007/10/07/thoughts-on-thermo/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 01:09:06 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Thermo]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/2007/10/07/thoughts-on-thermo/</guid>
		<description><![CDATA[Well, Thermo caused quite a buzz at MAX, and needless to say, we&#8217;re very excited about all the reaction. If you weren&#8217;t at MAX, you can see Aral Balkan&#8217;s video of the Thermo demo up on YouTube: part 1, part 2, part 3. Since we did the demo, I&#8217;ve been semi-obsessively searching MXNA for blog [...]]]></description>
			<content:encoded><![CDATA[<p>Well, <a href="http://labs.adobe.com/wiki/index.php/Thermo">Thermo</a> caused quite a buzz at MAX, and needless to say, we&#8217;re very excited about all the reaction.  If you weren&#8217;t at MAX, you can see Aral Balkan&#8217;s video of the Thermo demo up on YouTube: <a href="http://www.youtube.com/watch?v=lGdr3dCmxe4">part 1</a>, <a href="http://www.youtube.com/watch?v=d9IjZJ0D_bo">part 2</a>, <a href="http://www.youtube.com/watch?v=lsfOe_MCEbg">part 3</a>.</p>
<p>Since we did the demo, I&#8217;ve been semi-obsessively searching MXNA for <a href="http://weblogs.macromedia.com/mxna/index.cfm?searchterms=thermo&#038;query=bySimpleSearch&#038;searchsortby=date">blog posts about Thermo</a>, and among the generally positive responses, people have also posted a number of questions and concerns.  I thought I&#8217;d address some of these here, to help clarify and amplify what we showed in the demo.  (Sorry&#8211;no spoilers about release dates or other features here!)</p>
<p><strong>The demo showed Thermo creating a lot of bitmap graphics. Will Thermo applications be large and bitmap-heavy?</strong></p>
<div style="margin-left: 4em">
<p>The demo happened to have a lot of bitmaps in it, since it was a CD cover browser, but <strong>Thermo will work with both vector and bitmap assets</strong>. The main difference between graphics in Thermo and in Flex today is that vector artwork in Thermo is expressed through bona-fide MXML tags, rather than opaque SWF symbols. In the demo, for example, Photoshop text layers came over as TextGraphic tags, and rectangle shape layers came over as Rect tags.  Naturally, MXML graphics will also support complex Bezier paths, rounded rectangles, and so on, and will support importing from Illustrator and Fireworks as well as Photoshop.</p>
</div>
<p><strong>Why is it useful to have graphics tags? Why not just import graphics as SWFs or bitmaps as in earlier versions of Flex?</strong></p>
<div style="margin-left: 4em">
<p>For static graphics, you could argue it&#8217;s about the same. But few graphics in a Flex application are static. Much of the &#8220;rich&#8221; in RIAs comes from <i>dynamic</i> graphics&#8211;graphics that change in response to user gestures or dynamic data.</p>
<p>In Flex as it is today, developers have to create dynamic graphics by writing imperative ActionScript code.  With MXML graphics, <strong>developers no longer need to recode the designer&#8217;s graphics in order to make them dynamic</strong>&#8211;they can simply modify the graphics at runtime through simple property access, data binding, the transitions/effects engine, and so on. Designers can continue to edit the graphics visually in Thermo without disturbing the developer&#8217;s code.</p>
<p>For example, suppose I draw a button skin in Illustrator that&#8217;s filled with a blue gradient, and we want to create multiple buttons with the same look but different colors. My developer can just import that as MXML, and then data-bind the gradient color to some style parameter.  Voila&#8211;instant styleable skin, without writing a line of AS code.  I can then edit the shape of the skin visually in Thermo, and the color style will continue to work, without my having to rewrite a bunch of Graphics method calls.</p>
<p>Now let&#8217;s say I want to animate that gradient color when I mouse over the button.  Again, I can create this through declarative transitions written in MXML, rather than having to build the animation into an opaque SWF symbol.  And again, because the transition is in MXML rather than ActionScript code, I can visually design that transition using the Thermo UI.</p>
</div>
<p><strong>The text field that was created in the demo seemed to have its skin specified inline. Will Thermo create large single-file applications? Will the code be huge?</strong></p>
<div style="margin-left: 4em">
<p>Thermo is being created for designers, but of course it won&#8217;t be successful unless its output can be easily consumed by developers. <strong>Thermo will definitely provide easy ways to factor the resulting code into separate files.</strong>  For example, skins can be automatically put into separate output files and generalized into CSS rules. (Flex Builder 3 actually already has functionality for extracting inline styles into CSS, and we would certainly have the same functionality in Thermo.)</p>
<p>One example of code factoring that wasn&#8217;t obvious from the demo was that when Steven created a list from the individual CD covers, the item renderer for the list was actually created as a separate file. When he then double-clicked on an item in the list to edit it, it felt like it was being edited directly in place in the context of the larger application, but Thermo was actually making edits to the separate item renderer file behind the scenes. This is an example of how we can keep clean code separation without forcing the designer to understand the guts of Flex.</p>
</div>
<p><strong>It&#8217;s great that you can turn graphics into buttons, scrollbars, etc., but what about custom components? Will Thermo work with components created by developers?</strong></p>
<div style="margin-left: 4em">
<p>Definitely. Our intention is to make it so that <strong>developers can create components that are usable in Thermo</strong> the same way the built-in components are.  Naturally, they will need to conform to certain rules and/or implement a certain API in order for those components to work well in Thermo, but our intent is to keep those requirements lightweight.</p>
</div>
<p><strong>Thermo seems geared towards letting designers build a complete Flex application. Does that mean you expect designers to create business logic as well?</strong></p>
<div style="margin-left: 4em">
<p>That&#8217;s not the goal of Thermo. One way I like to think about the designer/developer dichotomy (woo, alliteration!) was suggested by <a href="http://usereccentric.com">Rob Adams</a>: developers deal with <i>system logic</i>, and designers deal with <i>user logic</i>. The two are not exactly the same, though they obviously intersect. Our goal is to make it so that <strong>designers can use Thermo to design the user logic</strong> of the application (along with importing and editing the visual design), and provide a clean way for that user logic to be hooked up to backend data and business logic by a developer.</p>
</div>
<p>That&#8217;s all for now. Please feel free to comment (or post in your own blogs) if you have more questions about Thermo&#8211;naturally, we can&#8217;t answer all of them at this point, but we&#8217;re really interested to hear your thoughts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2007/10/07/thoughts-on-thermo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Code Anatomy becoming real</title>
		<link>http://www.rictus.com/muchado/2007/08/29/code-anatomy-becoming-real/</link>
		<comments>http://www.rictus.com/muchado/2007/08/29/code-anatomy-becoming-real/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 00:50:05 +0000</pubDate>
		<dc:creator>nj</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.rictus.com/muchado/2007/08/29/code-anatomy-becoming-real/</guid>
		<description><![CDATA[Well, here it is&#8211;almost time for MAX 2007, and the last post I made to my blog was just after MAX 2006. I&#8217;ve been a little busy We&#8217;ve been working on some really neat stuff to show off at MAX, so stay tuned. In the meantime, one bit of news&#8211;the Code Anatomy prototype I published [...]]]></description>
			<content:encoded><![CDATA[<p>Well, here it is&#8211;almost time for MAX 2007, and the last post I made to my blog was just after MAX 2006. I&#8217;ve been a little busy <img src='http://www.rictus.com/muchado/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We&#8217;ve been working on some really neat stuff to show off at MAX, so stay tuned.</p>
<p>In the meantime, one bit of news&#8211;the <a href="http://www.rictus.com/muchado/2006/11/01/annotated-code-viewer-aka-view-source-on-steroids/">Code Anatomy prototype</a> I published in my last post is turning into a real feature! Our Learning Resources team is getting a real Flex developer to rebuild it from the ground up as a skinned, fully-reusable Flex app, and will be shipping several code samples that use it with Flex 3. Best of all, we&#8217;re planning to release the source code, so other folks can post anatomies of their own apps. </p>
<p>I probably won&#8217;t be coming up for air till after MAX (at least), but I will be attending, though not giving a talk. Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rictus.com/muchado/2007/08/29/code-anatomy-becoming-real/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

