<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using Mako with Tornado Web Server</title>
	<atom:link href="http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/</link>
	<description>kungpow programming</description>
	<lastBuildDate>Fri, 28 May 2010 00:41:12 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike Lewis</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-303</link>
		<dc:creator>Mike Lewis</dc:creator>
		<pubDate>Fri, 28 May 2010 00:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-303</guid>
		<description>Hi,&lt;br&gt;&lt;br&gt;I was playing around with something similar, and I think you might be able to get better performance by using render_context, and creating a context with the current request handler.  This way mako will write directly to your request, and not buffer into a string.&lt;br&gt;&lt;br&gt;Here&#039;s my render_template:&lt;br&gt;&lt;br&gt;    def render_template(self, templatename, **kwargs):&lt;br&gt;        mytemplate = self.makolookup.get_template(templatename)&lt;br&gt;        context = Context(self)&lt;br&gt;        try:&lt;br&gt;            #r = mytemplate.render(h=helpers, **kwargs)&lt;br&gt;            mytemplate.render_context(context, **kwargs)&lt;br&gt;        except:&lt;br&gt;            exceptions.html_error_template().render_context(context)&lt;br&gt;            raise</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I was playing around with something similar, and I think you might be able to get better performance by using render_context, and creating a context with the current request handler.  This way mako will write directly to your request, and not buffer into a string.</p>
