<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Aral Balkan &#187; APIs</title>
	<atom:link href="http://aralbalkan.com/category/development/apis/feed" rel="self" type="application/rss+xml" />
	<link>http://aralbalkan.com</link>
	<description>Passionate geekisms.</description>
	<lastBuildDate>Wed, 01 Feb 2012 18:53:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
		<item>
		<title>Twitter for Mac supports Twitter for iPhone protocol handlers</title>
		<link>http://aralbalkan.com/3718</link>
		<comments>http://aralbalkan.com/3718#comments</comments>
		<pubDate>Mon, 10 Jan 2011 09:23:53 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[atebits]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[cocoa touch]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[protocol handler]]></category>
		<category><![CDATA[tweetie]]></category>
		<category><![CDATA[tweetie 2]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[twitter for iphone]]></category>
		<category><![CDATA[twitter for mac]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[urlencoding]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/?p=3718</guid>
		<description><![CDATA[I don't know if there's an official announcement or documentation on it but I realized yesterday, while making Tweaky, that Twitter for Mac supports the same protocol handlers as Twitter for iPhone. The only thing you have to change is the tweetie:// protocol to twitter://. Check out the protocol reference here. I use /user and [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I don't know if there's an official announcement or documentation on it but I realized yesterday, <a href="http://aralbalkan.com/3710">while making Tweaky</a>, that <a href="http://developer.atebits.com/tweetie-iphone/protocol-reference/">Twitter for Mac supports the same protocol handlers as Twitter for iPhone</a>. The only thing you have to change is the <code>tweetie://</code> protocol to <code>twitter://</code>.</p>
<p><a href="http://developer.atebits.com/tweetie-iphone/protocol-reference/">Check out the protocol reference here</a>.</p>
<p><span id="more-3718"></span></p>
<p>I use <code>/user</code> and <code>/post</code> protocol handlers in Tweaky to display my tweets and compose a tweet, respectively (e.g., click <code><a href="twitter://user?screen_name=aral">twitter://user?screen_name=aral</a></code> to view my timeline in Twitter for Mac).</p>
<p>Note: all arguments to the protocol handlers must be URL encoded and doing that is not as straightforward as it should be with Cocoa. <a href="http://simonwoodside.com/">Simon Woodside</a> has <a href="http://simonwoodside.com/weblog/2009/4/22/how_to_really_url_encode/">a little snippet</a> that does the trick:</p>
<pre language="obj-c">NSString * encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(
   NULL,
   (CFStringRef)unencodedString,
   NULL,
   (CFStringRef)@"!*'();:@&=+$,/?%#[]",
   kCFStringEncodingUTF8 );</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/3718/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Private iPhone APIs in XCode for Dummies</title>
		<link>http://aralbalkan.com/2106</link>
		<comments>http://aralbalkan.com/2106#comments</comments>
		<pubDate>Fri, 10 Apr 2009 22:42:11 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Featured]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2106</guid>
		<description><![CDATA[Today I had to use a private API while spiking a feature for an iPhone app I'm working on and I ran into a couple of gotchas along the way. There doesn't seem to be a simple step-by-step guide for using private iPhone APIs in XCode, so here's goes: First off, you're going to need [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><img src="http://aralbalkan.com/wp-content/uploads/2009/04/forbidden-fruit1.jpg" alt="Forbidden Fruit" height="500" width="295" style="float:right; margin-left:2em;"></p>
<p>Today I had to use a private API while spiking a feature for an iPhone app I'm working on and I ran into a couple of gotchas along the way. There doesn't seem to be a simple step-by-step guide for using private iPhone APIs in XCode, so here's goes:</p>
<p><span id="more-2106"></span></p>
<ol>
<li>First off, you're going to need the header files for the private frameworks. To dump them, use the <a href="http://ericasadun.com/HeaderDumpKit/" title="Index of /HeaderDumpKit">Framework Dump Kit</a> from Erica Sadun's site. Download the <em>DumpFrameworks</em> Perl script anywhere and put the <em>class-dump</em> binary somewhere on your path (I put it in /usr/local/bin/)</li>
<li>Run DumpFrameworks (navigate to the folder you downloaded it to in Terminal and type <code>./DumpFrameworks</code>). This will create the headers in <em>~/Headers</em>.</li>
<li>In your XCode project, right-click the Frameworks folder in the Groups &amp; Files panel and select <em>Add</em> &rarr; <em>Existing Frameworks</em>. Navigate to the header file(s) you want to add and select them. You should see the headers added to your project.</em></li>
<li>Go to <em>Project</em> &rarr; <em>Edit Project Settings</em>, click on the Build tab, and scroll down to the Linking section. For the <em>Other Linker Flags</em> property, enter <code>-force_flat_namespace</code> and <code>-undefined suppress</code> (thank you, <a href="http://lists.apple.com/archives/cocoa-dev/2004/Sep/msg01285.html" title="Re: linking to private frameworks">Ken Ferry</a>). If you forget this, you will get a linker error telling you that the symbols for the private classes you're using could not be found.</li>
<li>Open up the header files you imported into your project and remove the superfluous import statements that the header dumper put there. Usually this is just an unnecessary <code>#import "NSObject.h"</code> but there may be others also. If you get errors, look for the <em>SomeHeader.h: No such file or directory</em> messages and remove the import statements corresponding to those errors from the private header files.</li>
<li>Finally, import the private header files, use the classes in your application, build and run!</li>
</ol>
<p>Of course, whether or not you should use the iPhone private API is another matter (undocumented calls may break at any time, Apple may reject your app, etc.) If you do want to play around with them, however, I hope the above instructions help you to get started without too much pain.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2106/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Yahoo! Pipes could flow to exciting new places with web hooks</title>
		<link>http://aralbalkan.com/1637</link>
		<comments>http://aralbalkan.com/1637#comments</comments>
		<pubDate>Tue, 25 Nov 2008 15:59:09 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[open data]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[web hooks]]></category>
		<category><![CDATA[Yahoo! Pipes]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1637</guid>
		<description><![CDATA[Sucking from the pipe... Yahoo! Pipes, the excellent visual data mashup creator, has an unfortunate blockage problem. Specifically, it can pull in data from numerous sources, but the flow stops at the end of the pipe, waiting to be sucked out and consumed instead of automatically flowing out to its final destination. When you create [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><img src="http://aralbalkan.com/wp-content/uploads/2008/11/yahoo-pipes-plus-web-hooks.png" alt="Yahoo Pipes Plus web Hooks" height="450" width="650"></p>
<h3>Sucking from the pipe...</h3>
<p><span id="more-1637"></span></p>
<p><a href="http://pipes.yahoo.com/pipes/" title="Pipes: Rewire the web">Yahoo! Pipes</a>, the excellent visual data mashup creator, has an unfortunate blockage problem. Specifically, it can pull in data from numerous sources, but the flow stops at the end of the pipe, waiting to be sucked out and consumed instead of automatically flowing out to its final destination.</p>
<p>When you create a Yahoo! Pipe, you can choose to consume sources such as RSS feeds, CSVs, or even regular web pages. You can then sort, filter, and generally mash up this data to create your own output feed. </p>
<p>Unfortunately, this is where the flow in Yahoo! Pipes stops. The output feed you create is made available in various formats, including RSS, JSON, and PHP. All formats that you need to pull in to consume. </p>
<h3>... versus letting the pipe flow.</h3>
<p>What Yahoo! Pipes <em>could</em> do is go one step further and use HTTP and the concept of <a href="http://webhooks.pbwiki.com/" title="Web Hooks / FrontPage">web hooks</a> to push the data out to custom endpoints. In other words, it could keep the data flowing. </p>
<p>In other words, once I have consumed my various data sources, mashed them up, and created an output feed, I should be able to push that to an HTTP endpoint on my web application. As the data changes (based on the frequency that Yahoo! updates the pipe), my application gets a notification and the latest data is pushed to it, removing the need for me to implement polling in my application and thus greatly simplifying things at the application level.</p>
<p><em>If you'd like to learn more about web hooks, Jeff Lindsay, recently gave a talk introducing web hooks at the <a href="http://www.headconference.com/" title="&lt;head&gt; Web Conference: October 24-26, 2008">&lt;head&gt; web conference</a> in a presentation titled <a href="http://www.headconference.com/speakers/jeff-lindsay/" title="Speakers: Jeff Lindsay">Web Hooks and the Programmable World of Tomorrow</a> (<a href="http://www.headconference.com/2008/recording/jeff-lindsay/1/" title="Please sign in to access 2008.">&lt;head&gt; 2008 attendees can watch the video of Jeff's talk here</a>).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1637/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Yahoo! update on Pipes for Flash Developers</title>
		<link>http://aralbalkan.com/1513</link>
		<comments>http://aralbalkan.com/1513#comments</comments>
		<pubDate>Tue, 14 Oct 2008 09:20:02 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1513</guid>
		<description><![CDATA[Tom -- who, incidentally, also happens to be a speaker at the &#60;head&#62; web conference and the man behind the &#60;head&#62; San Francisco hub at Yahoo!'s Sunnyvale campus -- just alerted me that the lovely folks over at Yahoo! Pipes have posted a blog entry detailing How to find your Pipe ID after customizing your [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://www.kid666.com/blog/" title="Kid666 Blog">Tom</a> -- who, incidentally, also happens to be <a href="http://www.headconference.com/speakers" title="Speakers at the &lt;head&gt; Web Conference">a speaker</a> at the <a href="http://www.headconference.com/" title="&lt;head&gt; Web Conference: October 24-26, 2008">&lt;head&gt; web conference</a> and the man behind <a href="http://www.headconference.com/hubs" title="Local conference hubs at &lt;head&gt; Web Conference">the &lt;head&gt; San Francisco hub</a> at Yahoo!'s Sunnyvale campus -- just alerted me that the lovely folks over at <a href="http://pipes.yahoo.com/pipes/" title="Pipes: Rewire the web">Yahoo! Pipes</a> have posted a blog entry detailing <a href="http://blog.pipes.yahoo.net/2008/10/07/how-to-find-your-pipe-id-after-customizing-your-pipes-url/" title="Pipes Blog  &raquo; Blog Archive   &raquo; How to find your Pipe ID after customizing your Pipes URL.">How to find your Pipe ID after customizing your Pipes URL</a>.</p>
<p>I had <a href="http://aralbalkan.com/1509" title="Yahoo! Pipes breaks for Flash if you customize your pipe URLs at Aral Balkan">blogged about this</a> just a few days ago when I ran into the issue.</p>
<p><span id="more-1513"></span></p>
<p>Thanks, guys! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1513/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Yahoo! GeoPlanet API makes backwards-incompatible change, keeps it secret?</title>
		<link>http://aralbalkan.com/1393</link>
		<comments>http://aralbalkan.com/1393#comments</comments>
		<pubDate>Sat, 28 Jun 2008 20:03:13 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[backwards compatibility]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[geoplanet]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1393</guid>
		<description><![CDATA[I just noticed that the Yahoo! GeoPlanet API made an API change to its JSON API that breaks existing apps. (I noticed because it broke the sign-up process for the new Singularity teaser site.) Googling around, I couldn't find any announcements from Yahoo! about this. I don't know if there's a notification feed somewhere that [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I just noticed that the <a href="http://developer.yahoo.com/geo/" title="Yahoo! GeoPlanet - YDN">Yahoo! GeoPlanet API</a> made an API change to its JSON API that breaks existing apps. (I noticed because it broke the sign-up process for the <a href="http://si.appspot.com/">new Singularity teaser site</a>.)</p>
<p>Googling around, I couldn't find any announcements from Yahoo! about this. I don't know if there's a notification feed somewhere that I'm missing -- if so, I'd appreciate it if someone could point me in the right direction. Otherwise, in case any other developres are using the Yahoo! GeoPlanet JSON API and are affected by this, here's a summary of the change from <a href="http://tech.groups.yahoo.com/group/yws-geo/message/32">the post I just made on the yws-geo forum</a>:</p>
<p><span id="more-1393"></span></p>
<blockquote><p>I just realized that you removed the 'place' array from the JSON object returned from places.q() calls (e.g., of form <code>http://where.yahooapis.com/v1/places.q('city<br />
name');count=0?format=json</code>) and that the returned places object now has the<br />
place indices as strings.</p>
<p>This requires code to be changed from, for example, <code>result['places']['place']</code> to <code>result['places']</code> and also requires that numeric indexed loops be changed to use string indices.</p>
</blockquote>
<p>It's quite baffling that a change like this (which, really, isn't even necessary) was made and not communicated. Even more so considering that the API is versioned properly (you access it from /v1/), so a change like this should really have gone into (/v2/).</p>
<p>I would love to hear from someone on the Yahoo! GeoPlanet team about the rationale behind this change and where we can find out about similar changes in the future.</p>
<p>I love the <a href="http://developer.yahoo.com/geo/" title="Yahoo! GeoPlanet - YDN">Yahoo! GeoPlanet API</a> -- it is awesome and very simple to work with -- but please, guys, pay a bit more attention to backwards compatibility, communicate better, and don't break existing apps! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1393/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>SWX Contest entries published!</title>
		<link>http://aralbalkan.com/1104</link>
		<comments>http://aralbalkan.com/1104#comments</comments>
		<pubDate>Mon, 10 Dec 2007 12:33:26 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[SWX]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1104</guid>
		<description><![CDATA[The 19 20 22 entries that we received for the SWX Contest have now been published on the SWX Contest page for public viewing. Due to the manageable number of entries, we're going to forego the first round of public voting (although you are welcome to leave comments on the entries) and allow our outstanding [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />The <strike>19</strike> <strike>20</strike> 22 entries that we received for the <a href="http://swxformat.org/contest">SWX Contest</a> have now been published on the <a href="http://swxformat.org/contest">SWX Contest page</a> for public viewing. </p>
<p>Due to the manageable number of entries, we're going to forego the first round of public voting (although you are welcome to leave comments on the entries) and allow our outstanding panel of judges to pick the winners from the Web, API, and Mobile categories in a single round of voting. </p>
<p><span id="more-1104"></span></p>
<p>We received <strike>8</strike> <strike>9</strike> 10 entries in the web category, <strike>3</strike> 4 in the mobile category, and we now have 8 new SWX APIs thanks to the contest, ranging from a generic XML to SWX parser called SWXml to APIs for popular services such as WordPress, Backpack, Technorati, Kuler, and Verisign/Paypal Payments Pro.</p>
<p>I want to take this opportunity to thank all the contestants for their hard work. Here's wishing all of you the best of luck!</p>
<p>The winners will be announced on December 24th, 2007. </p>
<p>Also, a big thank you to our sponsors: <a href="http://adobe.com/uk">Adobe UK</a>, <a href="http://lynda.com">Lynda.com</a>, <a href="http://buraks.com">Burak Kalayci (ASV)</a>, <a href="http://friendsofed.com">Friends of ED</a>, and <a href="http://aralbalkan.com">yours truly</a> (Nabaztag bunnies and iPod Touches).</p>
<p><a href="http://swxformat.org/contest/">View the SWX Contest entries</a>.</p>
<p><strong>Update: </strong> I messed up and forgot to add Julio Rodriguez's entry to the Web category this morning. I've now updated the page with his entry and informed the judges. Thanks for getting in touch with me Julio and apologies for the initial omission. </p>
<p><strong>Update: </strong> John Hattan's entries in the Web and Mobile categories also somehow ended up in the black hole of my email. Sorry, John, I've added them to the contest page and informed the judges now.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1104/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Web &#8217;08 predictions: The rise of RIAs and the 3D web</title>
		<link>http://aralbalkan.com/1099</link>
		<comments>http://aralbalkan.com/1099#comments</comments>
		<pubDate>Fri, 07 Dec 2007 11:37:34 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA["flash player"]]></category>
		<category><![CDATA[.net magazine]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[carlos ulloa]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[papervision3d]]></category>
		<category><![CDATA[predictions]]></category>
		<category><![CDATA[ralph hauwert]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Web '08]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1099</guid>
		<description><![CDATA[Recently, I gave a talk titled Web '07 - Web '08 at the Christmas charity dinner (linking to the Google cache as the original site appears to be down at the moment) organized by Sussex Geek Dinners. It was a lighthearted tour through the highlights of Web '07 and a look ahead to Web '08* [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />Recently, I gave a talk titled Web '07 - Web '08 at the <a href="http://209.85.135.104/search?q=cache:TjY3DaPltd0J:sussex.geekdinner.co.uk/%3Fm%3D200711+sussex+geek+dinner+aral&hl=en&ct=clnk&cd=2&client=safari">Christmas charity dinner</a> (linking to the Google cache as the original site appears to be down at the moment) organized by Sussex Geek Dinners. It was a lighthearted tour through the highlights of Web '07 and a look ahead to Web '08<a href="#20071207-1-1">*</a> with predictions by myself and some of my friends.</p>
<p>In my predictions for 2008, I talked about how we will be seeing more RIAs in 2008 -- <a href="http://aralbalkan.com/1097">both from Adobe</a> and third parties -- how Silverlight is <em>not</em> going to have a widespread impact (although is definitely something to keep an eye on for 2009/10 and the competition is going to give Adobe a welcome push in the right direction), how mobile Flash is going to move away from Flash Lite to full-scale Flash playback on devices and how we're going to see Flash on the iPhone, how sometimes-connected applications and web/desktop hybrid applications are going to gain importance with AIR, Google Gears, etc., and how real-time 3D in Flash is going to change the aesthetics of the web.</p>
<p><span id="more-1099"></span></p>
<p>If you've been reading my blog for a while, you might remember that last phrase. It's <a href="http://aralbalkan.com/443">the same thing I uttered back in 2005</a> before the release of Flash 8. Back then, .Net magazine pasted my prediction on its cover and I was talking about alpha-channel video, not 3D. I think we can agree that alpha channel video in Flash has altered the aesthetics of the web in the intervening period and I am convinced that 2008 is the year that Flash is going to do the same thing with 3D thanks to <a href="http://blog.papervision3d.org">Papervision3D</a>. </p>
<p>Specifically, the combination of alpha-channel video, bitmap effects and filters, and real-time 3D is going to create a new benchmark in production values for online experiences. We're already seeing trailblazers like <a href="http://blog.noventaynueve.com/">Carlos Ulloa</a>, <a href="http://www.unitzeroone.com/">Ralph Hauwert</a>, and <a href="http://rockonflash.com/blog/">John Grden</a> are pushing the boundaries in this area and, in 2008, we are going to see more mainstream adoption of these techniques. </p>
<p>(I just read a somewhat myopic article in 3D World magazine titled "The look of 3D in 2008" that didn't even touch upon web 3D in any of its predictions! Could it be that web 3D is going to blindsight the traditional 3D community?) </p>
<p>To these predictions, I add two new ones that are closer to my heart: Firstly, Flash developers are going to get a lovely toy-box of APIs to work with and, secondly, we're going to witness a conference that's also going to be a technological tour-de-force to very visibly and publicly define how far we've come in Web '08. The latter has me more excited than I've been in a _very_ long time. And that's all I'm going to say about that for the moment. </p>
<p>The web just keeps getting more and more exciting... here's to a most wonderful 2008! </p>
<p><a name="20071207-1-1">* </a><em>Just as an aside, can we please drop the version numbers? We know in software that the moment an application gets its version number it's out of date. So why do we want to apply the same paradigm to describing the web? It's far more accurate, imho, to analyze the characteristics that defined the web in a given year. Hence, Web '08, not Web 3.0).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1099/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>FlashBrighton&#8217;s Big Day Out: Beyond the buttons</title>
		<link>http://aralbalkan.com/1084</link>
		<comments>http://aralbalkan.com/1084#comments</comments>
		<pubDate>Tue, 20 Nov 2007 10:15:59 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWX]]></category>
		<category><![CDATA[Brighton]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[flashbrighton]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1084</guid>
		<description><![CDATA[Here's quick update on the session I'm presenting at FlashBrighton's Big Day Out (the event's now sold out) this Saturday. The talk is titled Beyond the Buttons: Learning new programming languages, development tools, and technologies is a fun (and essential) part of what we do but they are not ends in and of themselves. IDEs [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><a href="http://fbbigdayout.org/"><img src="images/fb_big_day_out.jpg" alt="Flash Brighton Big Day Out" /></a></p>
<p>Here's quick update on the session I'm presenting at <a href="http://fbbigdayout.org/">FlashBrighton's Big Day Out</a> (the event's now sold out) this Saturday. The talk is titled Beyond the Buttons:</p>
<p><span id="more-1084"></span></p>
<blockquote><p>Learning new programming languages, development tools, and technologies is a fun (and essential) part of what we do but they are not ends in and of themselves. IDEs like Flash and Flex Builder, languages like ActionScript 3, and technologies like AIR are merely tools, like the painter's brushes, easels, and paints, the animator's lightbox, and the photographer's camera. In this session, Aral looks beyond the tools to what you can make with them. You will not learn any new techniques or programming tricks but instead stock up on ideas and inspiration to spark your own creative endeavors.</p></blockquote>
<p>Looking forward to seeing some of you this weekend!</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1084/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Coming up: Mock data support and better default argument handling in the SWX Service Explorer</title>
		<link>http://aralbalkan.com/1083</link>
		<comments>http://aralbalkan.com/1083#comments</comments>
		<pubDate>Sat, 17 Nov 2007 19:34:58 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWX]]></category>
		<category><![CDATA[Tools and Utilities]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1083</guid>
		<description><![CDATA[I'm currently working on a stealthy little pet project of mine that involves creating a PayPal Website Payments Pro API in SWX. A couple of the methods in the API require quite a few arguments (all the billing-related fields for processing a credit card transaction, for example) and I quickly got sick of having to [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I'm currently working on a stealthy little pet project of mine that involves creating a <a href="https://www.paypal.com/uk/cgi-bin/webscr?cmd=_wp-pro-overview-outside">PayPal Website Payments Pro API</a> in <a href="http://swxformat.org">SWX</a>. A couple of the methods in the API require quite a few arguments (all the billing-related fields for processing a credit card transaction, for example) and I quickly got sick of having to enter mock data manually in the SWX Service Explorer to test and debug methods calls. (This is one scenario where Transfer Object support would be helpful but adding that right now would complicate things too much.) So, to make things easier for myself (and hopefully some of you as well), I've added mock data support (both static and dynamic) to <a href="http://swxformat.org/documentation/swx-php/">SWX PHP</a> and the <a href="http://swxformat.org/php/explorer/">SWX Service Explorer</a>. </p>
<p><strong>Using mock data</strong></p>
<p><span id="more-1083"></span></p>
<p>In the SWX Service Explorer, methods that have mock data will have a "Use mock data" button enabled.</p>
<p><img src="images/sse_up1.gif" width="500" height="220" /></p>
<p>Clicking the button will fill the arguments with the mock data, as the following screenshot demonstrates. </p>
<p><img src="images/sse3.gif" width="500" height="235" /></p>
<p><strong>Creating static mock data</strong></p>
<p>The first way to create mock data is to include it in the JavaDoc-style comments in your service classes. Place mock data at the end of the comment and surround it in square brackets. </p>
<pre class="php"><span style="color: #808080; font-style: italic;">/**
   * Do a direct credit card payment.
   *
   * @param (str) A unique order id [12345-12345]
   * @param (str) Credit card number [5105105105105100]
   * @param (str) Card type (Visa, American Express, Mastercard, etc.) [Mastercard]
   * @param (str) 3 or 4 character Credit Security Code [123]
   * @param (number, 4 digits MMYY) Expiry date [1209]
   * @param (number) Amount to charge [2.50]
</span></pre>
<p>This is a quick and easy way of adding mock data to a method. The recommended practice here, when possible, is to place enough mock data in a method to allow the user to make a successful call via the SWX Service Explorer. This is in keeping with the SWX philosophy of making things Just Work and <a href="http://aralbalkan.com/687">Show, Don't Tell</a>. </p>
<p><strong>Generating mock data</strong></p>
<p>The new mock data feature does not limit you to static mock data. You can also generate dynamic mock data with a little bit of PHP. </p>
<p>To generate mock data for a method called <code>doDirectPayment()</code>, for example, you can include a private method called <code>_doDirectPaymentMock()</code> in your service class. This method gets called (and passed an array of any static mock data for the method, which you can either add to or ignore) by the service explorer. It expects an array of mock data (one for each argument) to be returned as per the following example. </p>
<pre class="php"><span style="color: #000000; font-weight: bold;">function</span> _doDirectPaymentMock<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$mockData</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Generate a random order number</span>
    <span style="color: #0000ff;">$orderNum</span> = <span style="color: #ff0000;">'&quot;'</span>.<a href="http://www.php.net/date"><span style="color: #000066;">date</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'ymd-H'</span><span style="color: #66cc66;">&#41;</span>.<a href="http://www.php.net/rand"><span style="color: #000066;">rand</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1000</span>,<span style="color: #cc66cc;">9999</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">'&quot;'</span>;
    <span style="color: #0000ff;">$mockData</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$orderNum</span>;
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$mockData</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>In the above example, the order number needs to be unique so it's generated by code but all the other default values are statically obtained from the comments. </p>
<p><strong>Update: </strong>In the latest version of the SWX Service Explorer in SVN, the dynamic mock data now updates every time you press the <em>Use mock data</em> button.</p>
<p><strong>Default values for optional arguments</strong></p>
<p>I've also modified how default parameters are handled in the SWX Service Explorer. Previously, they were handled Really Badly (tm). i.e., they were basically ignored. Now, if your method has a default value defined, it is displayed in the SWX Service Explorer by default. This is true even if you define the default value as a constant (in PHP4, you must stick to the CONSTANT_NAMING_CONVENTIONS for constant resolution to work correctly.) </p>
<p>(Note that in PHP5, you must place all optional arguments at the end of your method signature. This is a best practice to follow in any case.) </p>
<p>The following screenshot shows how default values for arguments are handled in the new service explorer: </p>
<p><img src="images/sse1.gif" width="500" height="98" /></p>
<p>Currently, the changes outlined in this post are only available from the <a href="http://svn1.cvsdude.com/osflash/swx/trunk/">trunk of the SWX Subversion repository</a>. I'd appreciate it if you guys can test it out. After further testing, it will be included in the next SWX PHP release. </p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1083/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Ted&#8217;s Pack of Cards in SWX</title>
		<link>http://aralbalkan.com/1079</link>
		<comments>http://aralbalkan.com/1079#comments</comments>
		<pubDate>Wed, 14 Nov 2007 18:40:53 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[APIs]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[SWX]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1079</guid>
		<description><![CDATA[This demo requires Flash. I was looking for a distraction from the PayPal integration stuff I'm working on today for my Super Secret New Project (tm) when I ran across Ted Patrick's Cards API post from yesterday and decided to quickly implement a SWX API for it. Ted has created a very simple REST API [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<div id="tedcards" align="center">This demo requires Flash.</div>
<p><script type="text/javascript" defer="defer"> /*<!--*/ var so = new SWFObject("swfs/cards.swf", "cards_swf", "501", "376", "8");  so.write("tedcards"); /*-->*/ </script></p>
<p>I was looking for a distraction from the PayPal integration stuff I'm working on today for my Super Secret New Project (tm) when I ran across <a href="http://www.onflex.org/ted/2007/11/apis-with-delimited-ascii-text-vs-xml.php">Ted Patrick's Cards API post</a> from yesterday and decided to quickly implement a <a href="http://swxformat.org">SWX</a> API for it. </p>
<p><span id="more-1079"></span></p>
<p>Ted has created a very simple REST API for a deck of cards. It currently has one method which returns a shuffled deck (or decks) of cards. </p>
<p>The <a href="http://swxformat.org/php/explorer">SWX API</a> for it was a cinch to write. Here's the PHP code for it:</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../BaseService.php&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Cards <span style="color: #000000; font-weight: bold;">extends</span> BaseService
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">function</span> <a href="http://www.php.net/shuffle"><span style="color: #000066;">shuffle</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$numDecks</span> = <span style="color: #cc66cc;">1</span>, <span style="color: #0000ff;">$numJokers</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0000ff;">$url</span> = <span style="color: #ff0000;">&quot;http://onflex.org/api/games/cards/shuffle/1/$numDecks/$numJokers&quot;</span>;
&nbsp;
        <span style="color: #0000ff;">$result</span> = <span style="color: #0000ff;">$this</span>-&gt;_call<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #0000ff;">$shuffledDeck</span> = <a href="http://www.php.net/explode"><span style="color: #000066;">explode</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'|'</span>, <span style="color: #0000ff;">$result</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #0000ff;">$timeStamp</span> = <a href="http://www.php.net/array_shift"><span style="color: #000066;">array_shift</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$shuffledDeck</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'timeStamp'</span> =&gt; <span style="color: #0000ff;">$timeStamp</span>, <span style="color: #ff0000;">'deck'</span> =&gt; <span style="color: #0000ff;">$shuffledDeck</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
<p>I wasn't sure if the timestamp was in there just to stop caching or whether it would be useful so I left it in :) </p>
<p>You can play with it online using the <a href="http://swxformat.org/php/explorer/">SWX Service Explorer</a> on the <a href="http://swxformat.org/documentation#92">Public SWX Gateway</a>. </p>
<p>The demo SWF you see at the top of the post calls the service using the following code:</p>
<pre class="actionscript"><span style="color: #0066CC;">import</span> org.<span style="color: #006600;">swxformat</span>.<span style="color: #006600;">SWX</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> swx:SWX = <span style="color: #000000; font-weight: bold;">new</span> SWX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
swx.<span style="color: #006600;">gateway</span> = <span style="color: #ff0000;">&quot;http://swxformat.org/php/swx.php&quot;</span>;
swx.<span style="color: #006600;">encoding</span> = <span style="color: #ff0000;">&quot;GET&quot;</span>;
swx.<span style="color: #006600;">debug</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> callDetails:<span style="color: #0066CC;">Object</span> =
<span style="color: #66cc66;">&#123;</span>
    serviceClass: <span style="color: #ff0000;">&quot;Cards&quot;</span>,
    method: <span style="color: #ff0000;">&quot;shuffle&quot;</span>,
    result: <span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>, resultHandler<span style="color: #66cc66;">&#93;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// ... other stuff (UI, etc.)</span>
&nbsp;
swx.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>callDetails<span style="color: #66cc66;">&#41;</span>;</pre>
<p>And, since the data is returned in a native SWF array, the result handler simply iterates over the array to display the cards:</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">function</span> resultHandler<span style="color: #66cc66;">&#40;</span>event:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> deck:<span style="color: #0066CC;">Array</span> = event.<span style="color: #006600;">result</span>.<span style="color: #006600;">deck</span>;
&nbsp;
    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i &lt; <span style="color: #cc66cc;">52</span>; i++<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">var</span> cardInit:<span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">_x</span>: x += <span style="color: #cc66cc;">50</span>, <span style="color: #0066CC;">_y</span>: y, <span style="color: #0066CC;">_width</span>: <span style="color: #cc66cc;">50</span>, <span style="color: #0066CC;">_height</span>: <span style="color: #cc66cc;">75</span><span style="color: #66cc66;">&#125;</span>;
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>i%<span style="color: #cc66cc;">12</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            cardInit.<span style="color: #0066CC;">_y</span> = y += <span style="color: #cc66cc;">75</span>;
            cardInit.<span style="color: #0066CC;">_x</span> = x = <span style="color: #cc66cc;">0</span>;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">attachMovie</span><span style="color: #66cc66;">&#40;</span>deck<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">&quot;card&quot;</span>+i, i, cardInit<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre>
<p>Don't forget, like all the other SWX APIs, you can call this API from Flash 6+ (including FlashLite 2.0 and 2.1) using ActionScript 1 or 2 (not 3 yet).  </p>
<p><a href="downloads/swx_aslib_cards_demo.zip">Download the demo</a> (zipped; 2.6MB).</p>
<p>The demo includes the SWX ActionScript Library which comes with other SWX sample apps that you can play with.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1079/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
	</channel>
</rss>

