<?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>Toms Blog</title>
	<atom:link href="http://blog.toms-projekte.de/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.toms-projekte.de</link>
	<description>Some Technical Thoughts on Zope/Plone Development</description>
	<lastBuildDate>Fri, 27 Aug 2010 12:51:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New Book: &#8220;Plone 3 Multimedia&#8221;</title>
		<link>http://blog.toms-projekte.de/?p=59</link>
		<comments>http://blog.toms-projekte.de/?p=59#comments</comments>
		<pubDate>Fri, 11 Jun 2010 06:55:55 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[multimedia]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://blog.toms-projekte.de/?p=59</guid>
		<description><![CDATA[<p>I was tired of reading and answering all the p4a related questions on the Plone user mailing list and wrote a book about it  .</p>
<p>The book is now available:</p>
<p><p class="wp-caption-text">Plone 3 Multimedia Cover</p></p>
<p>In the book you will find help on how to set up a customized multimedia CMS by collaborating with external resources such as <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=59">New Book: &#8220;Plone 3 Multimedia&#8221;</a></span>]]></description>
			<content:encoded><![CDATA[<p>I was tired of reading and answering all the p4a related questions on the Plone user mailing list and wrote a book about it <img src='http://blog.toms-projekte.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>The <a href="https://www.packtpub.com/plone-3-3-multimedia-website/book?utm_source=toms-projekte.de&#038;utm_medium=link&#038;utm_content=authorsite&#038;utm_campaign=mdb_003596">book</a> is now available:</p>
<p><a href="https://www.packtpub.com/plone-3-3-multimedia-website/book?utm_source=toms-projekte.de&#038;utm_medium=link&#038;utm_content=authorsite&#038;utm_campaign=mdb_003596"><div id="attachment_60" class="wp-caption alignnone" style="width: 253px"><img src="http://blog.toms-projekte.de/wp-content/uploads/2010/06/7665_MockupCover-243x300.jpg" alt="Plone 3 Multimedia Cover" title="7665_MockupCover" width="243" height="300" class="size-medium wp-image-60" /><p class="wp-caption-text">Plone 3 Multimedia Cover</p></div></a></p>
<p>In the book you will find help on how to set up a customized multimedia CMS by collaborating with external resources such as YouTube, Google videos as well as to use and extend specialized multimedia content-types for images, audio, video, and Flash.</p>
<p>Plone 3 Multimedia provides a rich repository of tools and techniques to add full multimedia power to Plone along with collaboration with many external web resources in order to build an interactive Plone site. The readers will learn to structure their content by tagging, rating, and geolocating through this practical guide. Furthermore, it also gives readers an insight into how to upload, store, and serve their multimedia content in an effective way.</p>
<p>Using this book, developers will be able to include photos, movies, audio, and Flash-applications into their Plone site to make it more user-friendly. In addition to learning about the various video and audio formats best suited for web publishing, developers will also be able to get to grips with categorization, syndication, upload, storage, and serving of multimedia content. This book will also enable developers to create an engaging user experience by including powerful Silverlight web and mobile applications into Plone. </p>
<p>A step-by-step tutorial packed with hands-on-examples, this book is ideal for Plone integrators who want to extend the core of Plone with multimedia features and want to learn to use multimedia effectively. The book is out now and available from Packt. To read more about it, please visit: <a href="http://www.packtpub.com/plone-3-3-multimedia-website/book">http://www.packtpub.com/plone-3-3-multimedia-website/book</a></p>
<p>There is a full example including a buildout on how to set up a secure video on demand solution using Plone and the <a href="http://osflash.org/red5">Red5 Flash Server</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using five.grok views as default views</title>
		<link>http://blog.toms-projekte.de/?p=54</link>
		<comments>http://blog.toms-projekte.de/?p=54#comments</comments>
		<pubDate>Tue, 08 Jun 2010 13:07:35 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[grok]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://blog.toms-projekte.de/?p=54</guid>
		<description><![CDATA[<p>Once you get used to the power of grok in Plone via five.grok you never want to miss it and use it for all and everything. Unfortunately it is currently not possible to use grok views as default views via CMFDynamicViewFTI.</p>
<p>To nevertheless use them you have to do a little trick and fool CMFDynamicViewFTI. We do <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=54">Using five.grok views as default views</a></span>]]></description>
			<content:encoded><![CDATA[<p>Once you get used to the power of grok in Plone via <a href="http://pypi.python.org/pypi/five.grok/">five.grok</a> you never want to miss it and use it for all and everything. Unfortunately it is currently not possible to use grok views as default views via CMFDynamicViewFTI.</p>
<p>To nevertheless use them you have to do a little trick and fool CMFDynamicViewFTI. We do so  by manually adding two dummy functions to your grok view:</p>
<p><code>
<pre>
class MyDefaultGrokView(grok.View):
    """ A grok view used as a default view in Plone
    """

    grok.context(MyGrokContext)

    # fix to be used with CMFDynamicViewFTI
    def __of__(self, context):
        return self

    # fix to be used with CMFDynamicViewFTI
    def __call__(self, context=None, request=None):
        return super(MyDefaultGrokView, self).__call__()

    def update(self):
        ...
</pre>
<p></code></p>
<p>No more, no less <img src='http://blog.toms-projekte.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>BTW My Plone book <a href="http://amzn.to/dtrp0C">&#8220;Plone 3 Multimedia&#8221;</a> I worked on the last year is published and available!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=54</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Minifying JavaScript and CSS with buildout</title>
		<link>http://blog.toms-projekte.de/?p=33</link>
		<comments>http://blog.toms-projekte.de/?p=33#comments</comments>
		<pubDate>Tue, 09 Feb 2010 13:54:58 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[buildout]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://blog.toms-projekte.de/?p=33</guid>
		<description><![CDATA[<p>An easy way to increase the performance of a web-page is to minify the used CSS and JavaScript resources. There are ready available tools that strip the comments and whitespaces from JavaScript and CSS-files.</p>
<p>Plone itself ships with a big amount of uncompressed JavaScript and CSS which are compiled in the resource registry. The usual minifying recipes <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=33">Minifying JavaScript and CSS with buildout</a></span>]]></description>
			<content:encoded><![CDATA[<p>An easy way to increase the performance of a web-page is to minify the used CSS and JavaScript resources. There are ready <a href="http://developer.yahoo.com/yui/compressor/">available tools</a> that strip the comments and whitespaces from JavaScript and CSS-files.</p>
<p>Plone itself ships with a big amount of uncompressed JavaScript and CSS which are compiled in the resource registry. The usual minifying recipes don&#8217;t work in this case. To benefit from minifying resources there are some buildout recipes, which eased my life. I recently switched to TinyMCE, because kupu isn&#8217;t compatible with IE8. TinyMCE  comes with really many plain JavaScript-files. I believe this is true for any (multilanguage) WYSIWYG-editor. So before putting it into production, I minified all the resources of TinyMCE, with a striking performance increase. What I did was changing my buildout the following way:</p>
<p>With the <a href="http://pypi.python.org/pypi/hexagonit.recipe.download">hexagonit.recipe.download</a>-recipe I download the Java-sources of the yui-compressor<br />
<code>
<pre>
[yui-compressor]
recipe = hexagonit.recipe.download
url = http://yuilibrary.com/downloads/yuicompressor/yuicompressor-2.4.2.zip
strip-top-level-dir = true</pre>
<p></code></p>
<p>The <a href="http://pypi.python.org/pypi/collective.recipe.ant">collective.recipe.ant</a>-recipe built the yui-compressor from the previously downloaded sources for me. This recipe assumes there Java and ant are installed and working. If ant is not in the PATH-environment, the recipe provides the <em>ant-home</em>-option for specifying the location of ant.<br />
<code>
<pre>[yui-compressor-build]
recipe = collective.recipe.ant
ant-options =
    -buildfile ${yui-compressor:location}/build.xml
</pre>
<p></code></p>
<p>Finally I used the collective.recipe.minify-recipe to add a wrapper for minifying <strong>ALL</strong> resources of TinyMCE. The recipe has a <em>paths</em>-option, where you can specify a list of paths to products, which should be minified. The wrapper will walk these paths recursively, look for *.css and *.js-files and minify them, if needed. The products don&#8217;t necessarily need to be check-outs or development-eggs. Already packaged 3rd party eggs can be walked too.</p>
<p><code>
<pre>
[minify]
recipe = collective.recipe.minify
paths =
    src/Products.TinyMCE
ignore =
verbose = true
include-devel = false
css-command = java -jar ${yui-compressor:location}/build/yuicompressor-2.4.2.jar --type css
js-command = java -jar ${yui-compressor:location}/build/yuicompressor-2.4.2.jar --type js
</code></pre>
<p>The full inclusion of all parts looks like this:</p>
<p><code>
<pre>
[buildout]
parts =
zope2
productdistros
instance
yui-compressor
yui-compressor-build
minify

[yui-compressor]
recipe = hexagonit.recipe.download
url = http://yuilibrary.com/downloads/yuicompressor/yuicompressor-2.4.2.zip
strip-top-level-dir = true

[yui-compressor-build]
recipe = collective.recipe.ant
ant-options =
    -buildfile ${yui-compressor:location}/build.xml

[minify]
recipe = collective.recipe.minify
paths =
    src/Products.TinyMCE
ignore =
verbose = true
include-devel = false
css-command = java -jar ${yui-compressor:location}/build/yuicompressor-2.4.2.jar --type css
js-command = java -jar ${yui-compressor:location}/build/yuicompressor-2.4.2.jar --type js

...
</code></pre>
<p>After running the buildout I had a <em>minify</em>-wrapper script in the bin-directory of my buildout. Executing it took some time (about 20minutes on my machine) and issued a</p>
<p>INFO: Minified 13 CSS and 917 JavaScript-files</p>
<p>And here is the difference:</p>
<p>Loading the default page of Plone in authenticated mode <strong>without</strong> minified TinyMCE:</p>
<p><img class="alignnone size-full wp-image-41" title="Loading times of Plone" src="http://blog.toms-projekte.de/wp-content/uploads/2010/02/tinymce-default-3.png" alt="Loading times of Plone" width="1314" height="241" /></p>
<p>Loading the default page of Plone in authenticated mode <strong>with</strong> minified TinyMCE:</p>
<p><img class="alignnone size-full wp-image-42" title="Plone loading times minified" src="http://blog.toms-projekte.de/wp-content/uploads/2010/02/tinymce-minified-3.png" alt="Plone loading times minified" width="1314" height="241" /></p>
<p>The size of the TinyMCE-JavaScript reduced from 329.2 KB to 181.8 KB and the loading time decreased from 523 ms to 248 ms. This is less than half!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=33</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Migrating to Plone 4. Part 1</title>
		<link>http://blog.toms-projekte.de/?p=28</link>
		<comments>http://blog.toms-projekte.de/?p=28#comments</comments>
		<pubDate>Fri, 04 Dec 2009 10:41:58 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[migration]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://blog.toms-projekte.de/?p=28</guid>
		<description><![CDATA[<p>Recently I tried to migrate the website of the university I work for to Plone 4. The first thing I did was to checkout the development buildout from Plone http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0. The alpha2 release is quite near, but I thought I can watch the changes/bugfixes better, when I use the development buildout.</p>
<p>The next thing I did was <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=28">Migrating to Plone 4. Part 1</a></span>]]></description>
			<content:encoded><![CDATA[<p>Recently I tried to migrate the website of the <a href="http://www.fhnw.ch" target="_blank">university I work for</a> to Plone 4. The first thing I did was to checkout the development buildout from Plone <a href="http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0">http://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/4.0</a>. The alpha2 release is quite near, but I thought I can watch the changes/bugfixes better, when I use the development buildout.</p>
<p>The next thing I did was to include our custom and third-party products the site uses into the buildout configuration. This was the easy part, but running the buildout gave me the first error.  It complained about some custom packages, which were not included as development eggs. We use the <a href="http://pypi.python.org/pypi/haufe.eggserver/">haufe.eggserver</a> for our internal eggs and most of them were compiled in the Python 2.4 version. I took me a while to figure out I had to provide the 2.6 version of the eggs or the source-distributions. <em>(BTW There seems to be a bug in both setuptools and distribute with the upload command in Python 2.6. They do not accept the -r, &#8211;repository flag and always try to upload the egg to pypi)</em> For that reason I chose the source format and the eggs were recognized flawlessly.</p>
<p>Ready for the next step I tried to start the instance in foreground mode. Of course there were some errors. I had to use the Plone 4 branches of  PloneFormGen and CacheFu and the the trunk of the PloneFormGen dependencies TALESField, PythonField and TemplateFields. In my custom products I had two errors occuring quite frequently:</p>
<ol>
<li>I use safeEditProperty quite frequently. The import location changed from <strong>Products.CMFPlone.migrations.migration_util</strong> to <strong>plone.app.upgrade.utils</strong></li>
<li>The registerType-method of Archetypes (1.6) now takes two parameters: <em>klass</em> and <em>package</em>. The klass parameter has been there before. The package parameter is optional in Plone 3. It is the name of the product for packages in the Products namespace and the full name of the package for all others I guess.</li>
</ol>
<p>Well now the instance with all dependencies still does not start because of the p4a.plonecalendar, which still imports the object events from zope.app.event. This is where I stopped today&#8230;. more to come &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Customize Plone translations with iw.recipe.cmd</title>
		<link>http://blog.toms-projekte.de/?p=19</link>
		<comments>http://blog.toms-projekte.de/?p=19#comments</comments>
		<pubDate>Fri, 17 Jul 2009 12:58:38 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[buildout]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[plone]]></category>

		<guid isPermaLink="false">http://itconsense.wordpress.com/?p=19</guid>
		<description><![CDATA[<p>Sometimes the good translations of Plone do not fit your usecase or screen space. Overriding the translations in a pre-buildout area was easy. All you needed to do is to put a directory i18n in your instance home containing a file custom-plone-en.po. The structure of the filename is important: custom-DOMAIN-LANGUAGECODE.po</p>
<p>Nowadays all people use buildouts and adding <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=19">Customize Plone translations with iw.recipe.cmd</a></span>]]></description>
			<content:encoded><![CDATA[<p>Sometimes the good translations of Plone do not fit your usecase or screen space. Overriding the translations in a pre-buildout area was easy. All you needed to do is to put a directory <em>i18n</em> in your instance home containing a file <strong>custom-plone-en.po</strong>. The structure of the filename is important: custom-DOMAIN-LANGUAGECODE.po</p>
<p>Nowadays all people use buildouts and adding something to the instance doesn&#8217;t seem to be a good idea. It lives in the parts directory and gets overridden on every &#8220;install&#8221; run of buildout. A solution I use (on Linux) is to maintain the translations in a directory <em>i18n</em> in the buildout and let a recipe copy it to the instance.</p>
<p>For the recipe I use <a href="http://pypi.python.org/pypi/iw.recipe.cmd/">iw.recipe.cmd</a> and the buildout snippet looks like:<br />
<code><br />
[i18n]<br />
recipe = iw.recipe.cmd<br />
on_install = true<br />
on_update = true<br />
cmds =<br />
test -d ${instance:location}/i18n &amp;&amp; rm -rf ${instance:location}/i18n || true<br />
cp -R ${buildout:directory}/i18n ${instance:location}/<br />
</code></p>
<p><strong>Update! 27.08.2010</strong>This Recipe only works with Plone 3. For Plone 4 and onwards it is not need any longer. The Plone i18n-domain can be <a href="http://article.gmane.org/gmane.comp.web.zope.plone.user/109580">overridden in a customization product</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using archetypes.referencebrowserwidget with Plone 3.3</title>
		<link>http://blog.toms-projekte.de/?p=5</link>
		<comments>http://blog.toms-projekte.de/?p=5#comments</comments>
		<pubDate>Thu, 23 Apr 2009 08:18:31 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[archetypes]]></category>
		<category><![CDATA[referencebrowser]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://itconsense.wordpress.com/2009/04/23/referencewidget-plone/</guid>
		<description><![CDATA[<p>If you need to reference objects from big containers, the current ATReferenceBrowser product, which is bundled with Plone may not be your first choice. It is very slow with many objects and it is not very well tested, if at all. The at.referencebrowserwidget aims to be 100% UI compatible but using modern components in the background <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.toms-projekte.de/?p=5">Using archetypes.referencebrowserwidget with Plone 3.3</a></span>]]></description>
			<content:encoded><![CDATA[<p>If you need to reference objects from big containers, the current ATReferenceBrowser product, which is bundled with Plone may not be your first choice. It is very slow with many objects and it is not very well tested, if at all. The at.referencebrowserwidget aims to be 100% UI compatible but using modern components in the background and there should be tests for all the features it provides. Well, and here it is. It is not finished yet but it works and is used in some productive environments.</p>
<p>You can include it like any other product in your buildout</p>
<p><code>[buildout]<br />
...<br />
eggs =<br />
...<br />
archetypes.referencebrowserwidget<br />
&nbsp;<br />
[instance]<br />
...<br />
zcml =<br />
...<br />
archetypes.referencebrowserwidget<br />
...<br />
</code></p>
<p>This will enable it for being installed via quickinstaller. If you do so the skin of ATReferenceBrowserWidget gets overridden by the one of archetypes.referencebrowserwidget. This means the widget code is still ATRefernceBrowserWidget, but the popup and everything behind it is archetypes.referencebrowserwidget.</p>
<p>But you can have more, if you want (and using Plone &gt;= 3.2).</p>
<p>There is a replacement of ATReferenceBrowserWidget, which can be used as stub to satisfy current dependencies on import location and names.<br />
You&#8217;ll have to checkout </p>
<p><a href="http://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/ATReferenceBrowserWidget/branches/tom_gross_skeletononly/">http://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/ATReferenceBrowserWidget/branches/tom_gross_skeletononly/</a></p>
<p>named &#8220;<em>Products.ATReferenceBrowserWidget&#8221; </em>in the &#8220;<em>src</em>&#8220;-directory of your buildout. And change the <em>buildout.cfg </em>to the following:<br />
<code>[buildout]<br />
...<br />
develop = src/Products.ATReferenceBrowserWidget<br />
&nbsp;<br />
[versions]<br />
Products.ATReferenceBrowserWidget = 3.0-withatref<br />
...<br />
&nbsp;<br />
[instance]<br />
...<br />
eggs =<br />
&nbsp;${buildout:eggs}<br />
&nbsp;Plone<br />
&nbsp;archetypes.referencebrowserwidget<br />
...<br />
</code></p>
<p>That&#8217;s it. This will enable you the full power of the new widget. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.toms-projekte.de/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
