<?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; Projects</title>
	<atom:link href="http://aralbalkan.com/category/development/projects/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>Announcing my first iPhone app: &#8216;avit</title>
		<link>http://aralbalkan.com/2401</link>
		<comments>http://aralbalkan.com/2401#comments</comments>
		<pubDate>Tue, 20 Oct 2009 16:00:15 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2401</guid>
		<description><![CDATA[You may have been wondering why I disappeared off the face of the earth for the past month after announcing that Evolutio – which I thought was going to be my first iPhone app – was going into Alpha. Here's the reason: I realized that Evolut.io is going to need a good deal more work [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><img src="http://aralbalkan.com/images/avit-screenshot.png" alt="Avit iPhone application" height="418" width="240" style="float:right; margin-left:2em;" class="transparent"></p>
<p>You may have been wondering why I disappeared off the face of the earth for the past month after announcing that <a href="http://evolut.io" title="Evolutio: a beautiful iPhone reading experience for Safari Books Online">Evolutio</a> – which I thought was going to be my first iPhone app – was going into Alpha.</p>
<p><span id="more-2401"></span></p>
<p>Here's the reason: I realized that Evolut.io is going to need a good deal more work before it is ready for prime time and I also realized<br />
that I really want to get an app up on the App Store. Thankfully, this coincided with an idea that I thought I could whip up "in a<br />
weekend". So, about a month later, I'm at the point where I'm announcing it before embarking on a very short beta and then submitting it to the App Store (woot!)</p>
<p>The app is called <a href="http://avitapp.com" title="'avit iPhone app for Safari Books Online: scan the barcode from a book and start reading it!">'avit</a>. Watch a screencast of it in action at <a href="http://avitapp.com" title="'avit iPhone app for Safari Books Online: scan the barcode from a book and start reading it!">http://avitapp.com</a>. </p>
<p>So what does it do? </p>
<p>Well, in a nutshell, if you're subscribed to Safari Books Online, you can scan the barcode from a book and start reading straight away. That is, if they have it (have it, 'av it, get it? Oh, the wit, the intelligence!) :) </p>
<p>If they don't have it, you can compare prices online (with automatic location detection that sends you to one of the three localized sites that Google Product Search supports in the UK, US, and Germany). </p>
<p>OK, so I'm not going to repeat everything that's in the screencast here. <a href="http://avitapp.com" title="'avit iPhone app for Safari Books Online: scan the barcode from a book and start reading it!">Check out the 'avit screencast here</a>. </p>
<p>I'm going to be talking about lessons learned while developing it, the User Experience considerations, workflow/process etc., <a href="http://upcoming.yahoo.com/event/4756134/" title="Free iPhone Talks + Networking at The Skiff (Tuesday October 20, 2009) - Upcoming">at BrightArray this evening</a> (7pm at <a href="http://theskiff.org/" title="The Skiff - A nice little place to work in the middle of Brighton">The Skiff</a>, so come along if you're in Brighton).</p>
<p>I'm also flying to Denmark tomorrow to give a workshop on iPhone dev at <a href="http://www.noma.nu/nomanew/www/greennoma/mainpage4.asp?sidenavn=Home" title="NoMA Nordic Multimedia Academy">Noma (Nordic Multimedia Academy)</a> in Kolding so this is going to be one heckuva busy week! :) </p>
<p>So there you go, this is going to be my first iPhone app and I'm really excited. I hope you guys like what you see and I can't wait to see it up on the App Store! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2401/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Open In External App icon for iPhone apps</title>
		<link>http://aralbalkan.com/2349</link>
		<comments>http://aralbalkan.com/2349#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:29:03 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2349</guid>
		<description><![CDATA[Whenever possible, I try to use existing icons for my apps. I do this for two reasons: firstly, designing a good icon is an art that takes a ridiculous amount of time and practice, and, secondly, using standard icons correctly in your applications makes your app consistent with other applications on the same platform and [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><img src="http://aralbalkan.com/wp-content/uploads/2009/08/open-in-external-app-iphone-toolbar-and-tab-bar-icons.jpg" alt="Open in External App iPhone toolbar and tab bar icons" height="181" width="320" style="float:right; margin-left:2em;"></p>
<p>Whenever possible, I try to use existing icons for my apps. I do this for two reasons: firstly, designing a good icon is an art that takes a ridiculous amount of time and practice, and, secondly, using standard icons correctly in your applications makes your app consistent with other applications on the same platform and thus helps it meet user expectations. </p>
<p><span id="more-2349"></span></p>
<p>When it comes to iPhone icons, <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html" title="iPhone Human Interface Guidelines: Introduction">Apple's Mobile HIG</a> provides certain <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/SystemProvided/SystemProvided.html#//apple_ref/doc/uid/TP40006556-CH15-SW11" title="iPhone Human Interface Guidelines: System-Provided Buttons and Icons">system icons with strictly defined semantics</a> and use cases. Beyond those, there are several wonderful free and commercial icon sets available for app developers to use. These include <a href="http://glyphish.com/" title="Glyphish &ndash; Great icons for great iPhone applications">Glyphish</a> (120 free toolbar and tab bar icons released under a <a href="http://creativecommons.org/licenses/by/3.0/us/" title="Creative Commons &mdash;<br />
      Attribution 3.0 United States">Creative Commons Attribution 3.0 US</a> license by <a href="http://www.penandthink.com/" title="Pen &amp; Think">Joseph Wain</a>) and <a href="http://www.pixelpressicons.com/?p=108" title="PixelPressIcons  &raquo; Icons: Free iPhone Toolbar Icons">PixelPress Icons</a> (52 free toolbar icons released under a <a href="http://creativecommons.org/licenses/by/2.5/ca/" title="Creative Commons<br />
    Attribution 2.5 Canada">Creative Commons Attribution 2.5 Canada</a> license by <a href="http://www.garygehiere.com/" title="Gary Gehiere's Personal Website">Gary Gehiere</a>). The set I am using for my application is a commercial one, the excellent <a href="http://www.eddit.com/shop/iphone_ui_icon_set/" title="eddit: Shop: iPhone UI Icon Set">iPhone UI Icon Set</a> of 160 icons by Eddie Wilson (<a href="http://www.flickr.com/photos/eddit/" title="Flickr: eddit's Photostream">check out his awesome photos from his Flickr stream</a>, <a href="http://twitter.com/eddit" title="">follow him on Twitter</a>) of <a href="http://eddit.com/" title="eddit">eddit</a>. These are an absolute steal at $69 and worth every penny. Eddie has taken great pains to tweak the icons to look just right on toolbar and tab bar controls (going as far as to create two different versions of each icon). As he used a pleasing shade of gray for the icons, they can also be used in buttons. </p>
<p>Although the eddit icons cover 99% of what I need for <a href="http://evolut.io/" title="Evolutio: a beautiful iPhone reading experience for Safari Books Online">my application</a>, there's one very common action in iPhone applications that doesn't have a system icon and neither have I been able to find an icon anywhere else to express it: <strong>open in external application</strong>. </p>
<p>Although the iPhone doesn't support running multiple applications simultaneously, iPhone applications are meant to be easy to switch between, with each one doing one or two things right and maybe even communicating with other apps to carry out more complex tasks. So it's a pretty common feature for one app to launch another application and cede control to it. In <a href="http://www.atebits.com/tweetie-iphone/" title="atebits - Tweetie for iPhone">Tweetie</a>, for example, you have a simple web browser view for viewing web sites that people have linked to in their tweets. Cleverly, it doesn't attempt to replace Mobile Safari. Instead, if you need to do more than simply glancing through what someone has linked to, it gives you the option to launch the site you're viewing in Mobile Safari. </p>
<p>In Tweetie, this feature is in an action sheet and Tweetie uses <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/SystemProvided/SystemProvided.html#//apple_ref/doc/uid/TP40006556-CH15-SW14" title="iPhone Human Interface Guidelines: System-Provided Buttons and Icons">the Action icon from the standard system buttons</a> provided by the iPhone SDK to launch the action sheet. </p>
<p>Since Tweetie is a UX dream come true and <em>should</em> be emulated as much as possible, I was also using this icon initially but I was altering its meaning by having it directly launch the site in Mobile Safari (instead of bringing up an action sheet with options). <a href="http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/SystemProvided/SystemProvided.html#//apple_ref/doc/uid/TP40006556-CH15-SW14">The Action icon has a set meaning in the HIG</a>, which states that it "opens an action sheet that allows users to take an application-specific action". Aesthetically, I feel that the icon is rather a poor choice for what it officially represents and a much better candidate for "open in external application" but that's beside the point. Apple has bestowed it with meaning in the HIG and, like it or not, I need to respect that.  </p>
<h3>The Open In External App icon</h3>
<p>Not having found an existing alternative, I – begrudgingly, mind you – started down the path of creating my own icon. Some research revealed <a href="http://www.designofsignage.com/index.html" title="Design of Signage System - Theory, Applications, and Workshop">Prof. Ravi Poovaiah's work on the Design of Signage Systems</a>, including his <a href="http://www.designofsignage.com/theory/casestudy/hospital/symbol_page1.html" title="Case Studies on Design of Signage System">case study on signage for Mumbai Hospitals</a>. Apart from being an interesting read on the various linguistic and cultural constraints imposed on the design of signage in India, I found it to be hugely relevant to our field what with the huge costs involved in internationalization and localization of apps. </p>
<p>More pertinently, perhaps, <a href="http://www.designofsignage.com/application/symbol/hospital/largesymbols/exit.html" title="Exit: Hospital Signage Graphic Symbols, Icons, Pictograms - Architecture Sign Systems">the Exit Icon</a> that Prof. Poovaiah ended up designing stood out as semantically analogous to what I wanted for my icon. The key meaning that the icon must convey is that the the user's action will cause a radical change in context; in this case, a jump from one application to another (which, although the oAuth folks, in their quest to jam what is a perfect solution for the web down the throats of mobile and desktop developers seem to not want to see, is actually as jarring a change in context as you can expect and one that should be avoided whenever possible and at the very least clearly labelled, demarcated, and managed.)</p>
<p>So, taking Ravi's icon, I proceeded to create versions of it for the iPhone tab bar and toolbar controls and two more – in blue – for use in buttons. I used the general shape of the Mobile Me icon in Eddie's set as the base of the form so as to have the icon fit visually with the rest of the icon set (and, thus, also my app's look and feel). </p>
<p>I've created two versions of the icons, one with an inner object that represents the actual object that the user will be opening/viewing in the external app (i.e., "open <em>this</em> in an external app") and another other without the inner object that conveys a more generic "open (in) external app". Visually, I like the simplicity of the latter, but I haven't decided whether the semantic correctness of the former outweighs the aesthetic simplicity of the latter.</p>
<p>In any case, I'm releasing the icons, including the PSD and an Xcode project demonstrating their use, for free under a very liberal <a href="http://creativecommons.org/licenses/by/2.0/uk/" title="Creative Commons<br />
    Attribution 2.0 UK: England &amp; Wales">Creative Commons Attribution 2.0 UK: England &amp; Wales</a> license in hopes that it will be used in other applications also. </p>
<p>The one thing I ask (my mini-HIG, if you will) is that you only use the icon to mean "open in external app". It would be nice to have this to become a standard iPhone icon for that particular action.</p>
<ul>
<li><a href="/downloads/open-in-external-app-icon-set-the-whole-kahuna.zip">Download the whole kahuna</a> (Open in External App icon set PNGs, PSD, and XCode project; 596KB)</li>
<li><a href="/downloads/open-in-external-app-icon-set-pngs.zip">Download the Open In External App icon set</a> (.zip, PNGs only; 12KB).</li>
<li><a href="/downloads/open-in-external-app-icon-set-xcode-project.zip">Download the Open In External App Xcode Project</a> (.zip; 572KB)</li>
<li><a href="/downloads/open_in_external_app_icon_set_psd.zip">Download the Open in External App Photoshop file</a> (.zip; 20KB)</li>
</ul>
<p>If you do like the icon, please consider buying Eddie Wilson's <a href="http://www.eddit.com/shop/iphone_ui_icon_set/" title="eddit: Shop: iPhone UI Icon Set">iPhone UI Icon Set</a> as it fits visually with the other icons there (hey, us independent creatives have to support one another!)</p>
<p>I'd love to hear from you if you do end up using the icon so please leave me a comment and a link to your app (if you're feeling overly generous, feel free to send me a copy to play with; I do loves me my iPhone apps, yessiree!)</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2349/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>iPhone rotation woes and a workaround</title>
		<link>http://aralbalkan.com/2334</link>
		<comments>http://aralbalkan.com/2334#comments</comments>
		<pubDate>Tue, 18 Aug 2009 15:29:50 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2334</guid>
		<description><![CDATA[My story's often told: app meets UITabBarController, UITabBarController starts an affair with multiple UINavigationControllers, the UINavigationControllers end up with a host of child UIViewControllers, some of which need to rotate to landscape mode and some that don't. So far, so good. Then, the plot thickens! In comes an MFMailComposeViewComposer that you want to display via [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />My story's often told: app meets <code>UITabBarController</code>, <code>UITabBarController</code> starts an affair with multiple <code>UINavigationController</code>s, the <code>UINavigationController</code>s end up with a host of child <code>UIViewControllers</code>, some of which need to rotate to landscape mode and some that don't.</p>
<p>So far, so good. </p>
<p><span id="more-2334"></span></p>
<p>Then, the plot thickens! In comes an <code>MFMailComposeViewComposer</code> that you want to display via <code>presentModalViewController</code>. Your view's in landscape, you tap the button that brings up the modal mail compose screen and – oh, the injustice, the tragedy – it flips your view to portrait mode before displaying itself. </p>
<p>Bummer!</p>
<p>Of course, there's more to the story. You had started rotating your views yourself using <code>CGAffineTransform</code>s when you saw that getting autorotation to work via <code>shouldRotateToInterfaceOrientation</code> for complicated view hierarchies required a four year degree in Voodoo. Now, you feel you may be paying for your insolence for deviating from the One True Path of the Church of the Holy Apple DDFS. (I don't know what DDFS stands for but it makes names cooler when they have random letters after them.)</p>
<p>So you dig deeper. It appears that your view controllers all return <code>UIInterfaceOrientationPortrait</code> when queried for their <code>interfaceOrientation</code> properties, even when the device is in one of the landscape modes. (Note the subtle impedance mismatch between "interface" and "device" in the previous sentence, it's a clue!) Aha, and it appears that either <code>presentModalViewController</code> or <code>MFMailComposeViewController</code> is looking for that value and, <em>being the control freak that it is</em>, actually forcing the layout to that orientation before displaying itself.</p>
<p>Well, there's another control freak in town, buddy, and there ain't room enough for the both of us! </p>
<p>So what's a control freak with a scripting background to do but monkey patch this baby… categories to the rescue! If I can get the <code>interfaceOrientation</code> method to return the actual orientation of the device, instead of the interfaces's orientation, it should work!</p>
<pre class="objc"><span style="color: #0000ff;">@interface</span> UIViewController<span style="color: #002200;">&#40;</span>OrientationPatch<span style="color: #002200;">&#41;</span>
-<span style="color: #002200;">&#40;</span>UIDeviceOrientation<span style="color: #002200;">&#41;</span>interfaceOrientation;
<span style="color: #0000ff;">@end</span>
&nbsp;
<span style="color: #0000ff;">@implementation</span> UIViewController<span style="color: #002200;">&#40;</span>OrientationPatch<span style="color: #002200;">&#41;</span>
&nbsp;
-<span style="color: #002200;">&#40;</span>UIDeviceOrientation<span style="color: #002200;">&#41;</span>interfaceOrientation
<span style="color: #002200;">&#123;</span>
	<span style="color: #0000ff;">return</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIDevice currentDevice<span style="color: #002200;">&#93;</span> orientation<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;</pre>
<p>And it does… somewhat. Now the <code>MFMailComposeViewController</code> is displaying properly but reverts the app to portrait when it is dismissed! <em>Doh!</em></p>
<p>More investigating and it appears that <code>shouldRotateToInterfaceOrientation</code> is now being called on my <code>UITabBarController</code> and, since it wasn't implemented, is now returning <code>NO</code> to everything. </p>
<p>I know how to fix that: subclass <code>UITabBarController</code> and implement <code>shouldRotateToInterfaceOrientation</code>: </p>
<pre class="objc">- <span style="color: #002200;">&#40;</span><span style="color: #0000ff;">BOOL</span><span style="color: #002200;">&#41;</span>shouldAutorotateToInterfaceOrientation:<span style="color: #002200;">&#40;</span>UIInterfaceOrientation<span style="color: #002200;">&#41;</span>interfaceOrientation <span style="color: #002200;">&#123;</span>
	<span style="color: #0000ff;">return</span> YES;
<span style="color: #002200;">&#125;</span></pre>
<p>Et, voilà, the <code>MFMailComposeViewController</code> now displays perfectly in landscape mode and excuses itself gracefully without blowing down the whole house.</p>
<p>None of this should be considered great advice to follow. Having found <code>shouldRotateToInterfaceOrientation</code> too painful to work with in my view hierarchy, I resorted to rotating my views myself (since I support rotation in just one, clearly defined section of my application, this has so far proven much easier to implement). If you can get things working with <code>shouldRotateToInterfaceOrientation</code>, you should stick to that. If you, however, find yourself in rotation hell like I did, maybe some of the above will make sense to you and lead you to diagnose or even fix the issues you may be encountering.</p>
<p>Regardless, it definitely feels like autorotation support, especially selective autorotation support for complex view hierarchies, is something that the iPhone SDK team could concentrate a bit on for future releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2334/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Mogenerator latest version, 1.13.1 installer, and build instructions.</title>
		<link>http://aralbalkan.com/2268</link>
		<comments>http://aralbalkan.com/2268#comments</comments>
		<pubDate>Mon, 13 Jul 2009 19:59:06 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tools and Utilities]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2268</guid>
		<description><![CDATA[Mogenerator is a very useful utility that creates model classes for you when working with Core Data. I've written about Mogenerator before but what I didn't realize is that I wasn't working with the latest version (the version I was using was 1.6.1 and the latest version as of this writing, compiled from trunk, is [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />Mogenerator is a very useful utility that creates model classes for you when working with Core Data. <a href="http://aralbalkan.com/2152">I've written about Mogenerator before</a> but what I didn't realize is that I wasn't working with the latest version (the version I was using was 1.6.1 and the latest version as of this writing, compiled from trunk, is 1.13.1). </p>
<p>It's easy to get confused as there are several outdated downloads and project pages floating around the web. It appears, however, that <a href="http://github.com/rentzsch/mogenerator/tree/master" title="rentzsch's mogenerator at master - GitHub">this github repository is where Mogenerator is being actively developed</a>.</p>
<p><span id="more-2268"></span></p>
<p>If you're in a rush, here's the <a href="downloads/mogenerator-1.13.1.dmg">Mogenerator 1.13.1 DMG installer</a> (104KB) I built (only tested on my MBP running OS X 10.5.7). </p>
<p>If you'd rather build your own, here are some simple instructions for building and installing the latest version from trunk:</p>
<ol>
<li>Clone the github repository: <code>git clone git://github.com/rentzsch/mogenerator.git</code></li>
<li>Switch to the installer folder: <code>cd mogenerator/installer</code></li>
<li>Build the installer: <code>./make_installer.command</li>
<li>Run the installer: <code>open build/mogenerator-1.13.1.pkg</code></li>
</ol>
<p>Hope this helps!</p>
<p>PS. By the way, in case you're wondering what changed, I didn't see too much difference. A diff between two generated model classes – albeit simple ones – follows (mind you, the insertInManagedObjectContext: had bitten me before):</p>
<pre class="diff"><span style="color: #440088;"><span style="">6</span>,8d5</span>
<span style="color: #991111;">&lt; @implementation SectionID</span>
<span style="color: #991111;">&lt; @end</span>
<span style="color: #991111;">&lt;</span>
<span style="color: #440088;"><span style="">11</span>,19d7</span>
<span style="color: #991111;">&lt; + <span style="">&#40;</span>id<span style="">&#41;</span>insertInManagedObjectContext:<span style="">&#40;</span>NSManagedObjectContext*<span style="">&#41;</span>moc_ <span style="">&#123;</span></span>
<span style="color: #991111;">&lt; 	return <span style="">&#91;</span>NSEntityDescription insertNewObjectForEntityForName:@&quot;Section&quot; inManagedObjectContext:moc_<span style="">&#93;</span>;</span>
<span style="color: #991111;">&lt; <span style="">&#125;</span></span>
<span style="color: #991111;">&lt;</span>
<span style="color: #991111;">&lt; - <span style="">&#40;</span>SectionID*<span style="">&#41;</span>objectID <span style="">&#123;</span></span>
<span style="color: #991111;">&lt; 	return <span style="">&#40;</span>SectionID*<span style="">&#41;</span><span style="">&#91;</span>super objectID<span style="">&#93;</span>;</span>
<span style="color: #991111;">&lt; <span style="">&#125;</span></span>
<span style="color: #991111;">&lt;</span>
<span style="color: #991111;">&lt;</span>
<span style="color: #440088;"><span style="">195</span>,196d182</span>
<span style="color: #991111;">&lt;</span>
&nbsp;</pre>
<p>Update: Hmm, and a bunch of 10.5 specific retains in the generated.h:</p>
<pre class="diff">...
<span style="color: #991111;">&lt; #if defined<span style="">&#40;</span>MAC_OS_X_VERSION_10_5<span style="">&#41;</span> &amp;&amp; MAC_OS_X_VERSION_MAX_ALLOWED &gt;= MAC_OS_X_VERSION_10_5</span>
<span style="color: #991111;">&lt; @property <span style="">&#40;</span>retain<span style="">&#41;</span> NSString *rawSource;</span>
<span style="color: #991111;">&lt; #endif</span>
...</pre>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2268/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>An easier way to sign in to T-Mobile UK WiFi HotSpots</title>
		<link>http://aralbalkan.com/2232</link>
		<comments>http://aralbalkan.com/2232#comments</comments>
		<pubDate>Thu, 04 Jun 2009 19:49:47 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2232</guid>
		<description><![CDATA[I can access T-Mobile UK WiFi HotSpots with my T-Mobile Mobile Broadband account (I have a 3G USB stick) but I find the signing in process rather painful. It goes something like this: I have to remember my phone number (I never call my USB Stick so I've never memorized it) and type in my [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<div style="float:right; margin-left:1.5em;"><div id="flashcontent3463" style="width:215px; height:180px;"> </div><script type="text/javascript">
<!-- // <![CDATA[
var so = new SWFObject("http://aralbalkan.com/wp-content/plugins/air-badge/AIRInstallBadge.swf", "Badge", "215", "180", "9.0.115", "#FFFFFF");
so.useExpressInstall("http://aralbalkan.com/wp-content/plugins/air-badge/expressinstall.swf");
so.addVariable("airversion", "1.0");
so.addVariable("appname", "TMobileHotSpotSignInAIR");
so.addVariable("appurl", "http://aralbalkan.com/downloads/TMobileHotSpotSignInAIR.air");
so.addVariable("appid", "TMobileHotSpotSignInAIR");
so.addVariable("pubid", "");
so.addVariable("appversion", "1.1");
so.addVariable("imageurl", "http://aralbalkan.com/images/tmobile-air-install-badge.jpg");
so.addVariable("appinstallarg", "installed from web");
so.addVariable("applauncharg", "launched from web");
so.addVariable("helpurl", "help.html");
so.addVariable("hidehelp", "true");
so.addVariable("skiptransition", "false");
so.addVariable("titlecolor", "#00AAFF");
so.addVariable("buttonlabelcolor", "#00AAFF");
so.addVariable("appnamecolor", "#00AAFF");
so.addVariable("str_err_airswf", "<u>Running locally?</u><br/><br/>The AIR proxy swf won't load properly when this demo is run from the local file system.");
so.write("flashcontent3463");
// ]]&gt; -->
</script>
</div>
<p>I can access T-Mobile UK WiFi HotSpots with my <a href="http://www.t-mobile.co.uk/shop/mobile-broadband/" title="Mobile Broadband on Your Laptop">T-Mobile Mobile Broadband account</a> (I have a 3G USB stick) but I find the signing in process rather painful. It goes something like this:</p>
<p><span id="more-2232"></span></p>
<p>I have to remember my phone number (I never call my USB Stick so I've never memorized it) and type in my crazy long password (which I <em>have</em>, apparently memorized). This means that I bring up dashboard, copy my phone number from a sticky note, paste it into the form and then type my password and remember to tick the checkbox so that I agree to T-Mobile's terms and conditions for the millionth time.</p>
<p>Needless to say, this gets old fast. </p>
<p>So, I took a little time out and built a little AIR app to automate the process. You can install it using the AIR badge (works on Mac, Windows, and Linux), above, and you can see it in action in the screencast below.</p>
<p><center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="576" height="402" id="viddler_aral_11"><param name="movie" value="http://www.viddler.com/player/f5fd9bd5/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/f5fd9bd5/" wmode="transparent" width="576" height="402" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_aral_11" /></embed></object></center></p>
<p>I hope someone else out there finds it useful and T-Mobile, if you're listening, get in touch with me at aral@aralbalkan.com if you'd me to make an app like this for you guys.</p>
<p><strong>Update:</strong> Exactly 11 minutes after I tweeted about this, <a href="http://blog.natebeck.net/">Nate Beck</a> from T-Mobile US contacted me and, before the night is over, the app is getting prepped for an internal demo at T-Mobile US next week. </p>
<p>Moral of the story? Never underestimate the power of the Twitternets or the importance of apps, even simple ones, that improve user experience. :)  </p>
<p><img src="http://aralbalkan.com/wp-content/uploads/2009/06/tmobile-hot-spot-sign-in-air.jpg" alt="Tmobile hot Spot Sign in air" height="190" width="295" style="display:none;"></p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2232/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>TurkishCharactersAIR</title>
		<link>http://aralbalkan.com/2167</link>
		<comments>http://aralbalkan.com/2167#comments</comments>
		<pubDate>Sun, 24 May 2009 00:31:32 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/2167</guid>
		<description><![CDATA[I just whipped up an AIR app that should make it easier for people who don't have a Turkish keyboard but need to occasionally type in Turkish to use Turkish characters. Yes, it's a niche app :) The reason I made it? In 140 characters from earlier tonight: Emailed my mom in Turkish &#38; apparently [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />
<div style="float:right; margin-left:1.5em;"><div id="flashcontent9050" style="width:215px; height:180px;"> </div><script type="text/javascript">
<!-- // <![CDATA[
var so = new SWFObject("http://aralbalkan.com/wp-content/plugins/air-badge/AIRInstallBadge.swf", "Badge", "215", "180", "9.0.115", "#FFFFFF");
so.useExpressInstall("http://aralbalkan.com/wp-content/plugins/air-badge/expressinstall.swf");
so.addVariable("airversion", "1.0");
so.addVariable("appname", "TurkishCharactersAIR");
so.addVariable("appurl", "http://aralbalkan.com/downloads/TurkishCharactersAIR.air");
so.addVariable("appid", "TurkishCharactersAIR");
so.addVariable("pubid", "");
so.addVariable("appversion", "1.1");
so.addVariable("imageurl", "http://aralbalkan.com/images/turkish-characters-air-install-badge.jpg");
so.addVariable("appinstallarg", "installed from web");
so.addVariable("applauncharg", "launched from web");
so.addVariable("helpurl", "help.html");
so.addVariable("hidehelp", "true");
so.addVariable("skiptransition", "false");
so.addVariable("titlecolor", "#00AAFF");
so.addVariable("buttonlabelcolor", "#00AAFF");
so.addVariable("appnamecolor", "#00AAFF");
so.addVariable("str_err_airswf", "<u>Running locally?</u><br/><br/>The AIR proxy swf won't load properly when this demo is run from the local file system.");
so.write("flashcontent9050");
// ]]&gt; -->
</script>
</div>
<p>I just whipped up an AIR app that should make it easier for people who don't have a Turkish keyboard but need to occasionally type in Turkish to use Turkish characters. Yes, it's a niche app :) </p>
<p><span id="more-2167"></span></p>
<p>The reason I made it? In 140 characters from earlier tonight:</p>
<blockquote><p>Emailed my mom in Turkish &amp; apparently wrote "I don't fuck myself" instead of "I don't stress myself out" by not using Turkish characters.</p></blockquote>
<p>(Sorry, mom!)</p>
<p>After my tweet, <a href="http://twitter.com/alper">Alper Çuğun</a> tweeted: </p>
<blockquote><p>@aral Ouch! Any clue where to put those couple rarely used characters for easy access? Character palette doesn't really cut it.</p></blockquote>
<p>And that gave me the idea for the app! A few hours later (mostly spent on prettying it up and packaging it up), I give you the nichest app ever! :) </p>
<p>To use TurkishCharactersAIR, either click the buttons or simply switch to the app and type the closest corresponding Latin character to the one you want and the Turkish version will be copied to the system's clipboard. </p>
<p>Note: It's late and I've only tested this on OS X. Please let me know if you test it on Windows or Linux. </p>
<p>Shoutouts to:</p>
<ul>
<li><a href="http://www.graviti.tv/blog/?p=75">Graviti</a> for his awesome AIR Custom Chrome.</li>
<li><a href="http://www.asfusion.com/" title="AsFusion ActionScript + ColdFusion">Nahuel Foronda</a> for his beautiful <a href="http://www.scalenine.com/themes/brownie/Brownie.html" title="">Brownie AIR theme</a> and to <a href="http://www.scalenine.com/" title="ScaleNine : Skins and Themes for Flex and AIR">ScaleNine</a> for being the catalyst for such themes to be created.</li>
<li><a href="http://peterelst.com">Peter Elst</a> for his excellent <a href="http://www.peterelst.com/blog/2008/04/19/air-badge-wordpress-plugin/" title="AIR Badge WordPress plugin | Peter Elst">AIR Badge WordPress plugin</a> and to <a href="http://gskinner.com">Grant Skinner</a> for making the original <a href="http://www.adobe.com/devnet/air/articles/badge_for_air.html" title="Getting started with the custom install badge | Adobe Developer Connection">custom install badge</a> for AIR (by the way, the dimensions of the image for the badge are 205x170 — didn't see that stated anywhere!)</li>
</ul>
<p><img src="/images/turkish-characters-blog-post-image.jpg" style="display:none"></p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/2167/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Gaebar Beta 2 Released</title>
		<link>http://aralbalkan.com/1837</link>
		<comments>http://aralbalkan.com/1837#comments</comments>
		<pubDate>Wed, 31 Dec 2008 21:24:57 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1837</guid>
		<description><![CDATA[I'm happy to announce that there's quite an important update to Gaebar that brings with it some essential bug fixes and should help shave quite a bit of time off of your restores. I've also created a new project called gaebar-gaed-skeleton on GitHub that gives you an empty Google App Engine Django (Helper) project with [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><img src="http://aralbalkan.com/wp-content/uploads/2008/12/gaebar-beta-2-release.jpg" alt="Gaebar Beta 2 Release" height="190" width="295" style="float:left; margin-right:2em;"></p>
<p>I'm happy to announce that there's quite an important update to <a href="http://aralbalkan.com/1784" title="Aral Balkan - Google App Engine Backup and Restore (Gaebar) released">Gaebar</a> that brings with it some essential bug fixes and should help shave quite a bit of time off of your restores.</p>
<p><span id="more-1837"></span></p>
<p>I've also created a new project called <a href="https://github.com/aral/gaebar-gaed-skeleton/tree/master">gaebar-gaed-skeleton</a> on GitHub that gives you an empty Google App Engine Django (Helper) project with Gaebar pre-installed to start you off when creating your own applications.</p>
<p>Here's a list of changes in Beta 2:</p>
<ul>
<li><strong>Fixed:</strong> All required properties, including references should work correctly now. Required properties would raise an exception during the restore process in Beta 1.</li>
<li><strong>Refactored:</strong> We are no longer using actual entity references (which was unnecessary) but keys to create reference properties. This means that creation order of references doesn’t matter any more (thanks to Pete Koomen who explained all this to me in an email ages ago; it only just sunk in, Pete!)</li>
<li><strong>New feature:</strong> Due to above changes, the restore process is now one-pass, not two. This means that restores should now take considerably less time.</li>
<li><strong>Refactored:</strong> I moved the functional tests out to their own GitHub module since they were being shared by both the gaebar-gaed and gaebar-aep test apps. This will make maintaining them much easier.</li>
</ul>
<p>I want to thank Jonathan Ricketson for alerting me in the comments earlier today that the Beta 1 release was not handling required properties correctly (thanks, Jonathan). I also want to thank Thomas Bohmbach, Jr. for providing feedback and helping me test.</p>
<p>You can <a href="http://github.com/aral/" title="aral's Profile &mdash; GitHub">download Gaebar Beta 2 and the other Gaebar projects from my GitHub account</a>.</p>
<p>If you'd like to learn more about Gaebar, <a href="http://aralbalkan.com/1784" title="Aral Balkan - Google App Engine Backup and Restore (Gaebar) released">please see my original announcement</a>, which contains a screencast showing Gaebar (albeit Beta 1) in use.</p>
<p>As always, I value your bug reports, comments, and suggestions so please feel free to leave a comment and let me know of your experiences with Gaebar.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1837/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Google App Engine Backup and Restore (Gaebar) released</title>
		<link>http://aralbalkan.com/1784</link>
		<comments>http://aralbalkan.com/1784#comments</comments>
		<pubDate>Thu, 25 Dec 2008 01:26:52 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tools and Utilities]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[app engine]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[gaebar]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/?p=1784</guid>
		<description><![CDATA[Update: Beta 2 Released! See the Gaebar Beta 2 announcement. Here's my Christmas present for the Google App Engine community: Google App Engine Backup and Restore (or Gaebar, for short). Gaebar is an easy-to-use, standalone Django application that you can plug in to your existing Google App Engine Django or app-engine-patch-based Django applications on Google [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="512" height="426" id="viddler_fed9d8b6"><param name="movie" value="http://www.viddler.com/player/fed9d8b6/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/fed9d8b6/" width="512" height="426" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler_fed9d8b6" ></embed></object></p>
<p><strong>Update: Beta 2 Released!</strong> <a href="http://aralbalkan.com/1837" title="Gaebar Beta 2 release announcement">See the Gaebar Beta 2 announcement</a>.</p>
<p><span id="more-1784"></span></p>
<p>Here's my Christmas present for the Google App Engine community: Google App Engine Backup and Restore (or Gaebar, for short).</p>
<p>Gaebar is an easy-to-use, standalone Django application that you can plug in to your existing <a href="http://code.google.com/p/google-app-engine-django/" title="google-app-engine-django -</p>
<p> Google Code">Google App Engine Django</a> or <a href="http://code.google.com/p/app-engine-patch/" title="app-engine-patch -</p>
<p>  Google Code">app-engine-patch</a>-based Django applications on Google App Engine to give them datastore backup and restore functionality. </p>
<p>For a quick overview of Gaebar, watch the screencast, above. For the impatient, links to the project pages where you can download Gaebar follow.</p>
<h3>Downloads</h3>
<p>Gaebar is hosted on GitHub. You can either download archives or clone the repository (or install Gaebar as a git submodule) via git. Alongside the Gaebar project itself are two sample applications &mdash; one built on Google App Engine Django and the other on app-engine-patch &mdash; that contain the Gaebar functional test suite. The functional test suite tests every datatype supported by Google App Engine as well as references, Expandos, and ancestor relationships.</p>
<p>Please make sure you read the readme files after downloading the projects for installation and usage instructions.</p>
<ul>
<li>Gaebar: <a href="http://github.com/aral/gaebar/tree/master">http://github.com/aral/gaebar/tree/master</a></li>
<li>Gaebar-gaed: <a href="http://github.com/aral/gaebar-gaed/tree/master">http://github.com/aral/gaebar-gaed/tree/master</a></li>
<li>Gaebar-aep: <a href="http://github.com/aral/gaebar-aep/tree/master">http://github.com/aral/gaebar-aep/tree/master</a></li>
</ul>
<h3>What you can do with Gaebar</h3>
<ul>
<li>Backup your deployment application's datastore for safekeeping.</li>
<li>Restore that backup on your local development server for testing with real data during development.</li>
<li>Restore that backup to a <em>different</em> Google App Engine application and use that application as a <strong>staging application</strong> much in the same way you would use a staging server in traditional development.</li>
</ul>
<p>(You can, of course, also backup and restore your local development datastore as well as your staging application, etc.)</p>
<h3>I've got a huge datastore, will Gaebar work for me?</h3>
<p>Congratulations on the impressive size of your datastore! The answer should be "yes!" The largest datastore I've tested it with is the <a href="http://www.headconference.com">&lt;head&gt; web conference</a> datastore. The latest backup had 18, 969 rows from 14 models backed up into 225 code shards.</p>
<h3>What's a staging application?</h3>
<p>A staging application is a new Google App Engine concept made possible by Gaebar. Basically, if your application is <em>myapp.appspot.com</em>, you can use a separate application (say, <em>myapp-staging.appspot.com</em>) in the same way as you would use a staging server in traditional development. </p>
<p>Your staging application can let you try out new features and test with real data without having your users see your changes until you are ready to deploy to your main application.</p>
<p>In fact, it's a perfect staging environment since it is identical to your deployment environment. For an example of this, see the screencast.</p>
<h3>How Gaebar works</h3>
<p>Gaebar backs up the data in your datastore to Python code. It restores your data by running the generated Python code.</p>
<p>Since a backup is a long running process, and since Google App Engine doesn't support long-running processes, Gaebar fakes a long running process by breaking up the backup and restore processes into bite-sized chunks and repeatedly hitting the server via Ajax calls. </p>
<p>By default, Gaebar backs up 5 rows at a time to avoid the short term CPU and 10-second call duration quotas and splits the generated code into code shards of approx. 300KB to avoid the 1MB limit on objects. You can change these defaults in the views.py file if your app has higher quotas and you want faster backups and restores.</p>
<p>Once a backup of a remote server is complete, Gaebar automatically hits your local development server. From there on, the local development server makes a series of calls to the remote server to download the backup files (code shards) from the remote server. Once the backup is complete, you will see a new backup folder in <em>gaebar/backups</em> with the contents of your backup. </p>
<p>Here's an example of some generated backup code from the Google App Engine Django test application <strong>(updated for the upcoming Beta 2 release)</strong>:</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">pickle</span>
<span style="color: #ff7700;font-weight:bold;">from</span> google.<span style="color: black;">appengine</span>.<span style="color: black;">api</span>.<span style="color: black;">datastore</span> <span style="color: #ff7700;font-weight:bold;">import</span> datastore_types
<span style="color: #ff7700;font-weight:bold;">from</span> app1.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> *
<span style="color: #ff7700;font-weight:bold;">from</span> app2.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> *
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> row_0<span style="color: black;">&#40;</span>app_name<span style="color: black;">&#41;</span>:
	existing_entity = Profile.<span style="color: black;">get</span><span style="color: black;">&#40;</span>datastore_types.<span style="color: black;">Key</span>.<span style="color: black;">from_path</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Profile'</span>, <span style="color: #ff4500;">1</span>, _app=app_name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> existing_entity:
		existing_entity.<span style="color: black;">delete</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	profile_0 = Profile<span style="color: black;">&#40;</span>key_name=<span style="color: #483d8b;">&quot;id1&quot;</span>, friends = <span style="color: #dc143c;">pickle</span>.<span style="color: black;">loads</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'(lp0<span style="color: #000099; font-weight: bold;">\n</span>.'</span><span style="color: black;">&#41;</span>, in_relationship_with = <span style="color: #dc143c;">pickle</span>.<span style="color: black;">loads</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'N.'</span><span style="color: black;">&#41;</span>, full_name = <span style="color: #dc143c;">pickle</span>.<span style="color: black;">loads</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'VPaul Booth<span style="color: #000099; font-weight: bold;">\n</span>p0<span style="color: #000099; font-weight: bold;">\n</span>.'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	profile_0.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> row_1<span style="color: black;">&#40;</span>app_name<span style="color: black;">&#41;</span>:
	existing_entity = Profile.<span style="color: black;">get</span><span style="color: black;">&#40;</span>datastore_types.<span style="color: black;">Key</span>.<span style="color: black;">from_path</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Profile'</span>, <span style="color: #ff4500;">2</span>, _app=app_name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> existing_entity:
		existing_entity.<span style="color: black;">delete</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	profile_1 = Profile<span style="color: black;">&#40;</span>key_name=<span style="color: #483d8b;">&quot;id2&quot;</span>, full_name = <span style="color: #dc143c;">pickle</span>.<span style="color: black;">loads</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'VAral Balkan<span style="color: #000099; font-weight: bold;">\n</span>p0<span style="color: #000099; font-weight: bold;">\n</span>.'</span><span style="color: black;">&#41;</span>, friends = <span style="color: black;">&#91;</span>datastore_types.<span style="color: black;">Key</span>.<span style="color: black;">from_path</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Profile'</span>, u<span style="color: #483d8b;">'stephalicious'</span>, _app=app_name<span style="color: black;">&#41;</span>, datastore_types.<span style="color: black;">Key</span>.<span style="color: black;">from_path</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Profile'</span>, <span style="color: #483d8b;">'id1'</span>, _app=app_name<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>, in_relationship_with = datastore_types.<span style="color: black;">Key</span>.<span style="color: black;">from_path</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Profile'</span>, u<span style="color: #483d8b;">'stephalicious'</span>, _app=app_name<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	profile_1.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre>
<p>To restore, you simply deploy your application, along with the backup folder, to your deployment environment and hit the Restore button in Gaebar. (If you have a large datastore both the backup and restore processes will take a long time, especially when restoring to a local development server.)</p>
<p>The restore process simply calls each of the generated row functions and each row function restores a single row into the datastore. </p>
<h3>A note on the screencast</h3>
<p>When mentioning how to install Gaebar, I left out that you also need to add the URL mapping for Gaebar to your application's urls.py. That, along with the rest of the installation instructions are in the readme.txt file, which I highly recommend that you peruse.</p>
<h3>Have your say!</h3>
<p>As in all things, my approach to blog posts is that they should evolve over time and your feedback is invaluable in achieving this by helping me fix factual errors, fill in details, and expand the original post. </p>
<p>What do you think of Gaebar? Have you run into any issues that need fixing? Do you have other suggestions on how to improve it? Or do you, perhaps, have a patch to send me that adds Webapp support or some other feature? Leave me a comment and let me know!</p>
<p><em>Gaebar is a Naklab™ production released under GNU GPL v3 and sponsored by the <a href="http://www.headconference.com">&lt;head&gt; web conference</a>.</em></p>
<p><img src="http://aralbalkan.com/wp-content/uploads/2008/12/gaebar-logo.jpg" alt="Gaebar Logo" height="190" width="295" style="display:none;"></p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1784/feed</wfw:commentRss>
		<slash:comments>55</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>The GAE SWF Project 1.21 1.23</title>
		<link>http://aralbalkan.com/1320</link>
		<comments>http://aralbalkan.com/1320#comments</comments>
		<pubDate>Sun, 20 Apr 2008 19:33:58 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[changes]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[pyamf]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1320</guid>
		<description><![CDATA[I just updated The GAE SWF Project to version 1.21 1.23. New source code for the update is now available for download. All changes in this version are server-side: All requests apart from those to the PyAMF gateway go through the IndexHandler class. The app.yaml file no longer maps /examples/.* URLs to the various example [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I just updated <a href="http://gaeswf.appspot.com/" title="The GAE SWF Project: Flash and Flex apps on Google App Engine">The GAE SWF Project</a> to version <strike>1.21</strike> 1.23. New source code for the update is now available for download.</p>
<p>All changes in this version are server-side:</p>
<p><span id="more-1320"></span></p>
<ul>
<li>All requests apart from those to the PyAMF gateway go through the <code>IndexHandler</code> class. The <em>app.yaml</em> file no longer maps <em>/examples/.*</em> URLs to the various example SWF applications. In other words, the SWF apps are simply handler classes now, not separate WSGI applications. The PyAMF gateway remains a separate WSGI application.</li>
<li>Pulled out the server-side deep linking code from the initial example to a new <code>BaseSWFHandler</code> class in the new <em>gaeswf</em> package. The handlers for all SWF examples will extend this class and call the <code>handleDeepLink()</code> method to have regular deep links automatically converted to SWFAddress deep links.</li>
<li>Removed the unnecessary <em>examples</em> and <em>initial</em> packages and placed all examples in the root of the <em>examples</em> package.</li>
<li>Added 404 handling. Unknown URLs no longer fail silently.</li>
<li><em>main.html</em> template is now known as <em>base.html</em>.</li>
<li>Added simple.html template for handlers that want to use base.html without the need for a separate template that extends it.</li>
</ul>
<p><a href="http://gaeswf.appspot.com/" title="The GAE SWF Project: Flash and Flex apps on Google App Engine">Enjoy!</a></p>
<p><strong>Update:</strong> I've updated the online version to 1.23 to change the 404 photo. I realized this morning that the original Creative Commons-licensed photo I had found on Flickr did not belong to the user who had published it on their account.)</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1320/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
		<item>
		<title>Updated The GAE SWF Project (v1.20)</title>
		<link>http://aralbalkan.com/1319</link>
		<comments>http://aralbalkan.com/1319#comments</comments>
		<pubDate>Sun, 20 Apr 2008 00:46:50 +0000</pubDate>
		<dc:creator>Aral</dc:creator>
				<category><![CDATA[App Engine]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[refactored]]></category>
		<category><![CDATA[the gae swf project]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://aralbalkan.com/1319</guid>
		<description><![CDATA[I just updated The GAE SWF Project to version 1.20 on appspot. A quick list of changes: Pulled out BaseView and BaseApplication classes. Simplified service calls. You no longer have to use Service.call() and pass a reference to the view instance. Just use execute("service.method", arg1, arg2, ...). Fixed a bug where the app was remembering [...]]]></description>
			<content:encoded><![CDATA[<p id="top" />I just updated <a href="http://gaeswf.appspot.com/" title="The GAE SWF Project: Flash and Flex apps on Google App Engine">The GAE SWF Project</a> to version 1.20 on appspot.</p>
<p>A quick list of changes:<span id="more-1319"></span></p>
<ul>
<li>Pulled out <code>BaseView</code> and <code>BaseApplication</code> classes.</li>
<li>Simplified service calls. You no longer have to use Service.call() and pass a reference to the view instance. Just use <code>execute("service.method", arg1, arg2, ...)</code>.</li>
<li>Fixed a bug where the app was remembering the initial deep link on logout. Logouts now take you to the root of your Flash app.</li>
</ul>
<p>The big change is that I've pulled out base application functionality so that your Application class now only contains logic specific to your particular application and not to GAE SWF applications in general. </p>
<p>Check out <a href="http://gaeswf.appspot.com/" title="The GAE SWF Project: Flash and Flex apps on Google App Engine">The GAE SWF Project on appspot</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://aralbalkan.com/1319/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc/2.0/uk/</creativeCommons:license>
	</item>
	</channel>
</rss>

