<?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>iphone &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<atom:link href="https://jessewarden.com/tag/iphone/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Tue, 05 Jul 2011 15:42:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://jessewarden.com/wp-content/uploads/2016/08/cropped-Lambda2-32x32.png</url>
	<title>iphone &#8211; Software, Fitness, and Gaming &#8211; Jesse Warden</title>
	<link>https://jessewarden.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Corona Game Example: OOP, Scope, and Box2D Collisions &#8211; Part 1</title>
		<link>https://jessewarden.com/2011/07/corona-game-example-oop-scope-box2d-collisions-part-1.html</link>
					<comments>https://jessewarden.com/2011/07/corona-game-example-oop-scope-box2d-collisions-part-1.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Tue, 05 Jul 2011 00:02:37 +0000</pubDate>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[1942]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[corona]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[programming]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2733</guid>

					<description><![CDATA[I took a break from working on another side project to devote my Sunday and part of my Monday to playing more with Corona. Specifically, I wanted to: Learn how to do better OOP in Lua Learn how to extend the base Corona GUI classes like Group Learn about collision detection via their Box2D implementation [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I took a break from working on another side project to devote my Sunday and part of my Monday to playing more with <a href="http://www.anscamobile.com/corona/">Corona</a>. Specifically, I wanted to:</p>
<ul>
<li>Learn how to do better OOP in Lua</li>
<li>Learn how to extend the base Corona GUI classes like Group</li>
<li>Learn about collision detection via their Box2D implementation</li>
</ul>
<p>Mutha-grabbin success.</p>
<p>I set out to re-build <a href="http://en.wikipedia.org/wiki/1942_(video_game)">1942</a>. It&#8217;s the perfect Corona game in that it has a lot collisions, sprites, and simple bitmap animations. I want to talk about what I learned in my 2 days. If you&#8217;re not familiar with Lua and know some ActionScript, hit my <a href="http://jessewarden.com/2011/01/lua-for-actionscript-developers.html">Lua for ActionScript Programmers Crash Course</a> and check out a <a href="http://jessewarden.com/2011/02/corona-game-example-balloon-pop.html">more simple example</a> first. Here&#8217;s a quick sample video. You can <a href="https://github.com/JesterXL/PlaneShooter">download/follow</a> the code on Github.</p>
<p><iframe width="640" height="390" src="http://www.youtube.com/embed/hxPEJceyTZw" frameborder="0" allowfullscreen></iframe></p>
<p><span id="more-2733"></span><strong>OOP in Lua</strong></p>
<p>No one agrees on the best way to do OOP in Lua, specifically for Corona development. The official Lua docs give at leaste 2 different ways, and only 1 shows inheritance. This isn&#8217;t to say you can&#8217;t do inheritance with the first example, but this is a recurring theme I&#8217;m seeing: a blasÃ© approach to OOP in Lua. Whether this is because the use of polymorphism and inheritance is seen as &#8220;over kill&#8221; for a lightweight scripting language, or is too old skool for a functional language, has seriously made it challenging for me to feel secure in what I&#8217;m doing.</p>
<p>ActionScript had a pretty standard path with only a few disagreements un-related to the actual result.</p>
<ol>
<li>in Flash 5 &amp; 6 with ActionScript 1, we used Object.prototype. While prototypes were mutable, most purists didn&#8217;t edit them at runtime. These were basically classes and is how some classes are implemented in JavaScript. Calling a prototype extension a &#8220;class&#8221; offends some people, but it works. You get sub and super classes with inheritance and polymorphism.</li>
<li>in Flash 7 &amp; 8 with ActionScript 2, we had classes that looked like Java. While it compiled to AS1 prototypes, the advent of proper packages helped us scale larger class structures.</li>
<li>in Flash 9 &amp; 10 with ActionScript 3, we have classes where the prototype is immutable, and we now have enforced access rights via private and protected.</li>
</ol>
<p>While the <a href="http://swfoo.quantumwave.com/?p=73">Rebel Alliance</a> had their own implementation of YourClass.prototype, and no one to this day agrees on how you create a Singleton, at least it&#8217;s pretty easy to tell if you&#8217;re doing something &#8220;the AS3 way&#8221; or not.</p>
<p>Contrast this with Lua specifically in a Corona context. So far, the 3 approaches I&#8217;ve found are:</p>
<ol>
<li>Use <a href="http://lua-users.org/wiki/MetamethodsTutorial">metatables</a> (from <a href="http://www.lua.org/pil/16.1.html">the main docs</a>). Notice no easy way to call super in the <a href="http://www.lua.org/pil/16.2.html">inheritance example</a>.</li>
<li>Another example which also has a <a href="http://lua-users.org/wiki/InheritanceTutorial">fake prototype</a> (also whack sub-classes compared to what I&#8217;m used too). If you liked AS1, you&#8217;ll totally understand their example&#8230; until you to try to sub-class it.</li>
<li>Use one of the 3rd party libraries like <a href="https://github.com/kikito/middleclass">middleclass</a> (thanks for the suggestion, <a href="http://twitter.com/jimcheng">Jim</a>!)</li>
</ol>
<p>You can read <a href="http://lua-users.org/wiki/ObjectOrientedProgramming">all the examples</a> of just one particular site if you&#8217;re so inclined to do a deep dive.</p>
<p>Me? I just want re-usable objects that are DRY. It seems Lua is all about the re-usable and flexible objects, but how you implement DRY has no consensus.</p>
<p>For now, I&#8217;m using factory functions with no inheritance. This seems the most straightforward. When all else fails, you can use the <a href="http://www.dofactory.com/Patterns/PatternDecorator.aspx">Decorator</a> pattern to add behavior you need without inheritance, and just &#8220;remembering&#8221; the interface via convention. I don&#8217;t know if any of you Flash Devs remember Flash MX&#8217;s DataProvider, or even the <a href="http://jessewarden.com/2005/06/dataselector-data-interaction-core-of-the-v2-framework-for-your-views.html">DataSelector</a>; it would overwrite the Array.prototype and your Class&#8217; prototype so you could implement the Observer pattern with a simple Array. Basically the same thing here; add the methods you want on a class at runtime since everything&#8217;s dynamic.</p>
<p>A word of warning for you Flash devs: you&#8217;re going to start to find all the old problems un-solved. I say &#8220;un-solved&#8221; and I&#8217;m sure there is some LuaÂ veteranÂ going &#8220;what problem&#8230;?&#8221; in his/her head. Specifically all the scope issues we had in AS1/AS2 using <a href="http://www.mikechambers.com/blog/2008/10/08/function-closures-and-this-in-actionscript-3/">Activation Objects</a>, and <a href="http://www.actionscript.org/resources/articles/205/1/The-Delegate-Class/Page1.html">Delegate</a>. Functional afficiandos&#8217; think it&#8217;s neat&#8230; until they have a deadline (which they don&#8217;t).</p>
<p><b>Factory Functions &#038; Closures</b></p>
<p>Factory functions in Corona build things for you. Factory functions as I implement them in Corona areÂ similarÂ to attachMovie back in the AS1/AS2 days in Flash. Instead of doing &#8220;new MovieClip()&#8221;, you&#8217;d go attachMovie(&#8220;your gui thing&#8221;, YourClassToMergeItWith). In this case, we&#8217;re creating the GUI thing, then decorating it with functions and public variables we need. It&#8217;s quick, it&#8217;s encapsulated, and calling the function gives you the object as a return value if you need it.</p>
<p><a href="http://flexblog.faratasystems.com/2006/12/04/closures-in-actionscript">Closures</a> are basically functions within a function. People go all Lady Gaga over them and I&#8217;m not sure why. They areÂ convenientÂ when quickly prototyping, yes, but once you do a DRY run over your code, they tend to disappear&#8230; *ahem*. Anyway, Lua has a lot of scope in common with JavaScript and ActionScript 1 in regards to nested objects and functions. I&#8217;m still learning the finer rules of the difference between functions functionName() and functionName = function() (huge difference in AS1 that only academics care about), but bottom line, you can define additional class like behavior on existing objects at runtime. The closures, or &#8220;functions within a function&#8221; are that additional added functionality.</p>
<p>Here&#8217;s an example of how I create an explosion animation when an enemy plane is shot in my simple <a href="https://github.com/JesterXL/PlaneShooter">PlaneShooter</a> game:</p>
<pre lang="lua">function createEnemyDeath(targetX, targetY)
	local si = sprite.newSprite(enemyDeathSet)
	mainGroup:insert(si)
	si.name = "enemyDeathSetYo"
	si:prepare()
	function onEnd(event)
		if(event.phase == "loop") then
			event.sprite:removeSelf()
		end
	end
	si:addEventListener("sprite", onEnd)
	si:play()
	si.x = targetX
	si.y = targetY
	return si
end</pre>
<p>Notice we&#8217;re taking a Sprite sheet animation, and handling loop event (called &#8220;sprite&#8221;) inline. This, as opposed to burdening whoever is calling the createEnemyDeath function. We also do some non-factory function stuff like assume mainGroup is already created and ready to have DisplayObjects added to it.</p>
<p>Ok, that&#8217;s a simple use of a closure, but let&#8217;s show how you add behavior to existing Corona object classes via closures with intact scoping (yes yes&#8230; more on scoping in a bit). There&#8217;s a lot of code in this next snippet; just scan it, I&#8217;ll go over the relevant pieces below.</p>
<pre lang="lua">local function createPlayer()
	local img = display.newImage("plane.png")
	mainGroup:insert(img)
	img.speed = PLAYER_MOVE_SPEED -- pixels per second
	img.name = "Player"
	img.maxHitPoints = 3
	img.hitPoints = 3
	
	physics.addBody( img, { density = 1.0, friction = 0.3, bounce = 0.2, 
								bodyType = "kinematic", 
								isBullet = true, isSensor = true, isFixedRotation = true,
								filter = { categoryBits = 1, maskBits = 12 }
							} )
								
	function img:move(x, y)
		self.x = x
		self.y = y
	end
	
	function img:onBulletHit(event)
		self.hitPoints = self.hitPoints - 1
		setHealth(self.hitPoints / self.maxHitPoints)
		if(self.hitPoints <= 0) then
			self.isVisible = false
			audio.play(playerDeathSound, {loops=0})
			createPlayerDeath(self.x, self.y)
			stopPlayerInteraction()
			endGame()
		else
			audio.play(playerHitSound, {loops=0})
		end
	end
	
	function img:tick(millisecondsPassed)
		if(self.x == planeXTarget) then
			return
		else
			local deltaX = self.x - planeXTarget
			local deltaY = self.y - planeYTarget
			local dist = math.sqrt((deltaX * deltaX) + (deltaY * deltaY))

			local moveX = self.speed * (deltaX / dist)
			local moveY = self.speed * (deltaY / dist)

			if (self.speed >= dist) then
				self.x = planeXTarget
				self.y = planeYTarget
			else
				self.x = self.x - moveX
				self.y = self.y - moveY
			end
		end
			
	end
	
	return img
end</pre>
<p>This function does a lot. It takes an image and adds TONS of behavior to it. Notice how I take the image that Corona builds for me from a simple PNG, and immediately add a speed variable to it. This does 2 things. The first is it allows me to later access this variable from internal &#8220;Player&#8221; functions via self (like ActionScript&#8217;s &#8220;this&#8221;). Secondly, I basically create a &#8220;PlayerClass&#8221; that has a public speed variable. Since everything in Lua is basically a Table, and a Table is basically an ActionScript Object, it&#8217;s dynamic, so we can add whatever we want to it at runtime.</p>
<p>Ok, so that&#8217;s properties. Now onto methods. I add 3 here: move, onBulletHit, and tick. Each is unique. Notice the format of move.</p>
<pre lang="lua">function img:move(x, y)
	self.x = x
	self.y = y
end</pre>
<p>I take an instance, img, and add a method to it called move via the colon (lol!). This is a simple utility method, but shows how you can add simple utility methods inline. If things start to get duplicated, you can use the Decorator pattern mentioned above to dynamically add them later in a single space. Notice too that he has the use of &#8220;self&#8221; inside of the function. You can have faith that if he&#8217;s called correctly (more on that correctness later), he&#8217;ll have the self pointing to the img instance.</p>
<p>Let&#8217;s take a look now at &#8220;tick&#8221;, an impl method, also known as &#8220;an implementation method of an interface&#8221;. The interface here is &#8220;Jesse Warden&#8217;s convention of having all game loop participatory objects implementing a tick method which he&#8217;ll assume is there later and if not via an error in the console, then he&#8217;ll fix it&#8221;. People who like dynamic languages to make a living are strange.</p>
<pre lang="lua">function img:tick(millisecondsPassed)
	if(self.x == planeXTarget) then
		return
	else
		local deltaX = self.x - planeXTarget
		local deltaY = self.y - planeYTarget
		local dist = math.sqrt((deltaX * deltaX) + (deltaY * deltaY))

		local moveX = self.speed * (deltaX / dist)
		local moveY = self.speed * (deltaY / dist)

		if (self.speed >= dist) then
			self.x = planeXTarget
			self.y = planeYTarget
		else
			self.x = self.x - moveX
			self.y = self.y - moveY
		end
	end	
end</pre>
<p>Also this game loop method doesn&#8217;t make use of the time, we&#8217;ll ignore that for now. Just focus on a few important details. First, yet another function I&#8217;ve added dynamically to player sprite to emulate a class that has methods. Second, it has self, just like the others so it knows about itself and is independent from other instances without the need of global variables. Third, it makes use of local variables, just like var variableName used inside of ActionScript functions. Third, I still have access to all the basica Corona functionality, in this case the math.sqrt function. Fourth, because of self access, it too can access instance variables as well.</p>
<p>Normal stuff, right? Ok, now the 3rd, an event listener like ActionScript ones (has the &#8220;on&#8221; prefix, and the 1 and only parameter as event).</p>
<pre lang="lua">function img:onBulletHit(event)
	self.hitPoints = self.hitPoints - 1
	setHealth(self.hitPoints / self.maxHitPoints)
	if(self.hitPoints <= 0) then
		self.isVisible = false
		audio.play(playerDeathSound, {loops=0})
		createPlayerDeath(self.x, self.y)
		stopPlayerInteraction()
		endGame()
	else
		audio.play(playerHitSound, {loops=0})
	end
end</pre>
<p>The only thing to notice here is that I'm calling global functions. I didn't use "local" in front of setHealth, createPlayerDeath, stopPlayerInteraction, and endGame so they are global functions; meaning anyone can call them (like $global in PHP).</p>
<p>Again, standard stuff, right? So how do we ensure this "self" variable works and doesn't break...?</p>
<p><b>A Quick Intro to Lua Scope</b></p>
<p>You can read more about it at <a href="http://stackoverflow.com/questions/6345365/corona-lua-and-oop-design">Stackoverflow</a> (scroll to the bottom where jhocking answers it). Basically, the rules of accessing Tables (Objects for you ActionScript devs) goes like this:</p>
<p>When reading and writing properties, use a dot.</p>
<p>When calling functions, use a colon.</p>
<p>Why this is a feature of Lua, I'll never know, but ActionScript 1 and JavaScript have the same "feature" (read: problem if you're a Flash/Flex dev).</p>
<p>If use a dot, you have to manually pass in scope. If you use a colon, then when you use self inside the function, it points to the object you're calling the function on. Usually; again, it depends on 1 of the copious ways one can define functions. If you do it like I do above, you'll be fine.</p>
<p><b>Callback Weirdness</b></p>
<p>There are some callbacks where more advanced functional programmers will want to put a closure as their event listener handler. This is because some of Corona's events require a pointer (no, I don't know why). Let's take Box2D's collision, for example (Box2D, while a completely separate physics engine, treats Corona objects like any normal object). Here's the collision code for an enemy bullet:</p>
<pre lang="lua">function onHit(self, event)
	if(event.other.name == "Player") then
		event.other:onBulletHit()
		self:destroy()
	end
end

img.collision = onHit
img:addEventListener("collision", img)</pre>
<p>Notice the collision pointer to the function. Also notice I define it as onHit vs. img:onHit... and self is the 1st param. Confused yet? Just know that those edge cases WILL give you self as a 1st param. If not, you can wrap it in a closure like so:</p>
<pre lang="lua">obj:addEventListener("touch", function(event) self:onCustomHandler(obj, event) end)</pre>
<p><b>Collision Filters</b></p>
<p>Box2D, and thus Corona, comes with this nice feature for collision detection. Instead of having a ton of if/then or switch logic in your collision handlers, you can instead apply filters so that only certain objects trigger collision events when they collide with certain objects. In my game, the player's airplane can collide with enemy planes and enemy bullets, but not with other player airplanes, nor with his own bullets. The enemies cannot collide with each other, nor with their own bullets.</p>
<p>The problem is it makes my head hurt. Apparently others as well. So this cool guy named Brent Sorrentino made a <a href="http://developer.anscamobile.com/forum/2010/10/25/collision-filters-helper-chart">great explanation + chart</a>.</p>
<p>It helps you identify who can collide with what, and you end up with 2 numbers to use in your code, called category bits and mask bits. OT OT OT</p>
<p><img decoding="async" src="http://www.ignisdesign.com/chart.gif" width="640"></img></p>
<p>Here's the Google Spreadsheet I made to determine what bit filters I needed for my game:</p>
<p><img fetchpriority="high" decoding="async" src="http://jessewarden.com/archives/blogentryimages/collision-filters.png" width="400" height="235"></img></p>
<p>From that, I can implement the filters for my enemy bullets (just look for the filter option):</p>
<pre lang="lua">physics.addBody( img, { density = 1.0, friction = 0.3, bounce = 0.2, 
	bodyType = "kinematic", 
	isBullet = true, isSensor = true, isFixedRotation = true,
	filter = { categoryBits = 8, maskBits = 1 }
} )</pre>
<p>Now my collision events are like "Dude, I hit players only, so... simple if then statement, yo!".</p>
<p><b>Conclusions</b></p>
<p>I still haven't found the <a href="http://www.waxpraxis.org/">Branden Hall</a>, <a href="http://swfoo.quantumwave.com/">Dave Yang</a>, nor <a href="http://moock.org/">Colin Moock</a> of Lua. All the blogs I read are humble opinions from smart people. While nice, we need leadership with someone to put their foot down on how OOP works in Lua for Corona. At least we don't have a module problem like JavaScript.</p>
<p>Maybe they exist and my 5 day Corona/Lua excursion just hasn't found them yet.</p>
<p>Many of you have asked what my draw is to Corona. Mainly the built-in Physics engine with collisions, other built-in gaming API's that'd require a bit of work in Flash/Flex, ...and Lua is a nice change of pace. I give her crap, but it's fun.</p>
<p>I encourage you to take a visual scan at the left side of the <a href="http://developer.anscamobile.com/resources/apis/">API page</a>, I'm sure you'll find something you'd like to play with.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2011/07/corona-game-example-oop-scope-box2d-collisions-part-1.html/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Product #2: SoundCloud for Androidâ„¢</title>
		<link>https://jessewarden.com/2010/10/product-2-soundcloud-for-androidtm.html</link>
					<comments>https://jessewarden.com/2010/10/product-2-soundcloud-for-androidtm.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Thu, 14 Oct 2010 17:50:49 +0000</pubDate>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[applle]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[marketplace]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2489</guid>

					<description><![CDATA[I released SoundCloud for Androidâ„¢ yesterday. Â It&#8217;s an Android application built mainly for phones that allows you to play music from SoundCloud. If you&#8217;re not familiar with SoundCloud, it&#8217;s a website where artists and DJ&#8217;s can upload music. Â Users can then see, listen, and comment on this music. Â I personally use it for following others [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://soundcloudandroid.jessewarden.com/"><img decoding="async" style="padding-right: 4px; padding-bottom: 4px;" src="http://jessewarden.com/archives/soundcloud-for-android-logo.jpg" alt="" width="160" height="198" align="left" /></a>I released <a href="http://soundcloudandroid.jessewarden.com">SoundCloud for Androidâ„¢</a> yesterday. Â It&#8217;s an Android application built mainly for phones that allows you to play music from SoundCloud.</p>
<p><span id="more-2489"></span>If you&#8217;re not familiar with <a href="http://soundcloud.com">SoundCloud</a>, it&#8217;s a website where artists and DJ&#8217;s can upload music. Â Users can then see, listen, and comment on this music. Â I personally use it for following others who search the site regular and favorite music they like, as well as my favorite DJ&#8217;s. Â Since I follow them, I find new music that is hand picked by people who have stylesÂ similarlyÂ to me every week.</p>
<p>I use many music services like <a href="http://pandora.com">Pandora</a>, <a href="http://youtube.com">YouTube</a>, and online radio stations like <a href="http://di.fm">di.fm</a> and <a href="http://soma.fm">soma.fm</a>. Â For my phone, however, I couldn&#8217;t get SoundCloud and the existing apps didn&#8217;t do what I wanted. Â That, and I needed an excuse to build an Android app.</p>
<p><strong>Technical Details</strong></p>
<p><a href="http://soundcloudandroid.jessewarden.com/screenshots.html"><img loading="lazy" decoding="async" style="padding-right: 4px; padding-bottom: 4px;" src="http://jessewarden.com/archives/soundcloud-android-preview-1.jpg" alt="" width="320" height="480" align="left" /></a>I&#8217;ve tested it on a Google NexusOne and a Droid 2. Â What was great is that they ran the same. Â This was the biggest problem I saw when doing Flash Lite 2 &amp; 3 development for Symbian devices is that they were widly different, and some things worked on one device didn&#8217;t work the same, or at all, on others.</p>
<p>I started the application as a pure ActionScript 3 project because I couldn&#8217;t figure out what I was doing wrong with the Flex tooling until I was half-way done. Â For fun, I ported it to Flex 4 midway through just to compare the performance. Â There wasn&#8217;t a hugeÂ noticeableÂ difference like I thought there would be. Â The only things that were noticeable was that the ActionScript 3 one starts up way faster, and the Flex one uses a lot more RAM.</p>
<p>I built the components on top of Keith Peter&#8217;s <a href="http://www.minimalcomps.com/">MinimalComps</a>. Â I put a ton of my own hacks on top including invalidateProperties to beÂ consistentÂ with the Flex API, as well as a simple state system alsoÂ similarÂ to Flex for the larger, composited components. Â I utilized <a href="http://robotlegs.org">Robotlegs</a> for the architecture on top of the Views, which will make it a lot easier to port to iPhone/iPad since I&#8217;ll just change the GUI code. Â For connecting to SoundCloud&#8217;s API, I utilized Dorian Roy&#8217;s <a href="http://github.com/dasflash/Soundcloud-AS3-API/wiki">SoundCloud AS3 wrapper</a>. Â I had to hack it a little for GET requests, but <a href="http://dasflash.com/">Dorian</a> knows about it. Â I used <a href="http://www.jetbrains.com/idea/">Intellij</a> in the beginning for about 1 week, and later <a href="http://www.adobe.com/products/flashbuilder/">Flash Builder</a> 4 and mxmlc to test locally, and just ran the command line Terminal on my Mac to create the APK (application files used to install on Android devices), and install to the device connected via USB.</p>
<p>I designed everything in <a href="http://adobe.com/products/fireworks/">Fireworks</a>, created the site in <a href="http://adobe.com/products/dreamweaver/">Dreamweaver</a>, and crated some visual assets in <a href="http://adobe.com/products/flash/">Flash</a>. Â Adobe discourages the use of the drawing API on AIR for Android, so some of the things I just made dynamic MovieClips in Flash.</p>
<p>I spent 2 weeks on it in my spare time; 5 minutes one night, 4 hours another, and weekends.</p>
<p><strong>Challenges</strong></p>
<p><a href="http://soundcloudandroid.jessewarden.com/screenshots.html"><img loading="lazy" decoding="async" style="padding-right: 4px; padding-bottom: 4px;" src="http://jessewarden.com/archives/soundcloud-android-preview-3.jpg" alt="" width="320" height="202" align="left" /></a>There were a lot of challenges. Â First off, no one seemed interested in helping me get Flex up and running on the forum. Â When Renaun &amp; Joe finally figured out what I was asking, they pointed me to some older setup docs which do work&#8230; but are seriously ridiculous. Â This isn&#8217;t the fault of Adobe; the tooling isn&#8217;t ready yet. Â However, if it ISN&#8217;T ready by the time they launch, they won&#8217;t get much traction. Â You should be able to just &#8220;create an Android Project&#8221; in Flash Builder. Â The whole create a Flex web project, and then delete your main file, create a pure AS file, and then add AIR nature is just too much hassle.</p>
<p>Secondly, Flex bias is apparent. Â Whether they are afraid &#8220;slow Flex apps&#8221; will give AIR for Android a bad name, they&#8217;re still angry at Adobe not treating pure AS3 developers like first class citizens, or are frustrated at all the young whipper snappers who don&#8217;t appreciate their pain from the Flash Lite days, it&#8217;s pretty clear there are 2 camps. Â This isn&#8217;t healthy, but I don&#8217;t know how to fix it. Â On the web, it&#8217;s different. Â If you have large clients creating large applications, you use Flex. Â If you have agency clients, you use Flash; it&#8217;s pretty black and white. Â On mobile, I reckon we&#8217;re still figuring things out.</p>
<p>Third, I was pleasantly surprised by ActionScript&#8217;s performance on the devices. Â It was the actual refresh rate/frame rates that were depressing. Â I&#8217;m getting the same FPS I was getting 4 years ago on a Nokia 6680 using ActinScript 2 on Flash Lite 2.1. Â That, folks, is depressing (no optimization in both cases).</p>
<p>Fourth, some of the optimizations you&#8217;re required to do seem unrealistic and unreasonable. Â For example, I get creating bitmaps at the size you&#8217;ll actually use them. Â But creating bitmaps as powers of 2, manually stopping events from bubbling, and adding final onto your functions everywhere just seemsÂ ridiculous. Â The cacheAsBitmap, cacheAsBitmapMatrix, and scrollRect uses are still reasonable, although, still challenging in creating applications. Â For the bitmaps, it&#8217;d help if Adobe created tools to help you ensure you&#8217;re bitmaps are optimized for devices size wise, whether export dialogues for Photoshop/Fireworks, or import dialogues for Flash/Flash Builder. Â For event bubbling, no clue what Adobe can do. Â For the final and other ActionScript optimizations, they just need to make adt better; optimize AS3 for the devices. Â This is round 1, so they TOTALLY get a free ride till version 2. Â Remember, AS3 for Flash Player 9, while insanely faster than AS1/2, still had a ton of optimization done for it in 10 and even more in 10.1, so clearly they have room to improve here.</p>
<p>Fifth, designing for mobile is hard. Â It&#8217;s like 2004. Â For exampleÂ <a href="http://www.adobe.com/devnet/air/flex/articles/writing_multiscreen_air_apps.html">PPI</a>, pixels per inch, affects how big your buttons and graphics should be. Â The devices we&#8217;re running on have insanely high resolutions. Â This means that while the graphics may look like <a href="http://www.fisher-price.com/">Fisher Price</a> (over sized, kid like) on your screen, they can actually be quite small on your phone. Â Since the current Android devices I use have horrible touch interactions that aren&#8217;t as sensitive nor as responsive as iPhone/iPad, you really need to make buttons larger than the recommended 46&#215;46 to ensure your app is usable. Â I recommend 72&#215;72, minimum. Â This puts a strain on an already real-estate constrained interface. Â You don&#8217;t have a lot of room to start with. Â Combine those challenges with the need to support rotated interfaces; either you scale your interface, you change it&#8217;s look and feel, or you go a step up and change functionality entirely when someone rotates the device to landscape. Â Finally, I have to completely redesign the same app for iPhone since they have different GUI guidelines&#8230; and iPad because it&#8217;s larger&#8230; Â dear god&#8230;</p>
<p>Sixth, coding user interactions for mobile is hard. Â For the browser, we&#8217;ve never had goodÂ integrationÂ in Flash. Â It took half a decade to get a decent SWFAddress, and even now, in 2010, there are a ton of Flash websites and FlexÂ applicationsÂ that don&#8217;t support the back button correctly. Â This is no longer a technological problem, but a design one. Â For AIR for Android, we have all the hooks IN the Keyboard code. Â This is great. Â However, it&#8217;s still hard to design components to support the Command pattern with undo so you can &#8220;go back&#8221;. Â Going from a search results screen to a search screen is one thing, but making each part of the app support this, as well as supporting a global history management that can tell which state should go where is&#8230; hard.</p>
<p>Seven, there are a lot of weird things mobile does that the desktop does not. Â For example, Flash Player 10.1 has optimizations so when you&#8217;re SWF isn&#8217;t in the foreground browser tab, it&#8217;ll use significantly less resources. Â For mobile apps, you&#8217;re app does somethingÂ similarÂ when it goes to the background. Â However, you have noÂ guaranteeÂ it&#8217;ll stay there; the OS could decide it needs the resources. Â Some people just do a NativeApplication.nativeApplication.exit() to stop the app entirely if it goes into the background; but some apps need to be paused in a certain state of the user gets a phone call for example, or my app which plays music. Â I&#8217;ll be checking an email, take a call, and then go back to what I was doing. Â Your app should support this workflow as well, EVEN IF it was shutdown. Â Again, this puts a lot of challenge on your code to ensure your app canÂ support starting up in certain states with data ready to go. Â Another thing to is you need to ensure you don&#8217;t go below 4 fps (the current default) when you get an Event.DEACTIVATE since some network connects will drop if you go below that. Â You can certainly set stage.frameRate to 0.01 if you wish, just make sure you don&#8217;t have any network connections you care about.</p>
<p>Eight, with the current build, audio skips when you use the phone, even to just browse/slide through your applications. Â My iPhone, and others&#8217;, doesn&#8217;t do that with the iPod app, nor does it do it when you compile the exact same ActionScript for iPhone (which,Â technicallyÂ isn&#8217;t ActionScript anymore, hehe). Â Adobe knows about it, it&#8217;s logged, and they are I&#8217;m sure challenged with prioritizing focusing on features, new features, phone specific bugs, runtime specific bugs&#8230; I wouldn&#8217;t want their job. Â While it&#8217;s disappointing a simple Sound sound class doesn&#8217;t work right while in the background, this is still early builds of a non-released product, so I&#8217;m positive they&#8217;ll fix it. Â Again, once I saw the same code working the same on 2 completely different Android devices, I was sold.</p>
<p>I&#8217;m building applications, so these challenges are specific to apps, not really games. Â They actually might have more challenges with performance that I didn&#8217;t have.</p>
<p><strong>Marketplace: The Good and Bad</strong></p>
<p>The Android Market is light years easier to sell your apps on compared to Apple&#8217;s insanity. Â I won&#8217;t go into the business ramifications in this post, but I will say it&#8217;s no lie you can have your app, on a device for sale, in less than 3 minutes. Â That&#8217;s just full of win. Â Being able to immediately see my app for sale on my phone&#8217;s marketplace that quickly is just awesome.</p>
<p>The marketplace does have problems, though. Â First off, these certificates provide no value. Â None. Â Using certificates in Android AIR development, again, is light years easier compared to the f&#8217;ing insanity you have to go through with iOS. Â You just do 1 command line entry, or just publish from CS5, and then compile your app with that file. Â However if the file changes, your entire app is considered &#8220;different&#8221;. Â I had create an entirely new app for Android&#8217;s market place, for the exact same application, because I accidentally recompiled the cert. Â With the exact same info. Â The marketplace doesn&#8217;t care, either. Â Worse, if the apps have the same package name id, it still thinks they are the same even though it just said they were different. Â They even discourage you from using their soon to be deprecatedÂ licensingÂ system. Â Again, certs provide no value, and are a royal pain in the arse. Â Screw certs, I hope they die.</p>
<p>Another problem is there isn&#8217;t an easy way to inform users of what&#8217;s changed in different versions. Â In Apple&#8217;s AppStore, you&#8217;ll often see app updates that list what changed. Â Android Marketplace doesn&#8217;t give you enough room in the description field to keep a running tally of changes.</p>
<p>Yes, the user feedback commenting system has the same problems Apple&#8217;s AppStore does.</p>
<p><strong>Conclusions</strong></p>
<p>All in all, it was an extremelyÂ pleasurableÂ experience developing my first app for AIR for Android despite the Flex bias, tools not being ready, and having to suffer in pure AS3 vs. Flex. Â It was also nice getting my first sale on the frist day it was posted!  I&#8217;ll be porting this app over to iPhone/iPad, and then start on some other ideas. Â I&#8217;llÂ definitelyÂ be doing my next app using Flex vs. pure AS3; even without Hero being ready, the Flex 4.1 SDK worked fine. Â I&#8217;m not obsessed with getting all the exact user gestures down.</p>
<p>It was also pleasurable to spend just 2 weeks on a simple app vs. 6 months. Â Since the applications for mobile can be smaller in scope, you get a quicker feeling ofÂ accomplishment.</p>
<p>Thanks to the AIR for Android team for their help, the people on the forum who put up with my mouth and helped, and Adobe for the devices to test this stuff on.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/10/product-2-soundcloud-for-androidtm.html/feed</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
			</item>
		<item>
		<title>2010: What&#8217;s Next for Flash and Flex Developers?</title>
		<link>https://jessewarden.com/2010/09/2010-whats-next-for-flash-and-flex-developers.html</link>
					<comments>https://jessewarden.com/2010/09/2010-whats-next-for-flash-and-flex-developers.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Fri, 24 Sep 2010 16:03:27 +0000</pubDate>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2457</guid>

					<description><![CDATA[Preface With all the economic and tech turmoil the past year, many have shown a yearning for something stable amidst it all. Some of the mobile &#38; device hype has actually come to fruition without Flash Player taking a starring role. This has had harsh marketing/PR consequences for many peoples continued, or lack of, faith [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>Preface</strong></p>
<p>With all the economic and tech turmoil the past year, many have shown a yearning for something stable amidst it all.  Some of the mobile &amp; device hype has actually come to fruition without Flash Player taking a starring role.  This has had harsh marketing/PR consequences for many peoples continued, or lack of, faith in the platform. Â This is ecspecially true for those of us in the Flash community for awhile; we&#8217;ve been hearing for a decade about Flash on mobile, and have long since been tired of hearing it.</p>
<p>We&#8217;ve already seen some luminaries leave the platform for iPhone like <a href="http://aralbalkan.com">Aral Balkan</a> &amp; <a href="http://bit-101.com">Keith Peters</a>, some for good, some returning (welcome back sexy man Keith).  Others have thrown in their joy with <a href="http://unity3d.com/">Unity 3D</a>.  All the while we have HTML5 deceitful propaganda biting at the heels for those of us who have stayed.</p>
<p>What&#8217;s next?  What technology is coming that we should invest our time in to ensure a continued prosperous career?  Should we stay with Flash Player? Â Is there something I can focus on that&#8217;ll help me find a niche and as an early adopter get a payoff?</p>
<p>Today, I want to layout what I think is coming the next 6 years to at least put your mind at ease if you&#8217;re a Flash/Flex Developer. Â These are my projections based on what I&#8217;ve read, corroborated from talking to colleagues and other reading, and based on past experience.</p>
<p><span id="more-2457"></span><strong>What&#8217;s Next</strong></p>
<p>Android.  And some iOS.</p>
<p><strong>Other Options?</strong></p>
<p>We have a variety of options, for sure:</p>
<p><strong>iOS</strong>: proven market, great existing devices with new ones with different verticals coming.  Growing for B2B, not just consumer.</p>
<p><strong>Unity 3D</strong>: Uses the wonderful language C#, targets PC, Mac, and iPhone, and has a lot of hardware acceleration hooks.  Has shown much success in the past 2 years, and <a href="http://techcrunch.com/2010/09/22/ea-unity/">EA&#8217;s massive investment</a> shows there&#8217;s a growing market there.</p>
<p><strong>Windows Phone 7</strong>: Again, the wonderful C# language, best developer tools in the industry, and a similar story to Adobe: a runtime that allows for desktop, web, and device (in this case mobile) delivery.</p>
<p><strong>Web</strong>: As many businesses find new ways to make money online as well as off, reduce long term costs by investing in services both for themselves and their customers, this is perhaps the most stable place to continue to be since the technology will always work in some form on various devices and existing desktop hardware. Â I&#8217;m talking the traditional HTML/JS/CSS stack with associated libraries here, regardless of your middle tier.</p>
<p><strong>Why not those?</strong></p>
<p><strong>iOS</strong>: While our recent permission to re-participate on the platform has us all feeling like it&#8217;s tenuous, there have been a few key reversals from Apple recently that does a lot to show me there isn&#8217;t any turning back now (Google Voice, Lua based games, Unreal engine, etc). Â There will be work for creating applications utilizing Flash &amp; Flex for iOS devices.  Specifically, iPhone and iPad using Adobe&#8217;s packager.  And not JUST the iPhone packagerâ€¦ we can utilize a lot of the same code &amp; assets for Android deployment as well.</p>
<p>Why do just iOS when you can do both it AND Android as well?</p>
<p>A few in the community claim to have made the transition to Cocoa just fine. Â It&#8217;s clear Cocoa isn&#8217;t for me. Â Many ran into the some challenges I had with Objective C, and it just wasn&#8217;t as fun as Flash &amp; Flex are. Â Now, we can still use Flash &amp; Flex with shared code for other devices &amp; OS&#8217;.</p>
<p><strong>Unity 3D</strong>: Yes, I too dreamed of growing up, moving to Japan, and working for <a href="http://www.square-enix.com/">Squaresoft</a>.  Then games got cool.  Then market pressure for more demand resulted in quality reduction and perceived consumer expectations being lowered.  This in turn allowed many companies to validate that making sub-par games is not only ok, but profitable.  Yes, there are many companies out there that believe in quality.  What sells right now, and has for the past 6 years especially on the web en-masse, is git-r-done engagements.</p>
<p>No thanks, I prefer to build Porches, not Kias, and see no steady money there.  That said, I still look on longingly. Â My current skill set, and those of many Flex Devs, is best at delivering applications, not games. Â That said, I&#8217;ve read of more than a few Flash devs trying and loving Unity 3D, some having half or all of their work come from that platform. Â You can make <a href="http://online.wsj.com/article/SB10001424052748703846604575447600001479266.html">$150,000 doing Flash games</a>. Â Some will even work on iOS/Android.</p>
<p>Again, Flex devs like me build applications, not games. I use MVP, not meta-tiles for reduced collision detection.</p>
<p><strong>Windows Phone 7</strong>: It doesn&#8217;t exist yet in the consumer marketplace.  We&#8217;ll know in January how it sold, and even then, I don&#8217;t think that&#8217;s a large indicator of it&#8217;s future success.  That, and there hasn&#8217;t been a lot of press about other devices beyond mobile using Windows Phone 7.  I&#8217;ve met some of the people behind this initiative, and believe Microsoft is making wonderful, and correct, strides here.</p>
<p>I just worry that the other half of Microsoft will actively sabotage the great things they&#8217;ve created. Â The web and desktop teams are SOOO different in outlook. Â I have no qualms being a late adopter here. Â Right now, there isn&#8217;t a market for my clients to target yet.</p>
<p><strong>Web</strong>: Uh, no.  I love JavaScript, but I have enough challenges with lowering my project capability expectations for Flash Player on devices.  I don&#8217;t mind lowest common denominator experiences as far as mobile concerned because at least with Flash player there are still features Flash Player can do that the browser can&#8217;t.  The little things like with getting custom deigns implemented continues to set Flash apart in this regard even on devices.</p>
<p><strong>When &amp; Where</strong></p>
<p>You can develop for <a href="http://labs.adobe.com/technologies/packagerforiphone/">iOS</a> and Android <a href="http://labs.adobe.com/technologies/air2/android/">today</a>. Â Yes, they work. Â By <a href="http://max.adobe.com/">Adobe MAX</a>, hopefully everyone can participate in the Android sphere (<a href="http://www.adobe.com/products/flash/">Flash CS5</a>&#8216;s been available for awhile).</p>
<p>Since consumer phone/device/Operator contracts go in 2 year cycles, we&#8217;ll start to get early adopters next year as more and more Android&#8217;s devices proliferate. Â This includes tablets, not just phones.  Some of the design agencies will just opt for a Flash on iPhone/iPad experience when they need something a step up from the HTML/JS capabilities since there aren&#8217;t enough Objective C coders to go around. Â Since we can share a lot of the same ActionScript code on both iPhone and Android, this&#8217;ll segueÂ nicely for sales teams looking to provide their customers &#8220;solutions across both desktop, web, and mobile&#8221; even if the mobile story continues to be fragmented.</p>
<p>Additionally, as <a href="http://jessewarden.com/2010/07/interview-with-jesse-freeman-jxltv-episode-9.html">Jesse Freeman pointed out</a> awhile ago, it&#8217;s really cheap to get a Flash Designer to prototypeÂ applicationsÂ using Flash vs. Objective C. Â Many companies such as T-Mobile have been using Flash to prototype for C on phones for awhile.</p>
<p>Some participation with existing, already on-staff skillets for experiences that are good enough for consumers will sell.</p>
<p>For service providers such as <a href="http://webappsolution.com">my company</a> (we build software solutions for other businesses), I don&#8217;t think it&#8217;ll pop up as fast; maybe not till 2014.  In fact, we may just get off loaded to by Agencies who don&#8217;t have on-staff competency for more of the CPU/RAM intensive projects that are non-game related such as data visualization, or the larger applications for a device and running into scalability problems. Â Flash Player runs great on the web, yet I still often get scalability jobs regarding Flash Player web/desktop projects.</p>
<p>Where we WILL see work is when some companies, even for the wrong reasons, need mobile versions of their web apps. Â If it&#8217;s built in Flash/Flex, it&#8217;ll need a mobile equivalent. Â So they say. Â If that mobile equivalent, or perhaps even a device other than a phone, supports Flash, then you can leverage a lot of the same code. Â More importantly, though, some of the API&#8217;s that AIR allows you to hook into allow more features than a browser can provide, so there are also cases where it&#8217;s the right reason.</p>
<p>In 2012 there should be a slight up tick as people finally renew their aging phones for Android/iOS devices, and start bringing them to their workplace.  It&#8217;ll only take another year for businesses to start seeing this (again), and start targeting consumer applications for devices.  By then, <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero">Hero</a> (Flex 5 SDK with mobile focus) will have matured, and Adobe will have learned what areas need improvement.  By 2014, it won&#8217;t be considered &#8220;risky&#8221; to utilize the Flex SDK for a project vs. straight AS3; it&#8217;ll be the preferred method for people like me vs. the current way of using pure ActionScript 3.</p>
<p><strong>Flash/AS3 Developers</strong></p>
<p>You have it best right now. Â You are the ones most capable to participate, today. Â You really have a chance to make a name for yourself. Â I&#8217;ve been following the Flash Lite email lists for awhile; the community is small. Â Good opportunity. Â You may get early adopter clients this year; next year things should start to pick up from many different types of clients as the brave ones start to explore.</p>
<p><strong>Flex Devs</strong></p>
<p>If you have the time, I encourage you to give the Android/iOS builders a try. Â If pure AS3 isn&#8217;t your thing, give the native Android development a try; it&#8217;s veryÂ similarÂ to Flex. Â If you&#8217;re willing to drop back to pure AS3/small component libraries with no MXML, you couldÂ definitelyÂ prosper here if apps really do take off (as opposed to traditional games and other ad ware that will beÂ inevitablyÂ be developed by the agencies; that crap is already proliferating on the app store and companies DO get paid to make it).</p>
<p><strong>Any Negatives? Â You&#8217;re being pretty positive here</strong></p>
<p>Two.</p>
<p>First, I&#8217;ve been lurking on the Flash Lite email lists for about 5 years. Â I watch developers who make content for mobile using Flash Lite (Flash 5 basically), and I learn about their development challenges. Â The one thing that scares me is they have basic problems that shouldn&#8217;t happen. Â For example, loadMovie (Loader/URLLoader/URLStream.load for those not in the know) just won&#8217;t work correctly&#8230; ON SOME PHONES. Others, it&#8217;ll work the same.</p>
<p>I can confirm that AIR for Android works great. Â For Nexus One. Â I haven&#8217;t tried it on other Android phones/devices, so I don&#8217;t know if fragmentation is a huge problem beyond the obvious performance one yet. Â I also haven&#8217;t done a larger Enterprise esque&#8217; project on it yet to truly battle test her. Â I can confirm Flash Lite is also good technology, having a lot of fun with Flash Lite 2.x 4 years ago on a Nokia 6680.</p>
<p>That&#8217;s what scares me. Â Operators do stupid things. Â I&#8217;ve already read articles about Java&#8217;s fragmentation on Android phones (the device stats I&#8217;ve seen aren&#8217;t really that valuable yet) like some phones have 2.0, others 2.2, and even some of the 2.2 Froyo where the Operator hasn&#8217;t confirmed it&#8217;ll actually have Flash. *face palm*. Â I haven&#8217;t gotten any insight if the JVM for various devices has any notable quirks like I know Symbian does for Nokia phones. Â I have more faith in Google making Android than I doÂ MotorolaÂ making a custom version of it with their bloatware, and us all hoping it works the same. Â Time will tell (a hopefully positive story).</p>
<p>Second, if it takes off next year, this is more ammo for pure ActionScripters like<a href="http://stevensacks.net"> Steven Sacks</a> and <a href="http://jessefreeman.com/">Jesse Freeman</a> to continue ignoring <a href="http://adobe.com/products/flex/">Flex</a> for applications that should of been built in Flex instead of pure ActionScript. Â Once the phones get powerful enough to run Flex, they&#8217;ll still swear by their Button being faster than a Flex Button, even though the user&#8217;s can&#8217;t tell. Â Dammit.</p>
<p><span style="color: #000000;"><strong>Conclusion</strong></span></p>
<p><span style="color: #000000;">If you&#8217;re a Flash/Flex Developer, and wondering what is next, it&#8217;s developing mobile Android and iOS applications using Flash and Flex IN ADDITION to your existing skill set.</span></p>
<p><span style="color: #000000;">It won&#8217;t take off as quickly as Flex did. Â We have these things called &#8220;Operators who think they can draw well&#8221; and &#8220;Google without Designers&#8221; and &#8220;Cupertino<span style="color: #444444;"> </span>Illusionist&#8221; and &#8220;recession&#8221; and &#8220;people who see beyond the hype&#8221; all collectively slowing it down.</span></p>
<p><span style="color: #000000;">I know it&#8217;s not as exciting as going from Director to Flash, or Flash to Flex, or Flash to Unity. Â There&#8217;s a reason there aren&#8217;t any exclamation points in this post (yes, JXL blog post with no !&#8230; er, shit&#8230; there&#8217;s one). Â At least, it doesn&#8217;t feel very exciting to me since the market just doesn&#8217;t seem to be there yet, and the current phones/tech is just slow compared to what I&#8217;m used to. Â And I&#8217;ve been hearing about it for 10 years, and still won&#8217;t see a decent pay off for another 2. Â I&#8217;m not seeing any signs it&#8217;s NOT going to be there in the timetables I mentioned above, though.</span></p>
<p><span style="color: #000000;">Seriously though folks, once Apple said we could play in their sandbox again, it actually increased the value of our ability to target Android as well. Â Suddenly ubiquity via Flash is in play again. Â It&#8217;s just on devices that are still slow, and Adobe&#8217;s only been optimizing for them for 3 years (maybe more based on <a href="http://www.mozilla.org/projects/tamarin/">Tamarin</a> <a href="http://hg.mozilla.org/tamarin-redux/summary">checkins</a>).</span></p>
<p><span style="color: #000000;">Remember, too, a lot of web content is optimized for mobile, like this blog. Â Optimizing for mobile is no longer a &#8220;omg, more work, less dough&#8221; scenario; it&#8217;s just expected that&#8217;s what you do. Â There will be a lot of Flash content that will need to be optimized to run on Android device browsers as well in the desktop browser as opposed to making an application in AIR. Â Keep in mind that&#8217;s not just &#8220;2 screens&#8221; either; it could be 3, or when one rotates/flips it. Â That&#8217;s a lot of work that you can get paid for.</span></p>
<p><span style="color: #000000;"><strong>Breathe &amp; Go Download Starcraft 2</strong></span></p>
<p><span style="color: #000000;">So there it is. Â Relax, you don&#8217;t have to learn HTML5 nor Objective C. Â Unless you want to, in which case, pimp. Â You can rely on the web for most of your income, and mobile/devices will eventually pay off your investment in it. Â I wish I could make it more exciting, but the truth in this case, while cool, isn&#8217;t as cool as <a href="http://starcraft2.com/">Starcraft 2</a>.</span></p>
<p><span style="color: #000000;">The good news is, since technology changes so fast, there may be something epic-cool that comes out of this recession. Â This one has been harsh, and recessions often spawn magic. Â There&#8217;s no reason we couldn&#8217;t abandon the above plan and jump on whatever that new technology is. Â I just haven&#8217;t seen it yet.</span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/09/2010-whats-next-for-flash-and-flex-developers.html/feed</wfw:commentRss>
			<slash:comments>34</slash:comments>
		
		
			</item>
		<item>
		<title>Cocoa Chronicles #1: ActionScript vs. Objective C</title>
		<link>https://jessewarden.com/2010/04/cocoa-chronicles-1-actionscript-vs-objective-c.html</link>
					<comments>https://jessewarden.com/2010/04/cocoa-chronicles-1-actionscript-vs-objective-c.html#comments</comments>
		
		<dc:creator><![CDATA[JesterXL]]></dc:creator>
		<pubDate>Mon, 26 Apr 2010 16:59:08 +0000</pubDate>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective c]]></category>
		<guid isPermaLink="false">http://jessewarden.com/?p=2146</guid>

					<description><![CDATA[Skip Intro *** Update: Paul Taylor (@guyinthechair) has a more recent post on the same subject. *** *** NOTE: I&#8217;m a n00b at Cocoa and Objective C. Unlike Python, I don&#8217;t like learning it, either. If you perceive something below is inaccurate, please comment, and I&#8217;ll update. *** Preface I was having a lot of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://jessewarden.com/2010/04/cocoa-chronicles-1-actionscript-vs-objective-c.html#intro">Skip Intro</a></p>
<p>*** <strong>Update</strong>: Paul Taylor (<a href="http://twitter.com/guyinthechair">@guyinthechair</a>) has a <a href="http://guyinthechair.com/2011/02/flash-to-objective-c-syntax-part-1/">more recent post</a> on the same subject. ***</p>
<p>*** NOTE: I&#8217;m a n00b at Cocoa and Objective C.  Unlike Python, I don&#8217;t like learning it, either.  If you perceive something below is inaccurate, please comment, and I&#8217;ll update. ***</p>
<p><strong>Preface</strong></p>
<p>I was having a lot of fun using the <a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">iPhone packager</a>.Â Then <a href="http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler">Apple changed their licensing</a> to prevent people like me from using ActionScript for iPhone/iPad, and instead being forced to use their toolsets, or those unofficially approved.  At first I was furious.  Then I tried to get a simple list to scroll in AS3.  Even using a fake mask, device fonts, and cacheAsBitmap for all items + container, it just wasn&#8217;t smooth, even with just 30 items, regardless of frame rate.  If you use an out of the box UITableView in Cocoa, it &#8220;just works&#8221;.</p>
<p><span id="more-2146"></span>I built my career on Flash Player because &#8220;it just works&#8221;.  It doesn&#8217;t &#8220;just work&#8221; on the iPhone, and now it&#8217;s effectively illegal to use.  That, and Adobe has apparently <a href="http://www.mikechambers.com/blog/2010/04/20/on-adobe-flash-cs5-and-iphone-applications/">abandoned ship</a> on the iPhone/iPad/iTouch portion, and instead are focusing on Android.</p>
<p>I was amazed at what I could do using Flash Lite 2 on my Nokia 6680 3 years ago.  AS3 was all the rage, and yet I took the time to build a <a href="http://code.google.com/p/shurikencomponents/">component framework</a> in AS2 for use on devices because I felt it was &#8220;good enough&#8221; to build experiences for consumers.  That market never materialized unless you targeted Japan (which I didn&#8217;t).</p>
<p>After finally getting my simple SWF to compile to the iPhone, I was estatic at how easy it was to design &amp; code in what I knew, it just worked, and looked like I expected it to.  Once I started moving things via <a href="http://www.greensock.com/tweenlite/">TweenLite</a>, though, it all went downhill.  I don&#8217;t have these problems in Flex.  If I use a List control in Flex, it just works; I don&#8217;t have to be an AS3 game developer to theorize on GPU acceleration possibilities to get the best list scrolling performance.  I don&#8217;t have these problems, at least from what I&#8217;m initially seeing in my early learnings, with Cocoa.</p>
<p>So, I&#8217;m learning Objective C so I can execute the ideas I have for iPhone and iPad.  Unlike PHP, Ruby on Rails, and Python &amp; Django, this has been a pretty miserable experience.  Python and Django are my choices for back-ends currently&#8230; but I don&#8217;t really have a &#8220;choice&#8221; for front ends on iPhone/iPad.</p>
<p>In an effort to reduce the pain for others as well as help myself retain this knowledge, I&#8217;m writing it down.</p>
<p>I understand it might seem strange since Android is a lot easier to develop for, and Flash Player 10.1 actually runs natively on the phone&#8230; and well, I might add.  For me, there are 3 reasons.  First, there is no market right now.  Yes, I understand we help create it, but I own an iPhone and iPad.  I love them, and so do others.  I have a gateway to others right now via the app store, and want to empower them to use my apps.  Secondly, if you&#8217;ve ever used an iPad, the additional screen real estate just fills you with ideas.  Third, everyone wants an app right now.  While the consumer data shows it&#8217;s hard to make money, it&#8217;s REALLY easy to make money for services; aka, a company hires you to build an app for them.  This is especially true with the OS4 announcement of Enterprises having more control over deploying their own applications.</p>
<p>Another good primer for me, Objective C for the ActionScript Developer, is Keith Peter&#8217;s five tutorials.  He doesn&#8217;t really cover the UIKit, just Objective C in general which is a great first start.</p>
<ol>
<li><a href="http://www.bit-101.com/blog/?p=1784">AS3 to iPhone Tutorial 1</a></li>
<li><a href="http://www.bit-101.com/blog/?p=1793">AS3 to iPhone Tutorial 2</a></li>
<li><a href="http://www.bit-101.com/blog/?p=1798">AS3 to iPhone Tutorial 3</a></li>
<li><a href="http://www.bit-101.com/blog/?p=1812">AS3 to iPhone Tutorial 4</a></li>
<li><a href="http://www.bit-101.com/blog/?p=1824">AS3 to iPhone Tutorial 5</a></li>
</ol>
<p><a name="intro"></a><strong>Introduction: Nomenclature</strong></p>
<p>There are a lot of new terms to learn.  I just want my code to run on the iPhone, yet I have to learn a bunch of new terminology to ensure I understand what it entails, as well as their &#8220;meaning&#8221;.  For example, MVC means something different to Objective C guys than it does to us.  Yes, it&#8217;s subtle, but when they say it, it&#8217;s assumed you mean &#8220;their&#8221; version.  It helps to know what the nomenclature of the Cocoa community is to learn, so first up, here&#8217;s some common terms.</p>
<p><strong><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/WhatIsCocoa.html#//apple_ref/doc/uid/TP40002974-CH3-SW16">Cocoa</a></strong>: The API you code in for the Mac.  It&#8217;s like saying &#8220;Flex&#8221;; it&#8217;s all the things that fall under &#8220;Flex&#8221; like the compiler, the sdk, the ide, the runtime, etc.  However, it&#8217;s a lot more than that.  For example, there are Human Interface Guidelines that Apple puts out that Cocoa apps need to comply with (I don&#8217;t currently know how this is enforced, excluding iPhone/iPad).  For the sake of this article, all you care about is &#8220;Foundation&#8221; and &#8220;UIKit&#8221;, 2 libraries that make up a lot of what people know of as Cocoa for iPhone.  It&#8217;s also built on the MVC concepts we&#8217;re used to.  The main difference is Cocoa is huge; it is a layer atop an OS, whereas Flex is a layer atop the Flash Player.</p>
<p><strong><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html#//apple_ref/doc/uid/TP30001163">Objective C</a></strong>: C like programming language you code in that borrows some cool things from Smalltalk, similar to how we code in ActionScript.  It&#8217;s from the 1980&#8217;s, and boy does it feel like it.  Anytime I start coding, I have Megadeth on in the background, my Pontiac Firebird Trans Am in the driveway does a turbo boost, and Fletch watches over me, commenting how it&#8217;s all ball bearings these days.</p>
<p><strong><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/WhatIsCocoa.html#//apple_ref/doc/uid/TP40002974-CH3-SW20">Foundation</a></strong>: Provides all the low level stuff you need and shouldn&#8217;t have to write yourself.  This includes data types like NSNumber (vs using int/float yourself), sockets, etc.  Basically, if you can&#8217;t see it in a GUI, the class is here.  Everything is prefixed with &#8220;NS&#8221; for NextStep, one of the companies responsible for the early development.</p>
<p><strong><a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/WhatIsCocoa.html#//apple_ref/doc/uid/TP40002974-CH3-SW22">UIKit</a></strong>: All your GUI controls including support classes.  Things like UIButton, UIAcceleration, etc.  The UI prefix stands for User Interface (duh).  You&#8217;ll hear about references to Application Kit; that&#8217;s the desktop version.</p>
<p><strong>Core Data</strong>: Basically the model layer of your apps.  This is actually kind of cool, and what we should have in Flex (I know of 2 people who have tried to create an open source one, and then shortly thereafter abandoned the project&#8230; too bad too).  Right now, there are things like it in LiveCycle, I believe, but only Enterprises can afford that, so its&#8217; not for &#8220;everyday use&#8221;.  Basically, you create ValueObject&#8217;s, and they can be persisted in local XML or SQL databases automatically, vs. you having to manually write Factories, parsers, and versioning.  Pimp.</p>
<p><strong>Xcode</strong>: The IDE that you code Objective C in.  You can build &amp; debug your iPhone/iPad applications directly from here.</p>
<p><strong>Interface Builder</strong>: The IDE that you use to visually build your GUI apps.  You can actually create variable &amp; method definitions here, wire them up visually, and then have it code gen the classes for you.  It can also read your header files (imagine if every ActionScript class had an interface class associated with it that defined what it did).  As a n00b, I&#8217;ve found it really easy to confuse this program and make it explode.  Also, someone forgot to add tab order when they made it.</p>
<p><strong>Objective C</strong></p>
<p>Objective C is the programming language you write your applications in.  It is effectively an extension to ANSI C with Object Oriented syntax.  In Flash and Flex, you utilize ActionScript 3.  Objective C has a lot in common with C and C++, and some of the lamesauce as well, namely pointers.  Objective C also has multiple environs it can run on while ActionScript runs in just the Flash Player.</p>
<p>If you know ActionScript 3, you can read C, and thus Objective C.  Like Java, the type definitions are on the left instead of right, but other than that, they are extremely similar.  Like another article mentioned, if C didn&#8217;t have pointers, PHP and C would be nearly the exact same.  Since Objective C has a lot in common with C, they too are similar.</p>
<p>If you&#8217;re coding Objective C for the iPhone/iPad, you don&#8217;t get Garbage Collection, and have to manually get rid of your variables/objects.  Once you get used to the syntax, it&#8217;s almost the exact same as cleaning up your mess in ActionScript.  In ActionScript, you set your Object references to null; in Objective C it&#8217;s called nil.  More on that insanity later.</p>
<p>You can read more here about <a href="http://developer.apple.com/mac/library/documentation/cocoa/conceptual/ObjectiveC/Introduction/introObjectiveC.html">here</a>.</p>
<p>Yes, you code in Objective C 2, not 1.  1 is even more lame than 2 (thankfully?).</p>
<p><strong>Objective C Syntax: Methods</strong></p>
<p>Objective C has a lot of the same things that ActionScript 3 has.  They both use the same bracket syntax, and have the same cuddled vs. not wars.  They both end lines with semi-colons.  There isn&#8217;t as much dot syntax.  They both have methods.  Here&#8217;s how you invoke one in ActionScript:</p>
<pre lang="actionscript3">mySound.setVolume();</pre>
<p>Here&#8217;s how you invoke it in Objective C:</p>
<pre lang="objc">[mySound setVolume];</pre>
<p>Notice in Objective C, they use brackets to indicate the containment of a method call.  You can nest these as well, but they recommend you only go 2 deep since it becomes un-readable after that.</p>
<p>Here&#8217;s ActionScript storing a return value:</p>
<pre lang="actionscript3">volume = mySound.getVolume();</pre>
<p>Here&#8217;s Objective C doing the same:</p>
<pre lang="objc">volume = [mySound getVolume];</pre>
<p>Passing in parameters is a little different and takes some getting used to.  This, to me, is the same thing that threw me off in Ruby, and where Objective C totally ignores how C does it.  Here&#8217;s ActionScript:</p>
<pre lang="actionscript3">mySound.setVolume(value);</pre>
<p>And here&#8217;s Objective C:</p>
<pre lang="objc">[mySound setVolume:value];</pre>
<p>Ok, not so bad&#8230; except, the 1st parameter is always the only one WITHOUT a named parameter.  Observe the following ActionScript 3 function with 2 parameters:</p>
<pre lang="actionscript3">mySound.setLeftAndRightPan(left, right);</pre>
<p>&#8230;and Objective C:</p>
<pre lang="objc">[mySound setLeftAndRightPan:left, rightValue:right]</pre>
<p>Notice there is no &#8220;leftValue:left&#8221; here, just left.  The first parameter is always nameless, yet every one after it has one.  I guess they wanted more obvious parameters during function invocations&#8230; except forgot to build in one for the 1st parameter.  *face palm*</p>
<p>For example, here&#8217;s an ActionScript 3 function definition:</p>
<pre lang="actionscript3">private function setLeftAndRightPan(left:Number=0, right:Number=0):void</pre>
<p>Here&#8217;s the equivalent Objective C:</p>
<pre lang="objc">- (void)setLeftAndRightPan:(NSNumber*)left, right:(NSNumber*)rightValue</pre>
<p>Notice 4 important things.  First, the return type is in the beginning and wrapped in paranethesis (void in this case).  Second, notice that Objective C doesn&#8217;t allow for default values for function parameters like ActionScript.  Third, notice the type definitions for the function parameters are in the left side vs. the right (in this case NSNumber).  We&#8217;ll get to the asterisk later.  Fourth, notice the dash in the very beginning.  That signifies that this is an instance method on the class.  If you want ActionScript&#8217;s static, use + instead.</p>
<p><strong>Objective C Syntax: Variables</strong></p>
<p>Variables are slightly different because Objective C has pointers as well of built-in helper methods to make memory management easier.</p>
<p>Here&#8217;s a variable in ActionScript, first defined using a String literal (pimp syntax) and the old school way:</p>
<pre lang="actionscript3">private var name:String = "";
private var name:String = new String();</pre>
<p>And here&#8217;s one in Objective C:</p>
<pre lang="objc">NSString* name = [NSString string];</pre>
<p>There are a ton of caveats here.  Notice we&#8217;re calling the string method on NSString; it&#8217;s basically a factory method to give us a string; similar to going new String().  When I did &#8220;&#8221; above, it&#8217;s called a String literal; the same as going {} vs. new Object(), or [] vs. new Array().  In ActionScript, each of those constructors has nice features, the effect is the same; you get a variable of that type back.</p>
<p>Notice the asterisk in the Objective C example.  This means it&#8217;s a pointer to the String, not the actual String.  Also notice since we&#8217;re calling the string method on the NSString class, it&#8217;s autoreleasing (similar to the Doom spell in Final Fantasy; it&#8217;ll die soon; ie he&#8217;ll get ejected from the Pool soon, more on that later).  If you want the guy be like Number 1 and live forever instead of a Rico&#8217;s Roughneck, go:</p>
<pre lang="objc">NSString* name = [[NSString alloc] init]</pre>
<p>Just keep in mind you have to manually call release on him later whereas the former, you don&#8217;t.</p>
<p><strong>Objective C Syntax: Pointers &amp; Memory Management</strong></p>
<p>Variables are different because of a couple reasons.  First, since Objective C is based on C, it has all the pointer baggage.  We ActionScript Developers are spoiled because we don&#8217;t have do deal with this&#8230; or if we do, it requires little thought.</p>
<p>For example, in ActionScript, there are only 3 variable types that are by value, and thus don&#8217;t have pointers: Strings, Numbers, and Booleans.  Yes, I&#8217;m including int and uint as Numbers here.  Every other construct is an Object, and thus is passed by val.  If you wish for an Object based variable to be removed from memory eventually, you need to ensure no more references exist, or in the case of circular references, that no one else knows about the circular relationship (the Mark and Sweeper from the Garbage Collector will get those mofos).  For Numbers, Strings, and Booleans who aren&#8217;t local variables, you just remove their parent Object, and they&#8217;re toast.  For local variables, they go away at the end of the function (usually&#8230; depends on how aggressive the Garbage Collector is at that moment in time).</p>
<p>For Objects, you just remove all references, usually by setting them to null, or in the case of dynamic Objects like Dictionary or Object hash maps, using the delete keyword.</p>
<p>Objective C&#8217;s iPhone runtime, and ActionScript&#8217;s Flash Player both operate using reference counting.  This means, for Objects, an internal number is incremented for every person who &#8220;knows&#8221; about an Object.  When that person later set&#8217;s his reference to null, that reference count goes down.  When that reference count reaches 0, it&#8217;s eligible for Garbage Collection.  The Flash Player also has a Mark and Sweep part to take care of circular references in the case where 2 Objects know about each other, yet no one knows in your app knows about them, and thus their reference count will never reach zero.  If you&#8217;re running on the iPhone, you don&#8217;t have Garbage Collection, so need to call release yourself (which calls dealloc internally).  In ActionScript, you&#8217;d either null the reference out, or call your own destroy method, THEN null reference out.</p>
<p>Objective C has this built in as a method called dealloc.  You don&#8217;t call, it gets called for you when you (or someone else) calls release.  In ActionScript, people will either use a convention of public function destroy, or those fu@#(* IDestroy marker interfaces that people NEVER implement fully (did I mention that&#8217;s annoying?).</p>
<p>In ActionScript, for a complex class, it may look something like this:</p>
<pre lang="actionscript3">public function destroy():void
{
	if(timer)
	{
		timer.removeEventListener(TimerEvent.TIMER, onTick);
		timer.stop();
		timer = null;
	}

	if(icon)
		icon.bitmapData.dispose();
}</pre>
<p>In Objective C, this is built-in to NSObject, one of the main classes you often extend.  The Objective C version of the above would look like:</p>
<pre lang="objc">-(void)dealloc
{
   [timer release]
   [icon release]
   [super dealloc]
}</pre>
<p>As learn about how getter/setters are built into Objective C, you&#8217;ll see there is a better, and more common way to do the above (article I link to at the bottom describes this), but I need to get the point across here that you&#8217;re expected to clean up your own mess since Garbage Collection doesn&#8217;t exist, and everything can&#8217;t be an autorelease variable.</p>
<p><strong>No Local Variables, Hence Autorelease &amp; T3h Pool</strong></p>
<p>In ActionScript, we have local variables.  Basically, instead of storing it in memory, it&#8217;s stored in temporary memory that the stack is using (the stack of functions currently running).  When one stack item is done (your function is done), those variables are removed.  In ActionScript&#8217;s case, this isn&#8217;t immediate, but basically ensures that no one has references to those variables anymore.  Later, Garbage Collection will come along and eat&#8217; em.</p>
<p>Objective C doesn&#8217;t have local variables.  Yes, I know, I&#8217;m face palming as well.</p>
<p>*deep breath* There IS a common way to deal with it.  Your first thought may be to create a bunch of member variables; basically what game developers do for simple Object Pooling.  That&#8217;s ghetto, though.  You may think you could just create variables on the fly&#8230; the problem with that is you have to manually release them, and for return values, they&#8217;ll die before they get returned.</p>
<p>This is where autorelease comes in.  Remember before when I talked about the 2 ways to create variables?  Let&#8217;s revisit it, and show again how you kill things.</p>
<p>This creates a variable you must manually remove:</p>
<pre lang="objc">NSString* name = [[NSString alloc] init];
[name release];</pre>
<p>&#8230; and she&#8217;s dead.  However, here&#8217;s one that&#8217;ll be added to a pool, or rather &#8220;a Pool&#8221;:</p>
<pre lang="objc">NSString* name = [NSString string];</pre>
<p>This is the same as doing:</p>
<pre lang="objc">NSString* name = [[NSString alloc] init];
[name autorelease];</pre>
<p>You can then safely return these variables from functions, knowing that the caller will get it.  It&#8217;s also considered good practice to do, specifically for encapsulation.  There isn&#8217;t really a language construct to say &#8220;Hey dude, this guy is going to send you a variable it also has a pointer to, so please make sure you call his release first&#8221;.  Crap like that is insane; it&#8217;s just easier to get either copy&#8217;s of variables so you don&#8217;t inherit their pointer baggage, or use autorelease so you don&#8217;t piss off people getting variables from you, and causing leaks if they forget to kill you first.</p>
<p>Yes, all of that above is a shortened version of what you have to do because there are no local variables.  Yes, I&#8217;m face palming again.</p>
<p>If you&#8217;re curious about what this Pool is, imagine if a static class was created every time you ran some code.. and Garbage Collection ran immediately when you null&#8217;ed out your variables.  The first thing it did was keep a reference to any variable that has autorelease on it.  Then, 1 frame after the stack has been complete (all your code has run, and the next enter frame runs), it kills all the variables it has stored.  That&#8217;s the AS version of what an Objective C Pool is.</p>
<p><strong>Conclusions</strong></p>
<p>This sucks.  <a href="http://www.businessinsider.com/the-underlying-story-behind-adobes-failed-mobile-strategy-2010-4">I blame Adobe AND Macromedia for my suffering</a>.</p>
<p>BTW, if you&#8217;re looking for some pimp tutorials to learn this stuff, my compadre <a href="http://www.webappsolution.com/wordpress/">Brian</a> linked me to it, called &#8220;<a href="http://cocoadevcentral.com/">Cocoa Dev Central</a>&#8220;, specifically this <a href="http://cocoadevcentral.com/d/learn_objectivec/">article</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jessewarden.com/2010/04/cocoa-chronicles-1-actionscript-vs-objective-c.html/feed</wfw:commentRss>
			<slash:comments>28</slash:comments>
		
		
			</item>
	</channel>
</rss>