<p>Here&#39;s my render_template:</p>
<p>    def render_template(self, templatename, **kwargs):<br />        mytemplate = self.makolookup.get_template(templatename)<br />        context = Context(self)<br />        try:<br />            #r = mytemplate.render(h=helpers, **kwargs)<br />            mytemplate.render_context(context, **kwargs)<br />        except:<br />            exceptions.html_error_template().render_context(context)<br />            raise</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: W-Mark Kubacki</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-299</link>
		<dc:creator>W-Mark Kubacki</dc:creator>
		<pubDate>Fri, 12 Feb 2010 23:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-299</guid>
		<description>Update: Validators work (see the example in &#039;demos&#039;), without the need for sessions.&lt;br&gt;&lt;br&gt;And Matt, see &lt;a href=&quot;http://github.com/hudora/huBarcode&quot; rel=&quot;nofollow&quot;&gt;http://github.com/hudora/huBarcode&lt;/a&gt; so you can generate QR codes locally. ^_~</description>
		<content:encoded><![CDATA[<p>Update: Validators work (see the example in &#39;demos&#39;), without the need for sessions.</p>
<p>And Matt, see <a href="http://github.com/hudora/huBarcode" rel="nofollow">http://github.com/hudora/huBarcode</a> so you can generate QR codes locally. ^_~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ninjacipher</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-298</link>
		<dc:creator>ninjacipher</dc:creator>
		<pubDate>Fri, 05 Feb 2010 03:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-298</guid>
		<description>hmmm very interesting. Didn&#039;t notice the mongodb session handler in your repo. I&#039;ll have to go back and take a look at that. Totally agree about not being the lonely hero. I&#039;m all about using the right tool for the right job, and if someone has done it already I&#039;m happy to not reinvent the wheel. To be honest in my initial searching I couldn&#039;t find a session handler out there for mongodb so we just quickly hacked up our own.&lt;br&gt;&lt;br&gt;As for my opinion about sessions... it really depends on what kind of info your looking to store. If there is anything remotely sensitive you prob want to hold onto it yourself. If you need to persist something for a long period of time then cookies are the way to go. I tend to use a combo of both. To each his own though. :) &lt;br&gt;&lt;br&gt;Thx for the comments. I&#039;ll keep an eye on your repo. Interested to see where you end up with it. I think some of the things your working on will make Tornado a much more approachable option for a lot of developers.</description>
		<content:encoded><![CDATA[<p>hmmm very interesting. Didn&#39;t notice the mongodb session handler in your repo. I&#39;ll have to go back and take a look at that. Totally agree about not being the lonely hero. I&#39;m all about using the right tool for the right job, and if someone has done it already I&#39;m happy to not reinvent the wheel. To be honest in my initial searching I couldn&#39;t find a session handler out there for mongodb so we just quickly hacked up our own.</p>
<p>As for my opinion about sessions&#8230; it really depends on what kind of info your looking to store. If there is anything remotely sensitive you prob want to hold onto it yourself. If you need to persist something for a long period of time then cookies are the way to go. I tend to use a combo of both. To each his own though. <img src='http://www.ninjacipher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Thx for the comments. I&#39;ll keep an eye on your repo. Interested to see where you end up with it. I think some of the things your working on will make Tornado a much more approachable option for a lot of developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: W-Mark Kubacki</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-297</link>
		<dc:creator>W-Mark Kubacki</dc:creator>
		<pubDate>Thu, 04 Feb 2010 22:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-297</guid>
		<description>Actually that was not my work - I just merged the session part from Milan Cermak&#039;s repository. And, you can store session data in files, files in directories, MySQL, Redis, Memcached and MongoDB. Plus the other extras, which are not on topic here. ^_~&lt;br&gt;&lt;br&gt;It&#039;s often better to join forces than be the lonely hero. I hope that with sessions I can get Ian Bicking&#039;s &lt;a href=&quot;http://formencode.org/&quot; rel=&quot;nofollow&quot;&gt;FormEncode validators&lt;/a&gt; integrated (disclosure: Iam one of FE authors), so we get an leightweight web-app framework similar to TurboGears.&lt;br&gt;&lt;br&gt;Currently I am stuck by the decision whether to use (in my own web-app) sessions at all or whether to let the clients store everything in cookies, to spare me the overhead of storing and retrieving session data. How do you think about this?</description>
		<content:encoded><![CDATA[<p>Actually that was not my work &#8211; I just merged the session part from Milan Cermak&#39;s repository. And, you can store session data in files, files in directories, MySQL, Redis, Memcached and MongoDB. Plus the other extras, which are not on topic here. ^_~</p>
<p>It&#39;s often better to join forces than be the lonely hero. I hope that with sessions I can get Ian Bicking&#39;s <a href="http://formencode.org/" rel="nofollow">FormEncode validators</a> integrated (disclosure: Iam one of FE authors), so we get an leightweight web-app framework similar to TurboGears.</p>
<p>Currently I am stuck by the decision whether to use (in my own web-app) sessions at all or whether to let the clients store everything in cookies, to spare me the overhead of storing and retrieving session data. How do you think about this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ninjacipher</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-296</link>
		<dc:creator>ninjacipher</dc:creator>
		<pubDate>Thu, 04 Feb 2010 20:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-296</guid>
		<description>Sweet! Nice work. Looks like you also did some work on adding session support. Very cool. We did something similar but instead of using memcached we store the sessions in mongodb. Anyway nice work. Love to see how it evolves.</description>
		<content:encoded><![CDATA[<p>Sweet! Nice work. Looks like you also did some work on adding session support. Very cool. We did something similar but instead of using memcached we store the sessions in mongodb. Anyway nice work. Love to see how it evolves.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: W-Mark Kubacki</title>
		<link>http://www.ninjacipher.com/2010/01/01/using-mako-with-tornado-web-server/comment-page-1/#comment-295</link>
		<dc:creator>W-Mark Kubacki</dc:creator>
		<pubDate>Thu, 04 Feb 2010 19:24:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ninjacipher.com/?p=191#comment-295</guid>
		<description>Hi Matt. Some days ago I&#039;ve integrated Mako templates similarly, but finally forked Tornado and replaced their templating engine completely (along with the uncommon i18n support, which is done by gettext now). See &lt;a href=&quot;http://github.com/wmark/tornado&quot; rel=&quot;nofollow&quot;&gt;wmark/tornado at Github&lt;/a&gt; for more.</description>
		<content:encoded><![CDATA[<p>Hi Matt. Some days ago I&#39;ve integrated Mako templates similarly, but finally forked Tornado and replaced their templating engine completely (along with the uncommon i18n support, which is done by gettext now). See <a href="http://github.com/wmark/tornado" rel="nofollow">wmark/tornado at Github</a> for more.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
