<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fragmented Code &#187; Google App Engine</title>
	<atom:link href="http://www.fragmentedcode.com/topics/google-app-engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fragmentedcode.com</link>
	<description>Snippets, Blocks and Infinite Loops</description>
	<lastBuildDate>Sun, 24 Oct 2010 03:10:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Where I spend my day &#8230;</title>
		<link>http://www.fragmentedcode.com/2009/03/23/spend-day/</link>
		<comments>http://www.fragmentedcode.com/2009/03/23/spend-day/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 15:47:13 +0000</pubDate>
		<dc:creator>zoul</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[desk]]></category>
		<category><![CDATA[hdtv]]></category>

		<guid isPermaLink="false">http://www.fragmentedcode.com/?p=122</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div id="attachment_124" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.fragmentedcode.com/wp-content/uploads/2009/03/dsc_9588_s-copy.jpg"><img class="size-full wp-image-124" title="my desk" src="http://www.fragmentedcode.com/wp-content/uploads/2009/03/dsc_9588_s-copy.jpg" alt="my desk, where I spend all my time." width="500" height="410" /></a><p class="wp-caption-text">my desk, where I spend all my time.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fragmentedcode.com/2009/03/23/spend-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google App Engine Exploration</title>
		<link>http://www.fragmentedcode.com/2008/05/30/google-app-engine-exploration/</link>
		<comments>http://www.fragmentedcode.com/2008/05/30/google-app-engine-exploration/#comments</comments>
		<pubDate>Fri, 30 May 2008 23:59:21 +0000</pubDate>
		<dc:creator>zoul</dc:creator>
				<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://www.fragmentedcode.com/?p=61</guid>
		<description><![CDATA[As usual, I&#8217;ve found yet another technology that peaks my interests and I&#8217;m exploring it.  This technology is Google App Engine and is powered by Python.  So far, my thoughts on it are &#8216;Wow, thats cool!&#8217;.  Google opened up the flood gates on 5/30/2008 (or 5/29?) for public beta testing and so I immediately signed [...]]]></description>
			<content:encoded><![CDATA[<p>As usual, I&#8217;ve found yet another technology that peaks my interests and I&#8217;m exploring it.  This technology is <a title="Google App Engine" href="http://code.google.com/appengine">Google App Engine</a> and is powered by Python.  So far, my thoughts on it are &#8216;Wow, thats cool!&#8217;.  Google opened up the flood gates on 5/30/2008 (or 5/29?) for public beta testing and so I immediately signed up (after sitting on the waiting list for a closed beta invite for a week or two) and registered three applications.  I registered three right off the bat simply because it took me so long to find an available name for the one i wanted to &#8216;play with&#8217;, so I registered all three of my alloted application names right away.</p>
<p>My &#8216;exploration&#8217; project is simply called &#8216;Zero Point&#8217;, as in &#8216;There really is no point&#8217;.  You can <a title="Zero Point: Because there really is just no point." href="http://zero-point.appspot.com">view this application here</a>.</p>
<p>So far, it&#8217;s a simple sandbox application with a basic Django template.  I created &#8216;master.html&#8217; and &#8216;content.html&#8217; templates, &#8216;content.html&#8217; simply extends &#8216;master.html&#8217; &#8212; so my main page layout is contained in &#8216;master.html&#8217; but I render &#8216;content.html&#8217; currently &#8212; spiffy, eh?</p>
<p>I also tied in a simple User account system, using the User API available from Google App Engine.  If you access the site, and then proceed to login, I&#8217;ll track your page views &#8212; super cool, don&#8217;t you think?</p>
<p>So, the point of this blog post is &#8230; well, as the blog title implies, to show you a code snippet (or, a &#8216;code fragment&#8217;), so let&#8217;s get onto that, shall we?</p>
<p>I was trying to figure out how to make dynamic URL&#8217;s, so that I could build out &#8216;something&#8217; (I really don&#8217;t have a plan yet, I just figure it&#8217;ll use dynamic URLs) and ran into a small problem &#8212; Google App Engine uses an &#8216;app.yaml&#8217; file to configure your request mappings, and &#8220;- url: /.*&#8221; should match &#8216;anything&#8217; that isn&#8217;t already explicitly mapped to something else first, right?  Well, that&#8217;s what I thought, but I kept getting quiet 404&#8242;s without knowing why &#8230; so, I looked at the application code just a bit more and realized I was passing an explicit path into my WSGIApplication instantiation.  Converting &#8216;/&#8217; into &#8216;/.*&#8217; did the trick.  Now, keep in mind, all of Google&#8217;s examples (so far that I&#8217;ve read, that is) use this static mapping of &#8216;/&#8217; for the &#8216;main.py&#8217; and Google App Engine requires you to map your scripts in app.yaml &#8230; so, now your stuck with mapping things to more then one place, what&#8217;s the deal with that?</p>
<p>I was looking at an example that uses AJAX, and it has an RSS feed built into it (or something like that) and in the main() function they pass multiple URI&#8217;s into WSGIApplication() one for &#8216;/&#8217; and one for &#8216;/rss&#8217; &#8212; this is where I got the idea to pass a Regular Expression into WSGIApplication.  As expected, it worked and now Zero Point can work with dynamic URL&#8217;s &#8212; problem solved.</p>
<p>[python]def main():<br />
application = webapp.WSGIApplication([('/.*', MainHandler)], debug=True)<br />
wsgiref.handlers.CGIHandler().run(application)[/python]</p>
<p>That&#8217;s the &#8216;main&#8217; method, which just simply instantiates my MainHandler for any URL that isn&#8217;t mapped to another script file &#8212; beautiful, eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fragmentedcode.com/2008/05/30/google-app-engine-exploration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

