<?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>fforw.de &#187; turbogears</title>
	<atom:link href="http://fforw.de/tag/turbogears/feed/" rel="self" type="application/rss+xml" />
	<link>http://fforw.de</link>
	<description>skip the boring parts</description>
	<lastBuildDate>Sat, 12 Nov 2011 11:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>fforw.de on WordPress</title>
		<link>http://fforw.de/post/fforw-de-on-wordpress/</link>
		<comments>http://fforw.de/post/fforw-de-on-wordpress/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 12:55:25 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[jcouchdb]]></category>
		<category><![CDATA[notice]]></category>
		<category><![CDATA[turbogears]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fforw.de/?p=31</guid>
		<description><![CDATA[This blog has been relatively stale for a while now &#8212; mostly due to increasing work pressure and the limited amount of time I had left for it. What little time I had was mostly wasted on coding on it. The previous version was written in turbogears which seemd like a good idea back in [...]]]></description>
			<content:encoded><![CDATA[<p>This blog has been relatively stale for a while now &#8212; mostly due to increasing work pressure and the limited amount of time I had left for it. What little time I had was mostly wasted on coding on it. The previous version was written in turbogears which seemd like a good idea back in 2006. Over time I kind of regretted that decision, which was not really Turbogears fault, but just caused by my laziness to really update it etc.</p>
<p>I&#8217;ve been frustrated with the old blog code and the old design for some time now and wanted to redo everything and already started multiple attempts in various technological reincarnations &#8212; the latest being an implementation in java/spring using my jcouchdb library. The design got more and more ambitious over time; so ambitious that it would basically require me to work full-time on it.<span id="more-31"></span></p>
<p>The solution was to seriously cut back on my ambitions with this blog and just use one of the available blog engines. This turned out to be wordpress in the end because it seemed like a good fit. The import from my Turbogears blog could be done with a hacky one-liner from the turbogears shell:</p>
<pre class="prettyprint lang_python">"".join(
    map(lambda post : """
        &lt;item&gt;
            &lt;pubDate&gt;%s&lt;/pubDate&gt;
            %s
            &lt;title&gt;%s&lt;/title&gt;
            &lt;content:encoded&gt;%s&lt;/content:encoded&gt;
        &lt;/item&gt;\n""" % (
            post.created,
            "".join( map(lambda s: "&lt;category&gt;%s&lt;/category&gt;\n" % s,
                             post.tagNames.split(" "))),
            post.name,
            post.text.replace("\n"," ")), posts))
</pre>
<p>I hope all this will lead to me actually writing stuff in this blog instead of perpetually coding on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/fforw-de-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Javascript Slim-Down</title>
		<link>http://fforw.de/post/javascript-slim-down/</link>
		<comments>http://fforw.de/post/javascript-slim-down/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 20:09:26 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[turbogears]]></category>

		<guid isPermaLink="false">http://blog.willie/?p=18</guid>
		<description><![CDATA[Modern javascript libraries tend to be fat. This increases the page load latency, wastes bandwidth and is a real problem for people with slower connections (There are still about 50% dialup users). So trying to slim things down comes almost naturally. In this article I will try to present two compression methods that together will [...]]]></description>
			<content:encoded><![CDATA[<p>Modern javascript libraries tend to be <strong>fat</strong>. This increases the page load latency, wastes bandwidth and is a real problem for people with slower connections (There are still about 50% dialup users). So trying to slim things down comes almost naturally.</p>
<p>In this article I will try to present two compression methods that together will make your scripts lose up to 80% of their weight and I will also present an alternative way to serve gzip compressed files with <a href="http://www.turbogears.org" title="Turbogears home page">Turbogears</a> : a precompressing gzip controller for Turbogears.  </p>
<hr width="100%" size="2" />
<p>The first thing one can do is <a href="/post/Dojo_Javascript_Compression_and_IE_conditional_compilation/" title="fforw.de post: Dojo Javascript Compression and IE conditional compilation">javascript compression</a>. Stripping unnecessary whitespace and renaming local variables can already bring down the size a bit, The <a href="http://dojotoolkit.org/docs/compressor_system.html">dojo javascript compressor</a> ( <a href="http://alex.dojotoolkit.org/shrinksafe/">online version</a>  ) does both.</p>
<p>Let&#8217;s take two of the javascript libraries used for this site as examples:</p>
<ul>
<li><em>ff-src.js</em> &#8211; source version of my own javascript library </p>
<p>Uncompressed: 10.1 KB<br />Javascript compressed: 6.7 KB<br /><strong>Compression: 33%</p>
<p></strong></li>
<li><em>tinymce.js</em> &#8211; all sources I need from the <a href="http://tinymce.moxiecode.com/" title="tinymce home page">tinymce richtext editor</a> joined together
<p>Uncompressed: 329.0 KB<br />Javascript compressed: 233.6 KB<br /><strong>Compression:</strong> 29%</li>
</ul>
<p>This sure is nice for a start, but we can go even one step further with gzip compression. Gzip compression is a w3 standard ( defined in <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">RFC 2616</a> ) and can be used to send the output of a server compressed to a client. Using this our files shrink even more: </p>
<ul>
<li><em>ff-src.js</em><br />Uncompressed: 10.1 KB<br />Js and gzip compressed : 2.8 KB<br /><strong>Compression:</strong> 73%</li>
<li><em>tinymce.js</em><br />Uncompressed: 329.0 KB<br />Js and gzip compressed : 57.8 KB<br /><strong>Compression:</strong> 82%</li>
</ul>
<p>Most modern web servers allow you to enable general gzip compression. IIS does it, Apache has mod_gzip for it, Turbogears can do gzip compression via <a href="http://www.cherrypy.org/wiki/GzipFilter">cherrypy&#8217;s gzip filter</a>. </p>
<p>Personally this felt like an overkill to me. I don&#8217;t really want to use my precious server CPU cycles to compress output where it&#8217;s no larger win to do so. So I wrote myself a precompressing gzip controller for <a href="http://www.turbogears.org" title="Turbogears home page">Turbogears</a>. It creates gzipped copies of a configurable set of files and automatically updates them. If the client browser supports gzip encoding, the gzipped file copy is sent, otherwise the normal file is send.</p>
<p>The controller is meant to be used as a subcontroller list this</p>
<blockquote><p>class Root( controllers.RootController ):<br />    # subcontroller<br />    gz = GzipController()</p></blockquote>
<p> This would map the gzip controller to <em>/gz/ .</em></p>
<p><u><strong>Download:</strong></u></p>
<ul>
<li> <a href="/static/files/gz.py" title="gzip controller source">gz.py</a>  &#8212; precompressing gzip controller </li>
<li><u>serveFile.patch</u>  &#8212; Update: the patch has been integrated into the turbogears distribution</li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/javascript-slim-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

