<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Dryice Liu's Blog &#187; turbogears</title>
	<link>http://dryice.name/blog</link>
	<description></description>
	<pubDate>Tue, 31 Aug 2010 12:01:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>pylons</title>
		<link>http://dryice.name/blog/python/turbogears/pylons/</link>
		<comments>http://dryice.name/blog/python/turbogears/pylons/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 14:36:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[turbogears]]></category>
<category>pylons</category><category>python</category><category>turbogears</category>
		<guid isPermaLink="false">http://dryice.name/wordpress/index.php/uncategorized/pylons/</guid>
		<description><![CDATA[I gave Pylons a try today, followed the turorials, read some
documents, and compared it with my current Python web frame work of
choice: TurboGears.
Though many people say good words for pylons, I believe TurboGears is
still a good choice for me at this time:

TG is one year older than Pylons, which means more stable most of
the time
TG [...]]]></description>
			<content:encoded><![CDATA[<p>I gave <a href="http://pylonshq.com/">Pylons</a> a try today, followed the turorials, read some<br />
documents, and compared it with my current Python web frame work of<br />
choice: <a href="http://www.turbogears.org/">TurboGears</a>.</p>
<p>Though many people <a href="http://blog.ianbicking.org/turbogears-and-pylons.html">say good words for pylons</a>, I believe TurboGears is<br />
still a good choice for me at this time:</p>
<ul>
<li>TG is one year older than Pylons, which means more stable most of<br />
the time</li>
<li>TG comes with more tools that is handy. Say for<br />
internationalization, TG is much easier. It can handle strings in<br />
both the Python files and template. It also do the language choose<br />
automatically.</li>
<li>The major difference between the two is the dispatching<br />
mechanisms. Though Pylons&#8217; URL matching is more flexable, I found<br />
the TurboGears tree like structure quite nature, as some one from<br />
<a href="http://www.mems-exchange.org/software/quixote/">Quixote</a>.</li>
<li>TurboGears comes with AJAX support</li>
<li>TurboGears comes with a good widget library, and many more in the<br />
<a href="http://www.mems-exchange.org/software/quixote/">cogbin</a>. <a href="http://toscawidgets.org/">ToscoWidgets</a>, which is seperated from TurboGears, will be<br />
used in the future release of both. And for sure it will be much<br />
easier to switch to ToscoWidgets from TG than from Pylons.</li>
<li>One thing TG lakes is the caching. However when it comes in a<br />
future release, I can benefit from it with little or no change of<br />
my application code.</li>
<li>TG returns a dict/JSON from the controller. This seperates the view<br />
and controller, and makes multiple views (say HTML and RSS feed)<br />
quite easier. While the &#8220;c&#8221; global accross controller and templage<br />
is, well, rather urgly from my point of view.</li>
</ul>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=631&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_631" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/python/turbogears/pylons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dynamic handling of &#8216;virtual file names&#8217;, or URL paths with file extensions</title>
		<link>http://dryice.name/blog/python/turbogears/dynamic-handling-of-virtual-file-names-or-url-paths-with-file-extensions/</link>
		<comments>http://dryice.name/blog/python/turbogears/dynamic-handling-of-virtual-file-names-or-url-paths-with-file-extensions/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 10:39:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[turbogears]]></category>

		<guid isPermaLink="false">http://dryice.name/wordpress/index.php/uncategorized/dynamic-handling-of-virtual-file-names-or-url-paths-with-file-extensions/</guid>
		<description><![CDATA[Well TurboGears  uses CherryPY as the URL dispatcher. And by default
it uses the object structure as a tree like structure for the URL
paths, like the file system structure.
This works fine most of the time. However, the Python function name is
quite restrict than what we can use in an URL. For example, the &#8220;.&#8221;
character is [...]]]></description>
			<content:encoded><![CDATA[<p>Well <a href="http://www.turbogears.org/">TurboGears</a>  uses <a href="http://www.cherrypy.org/">CherryPY</a> as the URL dispatcher. And by default<br />
it uses the object structure as a tree like structure for the URL<br />
paths, like the file system structure.</p>
<p>This works fine most of the time. However, the Python function name is<br />
quite restrict than what we can use in an URL. For example, the &#8220;.&#8221;<br />
character is not allowed. So, for example, if I want to make the URL<br />
looks the old traditional way, like &#8220;/index.html&#8221;. I&#8217;ll need to write<br />
a BIG elif clause in the default() function.</p>
<p>The good news is that after some digg on Google I found<br />
<a href="http://www.cherrypy.org/ticket/87">This CherryPY ticket</a>. And the solution is simple: I could use<br />
index_html as the function name, and when user types index.html in the<br />
URL, CherryPY will find index_html <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=632&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_632" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/python/turbogears/dynamic-handling-of-virtual-file-names-or-url-paths-with-file-extensions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

