<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="atom.css" type="text/css"?><feed xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <link href="http://localhost:8080/shuttlethread/blog/aggregator/atom.xml" rel="self"/>
  <title type="html">Shuttle Thread Blog</title>
  <subtitle></subtitle>
  <updated>2011-06-08T17:19:11+00:00</updated>
  <link href="http://localhost:8080/shuttlethread/blog/aggregator" rel="alternate" type="text/html"/>
  <id>urn:syndication:329e9264818f55edca5dabc1480dc99d</id>
  <logo>http://localhost:8080/shuttlethread/logo.png</logo>
  <icon>http://localhost:8080/shuttlethread/favicon.ico</icon>
  <generator uri="http://www.plone.org" version="1.0">plone</generator>
  <author>
    <name></name>
  </author>
  <entry>
    <title>Python 2.4 on Debian multiarch</title>
    <link href="http://localhost:8080/shuttlethread/blog/python-2-4-on-debian-multiarch" rel="alternate" type="text/html"/>
    <id>urn:syndication:0d69604e790945c5bbc99760ea23caa6</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>I recently had to work on a project that needed Python 2.4. "Not a problem", I thought, "I'll just compile a Python and be on my way". However the bz2 module wasn't available. Strange, since the libbz2-dev package was definitely installed. Eventually 2 things dawned on me:</p>
<ul>
<li>The hazy memory of me sitting, beer in hand, deciding "Yeah, I'll go multiarch, it'll all work fine I'm sure"</li>
<li>That modifying LDFLAGS isn't enough, there's all sorts of magic going on in setup.py.</li>
</ul>
<p>setup.py basically looks in hardcoded paths for libraries, and because I'd gone multiarch the library was now in <code>/lib/x86_64-linux-gnu/libbz2.so.1</code>. By the time mutiarch came about, <a class="external-link" href="http://bugs.python.org/issue11715" target="_self" title="">python 2.4 was too old for people to want to patch it</a>.</p>
<p>However, given cmmi lets you patch files before you build, I took <a class="external-link" href="http://stackoverflow.com/questions/5726289/buildout-using-different-python-version" target="_self" title="">Martijn Pieters' example off stackoverflow</a> and came up with:</p>
<pre>[buildout]<br />python = python<br />parts +=<br />    python<br />    pythonbin<br /><br />[python]<br />recipe = zc.recipe.cmmi<br />url = http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz<br />executable = ${buildout:directory}/parts/python/bin/python2.4<br />patch = http://files.shuttlethread.com/patches/python2.4-addmultiarch.patch<br />patch_options = -p1<br />extra_options=<br />    --enable-unicode<br />    --with-threads<br />    --with-readline<br /><br />[pythonbin]<br />recipe = plone.recipe.command<br />command = ln -s ${python:executable} ${buildout:bin-directory}/python</pre>
<p>Don't look too closely at the patch in question though. It's a bit ugly, and I couldn't be bothered to tidy it. You get a working Python though, which is the main thing.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2012-11-29T19:54:49+00:00</published>
    <updated>2012-11-29T19:54:49+00:00</updated>
  </entry>
  <entry>
    <title>cow-tents: A debugger for Diazo</title>
    <link href="http://localhost:8080/shuttlethread/blog/cow-tents-a-debugger-for-diazo" rel="alternate" type="text/html"/>
    <id>urn:syndication:13bed39986f9a98d90e54b2d09bd2935</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>This is something I've been sporadically working on for quite some time now, and it's starting to take shape. When writing themes, I've found the main headache is working out which expression isn't matching. Is it the css:content, or the css:theme? This should make it much easier.</p>
<h2>Caveats</h2>
<p>This is all a bit rough-and-ready, but I think it's got to the point that other people could try it out with their themes and see if they find it useful.</p>
<h2>Installation</h2>
<p>To use it, you'll need the freshly-released 1.0.3 version of Diazo, and my branch of plone.app.theming. Add the following to your buildout config:</p>
<pre> [sources]<br /> plone.app.theming = git https://github.com/lentinj/plone.app.theming.git branch=diazo-debugger<br /></pre>
<p>And check it out:</p>
<pre>./bin/develop co plone.app.theming<br />./bin/buildout<br /></pre>
<p>Now, go to a themed page and add <strong>?diazo.debug=1</strong> to the URL. You should see an overlay containing debugging output.</p>
<p><img src="http://localhost:8080/shuttlethread/blog/moo.png/image_banner" alt="Debugger screenshot" class="image-inline" title="Debugger screenshot" /></p>
<h2>What am I looking at?</h2>
<p>The output should be your theme file, after all includes have been included.<br />All diazo attributes and rule tags have been coloured red and green. A green attribute means that it matched the theme/content XML, a green node means all the attributes within match. For example:</p>
<p><img src="http://localhost:8080/shuttlethread/blog/copy_of_moo.png" alt="Debugger line 1" class="image-inline" title="Debugger line 1" /></p>
<p>The content has a base node, but the theme doesn't have one, so this rule won't do<br />anything.</p>
<p><img src="http://localhost:8080/shuttlethread/blog/moo1.png" alt="Debugger line 2" class="image-inline" title="Debugger line 2" /></p>
<p>The content is missing the edit bar, so the rule doesn't do anything either.</p>
<p><img src="http://localhost:8080/shuttlethread/blog/copy_of_moo1.png" alt="Debugger line 3" class="image-inline" title="Debugger line 3" /></p>
<p>Both sides do something, so this rule is green and the title should have been copied.</p>
<p><img src="http://localhost:8080/shuttlethread/blog/copy2_of_moo1.png/image_banner" alt="Debugger line 4" class="image-inline" title="Debugger line 4" /></p>
<p>Here everything within the append rules match, but the rules block they are within doesn't, so they are still red.</p>
<h2>Errors</h2>
<p>If your theme doesn't compile at all, you have probably noticed that you get an unthemed page without any hint of what went on. Now the XML / XSLT errors that you'd otherwise have to dig out of Plone's error log are in the overlay.</p>
<h2>xsl:message tricks</h2>
<p>The debugger considers each rule and condition in isolation. It will tell you when a CSS condition isn't matching. However it won't tell you when the rule isn't doing anything due to other rules, for example a drop rule could remove what an append rule appends to. xsl:message and the error log helps us here though. Compare the two examples, with the drop rule working:</p>
<p><img src="http://localhost:8080/shuttlethread/blog/copy4_of_moo1.png" alt="Debugger xsl:message 2" class="image-inline" title="Debugger xsl:message 2" /></p>
<p>...and the drop rule broken:</p>
<p><img src="http://localhost:8080/shuttlethread/blog/copy3_of_moo1.png" alt="Debugger xsl:message 1" class="image-inline" title="Debugger xsl:message 1" /></p>
<p>The &lt;xsl:message&gt; doesn't add anything to the document, however it will add messages to the error_log, which we can now see in the debug window. Ideally we would inject similar messages for the debugger to pick up. This is how it currently works after all---special messages saying what conditions matched are put out on the error_log and then combined with the rules XML. However, this is a lot more invasive change than what has been done so far, and some rules will be trickier than others.</p>
<h2>What else needs to be done</h2>
<p>You probably noticed it needs more styling. But everything has a lot of classes, so hopefully this will just be CSS work.</p>
<p>Outputting the compiled XSLT would also be very useful for debugging. The back-end side of things is fairly easy, however the overlay needs tabs so this could be displayed on the page in a manageable fashion. With the XSLT appended to the end, the scrollbar would be very long.</p>
<p>Please give it a go and tell me what you think! Is there bugs with some themes? Does it make your life easier, or at least more colourful?</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2012-11-11T18:15:00+00:00</published>
    <updated>2012-11-11T18:13:41+00:00</updated>
  </entry>
  <entry>
    <title>Technologies for a new Plone Controller</title>
    <link href="http://localhost:8080/shuttlethread/blog/technologies-for-a-new-plone-controller" rel="alternate" type="text/html"/>
    <id>urn:syndication:d7c00c6f24966a79d0998f4ccb1c32ab</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>With the release of Plone 4.1 we have a completely new Windows installer with a much more simple build process which will hopefully lead to more timely releases for Windows installer users. Unfortunately along the way we lost the Plone Controller GUI for starting/stopping instances. Quite independently, Apple's dropping of support for wxPython with the release of Mac OS X Lion means that we're also losing the GUI controller for that platform.</p>
<p>During the 'hallway track' of the Plone Conference I spent a little time discussing this with Alex Limi and Steve McMahon. We all thought the GUI controllers could be really helpful for those downloading and evaluating Plone, but we obviously needed a more sustainable base on which to build a controller. Given we're all web developers, HTML/CSS/Javascript seems the obvious GUI framework. But the prospect of running a special web server to run this makes me uncomfortable, especially considering some people are likely to use the official installer as the basis for production deployments.</p>
<p>Surely then it must be possible to deploy a web application in a dedicated browser window without running a separate web server? Over the past few days I've been investigating the possibilities. Ideally we want a cross platform solution (especially important given the few core developers running Windows.) And a development model that makes both writing the controller and GUI familiar to Python web developers and makes building the Controller application as simple as possible.</p>
<h3>Appcelerator Titanium Desktop</h3>
<p><a class="external-link" href="http://www.appcelerator.com/products/titanium-desktop-application-development/">Titanium Desktop</a> is a free and Open Source framework for building applications that run in a dedicated WebKit window using HTML/CSS/Javascript with support code running behind it in Python/PHP/Ruby. Appcelerator will build packages of your application for multiple platforms (Mac/Windows/Linux) on their servers. Their model is based on building an AJAX type application with all updates happening over Javascript (or indeed Python) calls that bridge over to the backend code. This makes it difficult to reuse the Request/Response model most web application developers are used to.</p>
<p>Basic app bundle size: 52MB (includes WebKit, but not Python framework)</p>
<h3>PyObjC</h3>
<p>On the Mac, PyObjC allows Python users to build applications using a variety of APIs exposed by the operating system, including the WebKit framework. One can simply create a window containing a browser control and plug in a custom NSURLProtocol handler to handle requests. There's some <a class="external-link" href="http://pyobjc.sourceforge.net/examples/pyobjc-framework-WebKit/PyDocURLProtocol/index.html">simple example code</a> that renders pydocs.</p>
<p>It's easy to see how this model can be extended to run requests through an embedded WSGI app, giving us a familiar development model. Creating a binary with py2app was easy, but clearly small browser part would be Mac only.</p>
<p>Basic app bundle size: 17MB (includes Python, but not WebKit framework)</p>
<h3>Qt and PySide</h3>
<p>Qt also wraps WebKit and PySide offers an equivalent wrapping to PyObjC. Looking at a couple of examples (<a class="external-link" href="http://diotavelli.net/PyQtWiki/Using%20a%20Custom%20Protocol%20with%20QtWebKit">one</a>, <a class="external-link" href="http://gitorious.org/pyside-qml-examples">two</a>) I could quickly see how a very similar application could be built. Qt is cross platform so the same code would run on both Windows and Mac (and Linux as well if required.) Building a working .app bundle is definitely rather tricky. I had some problems running py2app, needing the dev version of it and all its dependencies. Even then it crashed on exit. The alternatives of cx_Freeze, bbfreeze and bundlebuilder also failed in one way or other for me.</p>
<p>Basic app bundle size: 123MB (includes Python, Qt and QtWebKit frameworks)</p>
<p>A tool named <a class="external-link" href="http://www.rfk.id.au/blog/entry/hatchet-hack-frozen-pyside-apps/">Hatchet</a> may be able to help cut this down.</p>
<h3>Various other alternatives</h3>
<p>From the <a class="external-link" href="http://wiki.python.org/moin/WebBrowserProgramming">Python Wiki</a>:</p>
<ul>
<li>XULRunner + PyXPCOM. As Python is subordinate in this configuration it would require learning a lot of XUL and XPCOM to get a working application.</li>
<li>PyWebKitGTK. Not a good solution for the Mac as GTK runs under X11.</li>
<li>PyWin32 and MSHTML. Would result in a nice small executable for windows users, though on the downside it would involve Win32 programming and using the IE layout engine. I was unable to find much documentation on writing IInternetProtocol handlers with PyWin32.</li>
</ul>
<h3>Conclusion</h3>
<p>I think building something with PySide and Qt will be a good first step. It should be simple enough to provide alternative frontends should that be required. Maybe we even want to separate the backend application from the frontend to avoid requiring developers to rebuild the frontend while changing the controller.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-11-14T23:05:00+00:00</published>
    <updated>2011-11-14T23:05:54+00:00</updated>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Diazo theming tutorial</title>
    <link href="http://localhost:8080/shuttlethread/blog/diazo-theming-tutorial" rel="alternate" type="text/html"/>
    <id>urn:syndication:258b99ec2b8a3a04a687b848e9a21683</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>Download the <a href="http://localhost:8080/shuttlethread/blog/tutorial.zip" class="internal-link">example theme</a> from the Diazo theming tutorial I presented at Plone Conference 2011, San Francisco. I'll post a link to the video once it's up.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-11-07T23:40:00+00:00</published>
    <updated>2011-11-07T23:39:52+00:00</updated>
    <category term="Diazo"/>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Enterprise social software with Plone and XMPP</title>
    <link href="http://localhost:8080/shuttlethread/blog/enterprise-social-software-with-plone-and-xmpp" rel="alternate" type="text/html"/>
    <id>urn:syndication:09a298b4abdcddeb7a74223adf2c8652</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>Now that everyone and their granny is on Facebook, it's no surprise to see the emergence of enterprise social software, with Yammer the most well known example. Starting out as "an enterprise version of Twitter," Yammer is rapidly growing into a fully fledged enterprise social network in the mode of Facebook. Enterprise social software is clearly no fad, we're now seeing this  sort of functionality as requirements in RFPs.</p>
<p>Current enterprise social media tools have a major drawback: they are separate from and barely integrated with the main online tool for collaboration and information dissemination within an organisation, the corporate intranet/extranet. That's why I was so excited by the opportunity to talk with Yiorgis Gozadinos of Jarn at the recent Living Statues Sprint about the collaboration tools for Plone he's been building on top of XMPP.</p>
<p>The XMPP standard grew out of Jabber instant messaging project. As such it encompasses messaging, presence information and roster management. It powers Google Talk and Facebook Chat. And crucially it is able to function across HTTP, so browser based clients are available. This makes it an excellent abstraction for building real-time web applications.</p>
<p>At this point I expect those with long experience of Zope may have some concerns... As a threaded application server Zope is usually configured with a small number of fat threads, an architecture completely unsuitable or asynchronous, long-polling applications. Fortunately Yiorgis has an elegant solution: make the Zope server itself an XMPP client and simply offload the asynchronous long-polling requests to ejabberd.</p>
<p>XMPP is not just for chat. The Publish-Subscribe protocol extension (PubSub) enables a broad range of applications to be built on top of XMPP. We believe that the most compelling of these for Plone will be activity streams that could combine user status updates with notifications of activity on the content that concerns you.</p>
<p>Yiorgis' software currently supports microblogging, messaging, and collaborative editing (just like Google Docs!) Check out this screen cast recorded a few days ago:</p>
<p><iframe frameborder="0" height="225" src="http://player.vimeo.com/video/22507185?title=0&amp;byline=0&amp;portrait=0" width="400"></iframe></p>
<p><a href="http://vimeo.com/22507185">Collaborative editing with Plone</a> from <a href="http://vimeo.com/user6776116">Yiorgis Gozadinos</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Though it has a different focus, with PubSub XMPP has a lot of overlap with AMQP (RabbitMQ/ActiveMQ). It would certainly be possible to use XMPP for asynchronously executing expensive tasks such as text indexing, content conversion or multi-publishing. And as it spans all the way to the browser, users can be notified when tasks are complete.</p>
<p>I'm really excited about the possibilities that are opening up here. The software's available from github: <a class="external-link" href="https://github.com/ggozad/jarn.xmpp.core">jarn.xmpp.core</a>. Please do take a look, I know Yiorgis is keen for more people to get involved.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-10-03T17:14:12+00:00</published>
    <updated>2011-10-03T17:14:12+00:00</updated>
    <category term="XMPP"/>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Giving ack a bit extra do-what-I-mean</title>
    <link href="http://localhost:8080/shuttlethread/blog/useful-ack-defaults" rel="alternate" type="text/html"/>
    <id>urn:syndication:b572b78db3461042fdcacf6b2602a1ae</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>This is just a wee tip, but several people have asked for it so a page would be useful.</p>
<p><a class="external-link" href="http://betterthangrep.com/">Ack</a> is already been discovered by quite a few people, as the URL says it's better than grep. Mostly because it does the right thing in terms of searching directories (the default is to search recursively from the current directory), and the listing formats are much clearer. If you haven't already, get it via. "aptitude install ack-grep".</p>
<h2>Configuring to page usefully by default</h2>
<p>If you've used ack even once or twice, you'd have noticed that doing "ack | less" is somewhat disappointing. The colour goes away and you're faced with grep style formatting, rather than the colourful ack output you were hoping for. This can be fixed by this one liner alias, which could be placed in your .bashrc.</p>
<pre>Â alias ack='ACK_PAGER_COLOR="less -x4SRFX" /usr/bin/ack-grep -a'</pre>
<p>This does several things to make using ack more pleasant.</p>
<ul>
<li>Debian/Ubuntu can't call the executable ack, since <a class="external-link" href="http://packages.debian.org/squeeze/ack">something else</a> beat it to it.</li>
<li>If using ack seriously, at some point you will find out it only searches file extensions it knows about (i.e. not .zcml), and loose several clumps of hairs. <strong>-a</strong> slows ack down slightly, but lets you keep those hairs.</li>
<li>The <strong>ACK_PAGER_COLOR</strong> environment variable means ack output gets paged, but is still colourful. The result of the less options means you get paged results automatically when results fill your screen, without you having to Ctrl-C and re-run through less or something.</li>
</ul>
<p>Breaking down the options on less:-</p>
<ul>
<li><strong>-x4 </strong>tells less to use 4 character tabs</li>
<li><strong>-S</strong> tells less to not fold long lines, but let them scroll off to the right.</li>
<li><strong>-R </strong>tells less to use control characters that will colour terminal output, rather than escaping them (used to be -r, thanks Dan Thomas).</li>
<li><strong>-F</strong> tells less to quit if there is less than one screen, so you don't have to decide whether to page or not beforehand.</li>
<li><strong>-X</strong> tells less to ignore an initialization termcap might tell it to do. This is useful for xterms, as they are often set up to send applications like less to <a class="external-link" href="http://www.shallowsky.com/linux/noaltscreen.html">a secondary screen, and then switch back afterwards</a>. Without it, -F will cause results to appear on the screen and immediately disappear as less quits.</li>
</ul>
<p>That's about it. Hope it's useful.</p>
<p>Â </p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-07-15T15:05:00+00:00</published>
    <updated>2011-07-26T15:48:39+00:00</updated>
  </entry>
  <entry>
    <title>Custom navigation in a Dexterity/Diazo project</title>
    <link href="http://localhost:8080/shuttlethread/blog/custom-navigation-in-a-dexterity-diazo-project" rel="alternate" type="text/html"/>
    <id>urn:syndication:7a981507520aef59d02ed0e1939bfb2e</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <h2 style="text-align: left; ">Background</h2>
<p style="text-align: left; ">We were tasked with creating a corporate site for <a class="external-link" href="http://limepictures.com">Lime Pictures</a>, a media company based in Liverpool. They had already worked on their design internally, and come up with something very stylized, and quite unlike Plone out of the box.</p>
<p style="text-align: left; "><img src="http://localhost:8080/shuttlethread/blog/copy_of_screenshot.png" alt="Lime vs. Plone" class="image-inline" title="Lime vs. Plone" /></p>
<p style="text-align: left; ">As several other blog posts have <a class="external-link" href="http://www.treebrolly.com/blog/turbo-plone-theming-with-xdv-diazo">already shown</a>, transforming Plone page into something that looks entirely different is quite easy. With this site though, it behaves quite differently too. The navigation is based around a grid, each row being a different section of the site. The first row is special, and shows pages that aren't part of any particular section. This table gives an idea of where each cell in the grid goes.</p>
<table class="plain" style="text-align: left; " summary="Lime navigation overview">
<caption></caption> 
<tbody>
<tr>
<td>
<pre style="text-align: left; ">/</pre>
</td>
<td>
<pre>/about-us</pre>
</td>
<td>
<pre>/contact</pre>
</td>
</tr>
<tr>
<td>
<pre>/hollyoaks</pre>
</td>
<td>
<pre>/hollyoaks/hollyoaks-later</pre>
</td>
<td>
<pre>/hollyoaks/hollyoaks-music-show</pre>
</td>
</tr>
<tr>
<td>
<pre>/conker-media</pre>
</td>
<td>
<pre>/conker-media/the-well</pre>
</td>
<td>
<pre>/conker-media/shelfstackers</pre>
</td>
</tr>
</tbody>
</table>
<p style="text-align: left; ">As most websites start, HTML mockups were created of the various page types. We then defined some Dexterity types that had all the fields required to populate the pages, and Diazo rules to turn these into CMS powered pages. Whilst we can theme the Plone navigation to look different, there's no navigation that behaves like the above.</p>
<h2 style="text-align: left; ">Weaving in custom navigation with Diazo</h2>
<p style="text-align: left; ">Whilst custom navigation can be included using portlets, registering a portlet for each page to get our navigation isn't necessary with Diazo. Normally when you theme with Diazo, you work against the HTML from Plone. However, the "href" attribute available on most directives allows us to reference any URL and include segments from that as well. For example:-</p>
<pre style="text-align: left; ">Â &lt;append css:theme="div.grid-background"<br />         css:content="div.grid-background div.footer"<br />         href="@@menu_view" /&gt;</pre>
<p style="text-align: left; ">This calls @@menu_view for the current page, and gets the contents of the footer from that. We just need to register menu_view in our product's configure.zcml and we're away.Â You will notice that Diazo is just selecting div.footer from @@menu_view, this is particularly handy as:-</p>
<ol style="text-align: left; ">
<li>We can make this view generate several bits of useful information for us, not just the footer. plone.app.theming will only fetch @@menu_view once so combining our custom logic into one view makes good sense.</li>
<li>Content not selected by the theme is never visible, so is ripe for stuffing with debug when you visit the view directly. For example, CSS classes can be pulled out with javascript and displayed below the elements.</li>
</ol>
<h2 style="text-align: left; ">plone.app.contentlisting</h2>
<p style="text-align: left; ">However, in throwing away existing navigation portlets we've exposed us to a lot of Python/ZPT to potentially write. There's lots of easy mistakes to make like making private content still visible by using contentValues() too.Â Fortunately plone.app.contentlisting takes a lot of sting out of this. This is a set of helpers to deal with the lists of objects in templates, and gives a common interface to objects regardless of if they are catalog brains or real objects.</p>
<p style="text-align: left; ">Back to our site. @@menu_view has functions in Python to get lists of notes which the template will simply iterate through and format HTML for each. For example, the function to generate the left hand column is:-</p>
<pre style="text-align: left; ">Â     def getSections(self):<br />        """Return all sections (top level objects that go in the left-hand column)"""<br />        sections = [n.getObject() for n<br />                                   in self.navRoot.restrictedTraverse('@@folderListing')()<br />                                   if getattr(n,'is_special','')=='menu' and n.isVisibleInNav()]<br />        sections.insert(0,self.navRoot) # Navigation root is the first item<br />        return sections</pre>
<p style="text-align: left; ">Security is dealt with for me by plone.app.contentlisting, and isVisibleInNav() ensures that the view honours common Plone options from hiding from navigation.</p>
<p style="text-align: left; ">Separating the logic of what is shown where to how it is shown makes for robust automated tests, which if you have <a href="http://localhost:8080/shuttlethread/blog/development-with-transmogrify.dexterity" class="internal-link">a content profile to import as discussed earlier</a>, is really easy.</p>
<h2 style="text-align: left; "></h2>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-07-05T13:37:48+00:00</published>
    <updated>2011-07-05T13:37:48+00:00</updated>
  </entry>
  <entry>
    <title>Beyond through-the-web dexterity types</title>
    <link href="http://localhost:8080/shuttlethread/blog/beyond-through-the-web-dexterity-types" rel="alternate" type="text/html"/>
    <id>urn:syndication:63faf74dee5664f3364fe1a66f6d7903</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>One of the impressive features of Dexterity is the ability to define content types through the web. However, the editor can only configure so much. We can do a lot more if we don't mind editing the configuration directly.</p>
<p>In a Dexterity FTI, you can specify the schema one of three ways:-</p>
<ul>
<li><strong>schema</strong>: A dotted name to an interface describing the type written in Python, <a class="external-link" href="http://plone.org/products/dexterity/documentation/manual/developer-manual/schema-driven-types/the-fti">as described in the developer manual</a>.</li>
<li><strong>model_source</strong>: An XML string representing the type. This string is generated and updated by the TTW editor. When exporting the FTI, this string will be escaped XML.</li>
<li><strong>model_file</strong>: A path to an XML file representing the type.</li>
</ul>
<p>Whilst developing sites we have found it useful to start off with TTW editing of types whilst prototyping what we want, then export the XML ("Export Schema Profiles" in the dexterity control panel) and add it to our sites' product. We can then empty the model_source property in the FTI and add a model_file property:-</p>
<pre>&lt;property name="model_file"&gt;shuttlethread.farmyard.models:animal.xml&lt;/property&gt;<br /></pre>
<h2>Plone.supermodel XML files</h2>
<p>So what can you add into this XML document? In short, the plone.supermodel XML schema allows you to define a set of schemas, which approximate what you would be doing within a <a class="external-link" href="http://plone.org/products/dexterity/documentation/manual/developer-manual/schema-driven-types/the-schema">Python interface definition</a>. Schemas can be named or anonymous, most of the time we will have a single anonymous schema in a file. Here is a simple example that defines three fields.</p>
<pre>&lt;?xml version="1.0"?&gt;<br />&lt;model xmlns="http://namespaces.plone.org/supermodel/schema"&gt;<br />  &lt;!-- Schema for the animal type --&gt;<br />  &lt;schema&gt;<br />    &lt;field name="species" type="zope.schema.TextLine"&gt;<br />      &lt;description /&gt;<br />      &lt;title&gt;Species&lt;/title&gt;<br />    &lt;/field&gt;<br />    &lt;field name="feeding_notes" type="plone.app.textfield.RichText"&gt;<br />      &lt;description /&gt;<br />      &lt;title&gt;Feeding Notes&lt;/title&gt;<br />    &lt;/field&gt;<br />    &lt;field name="passport_photo" type="plone.namedfile.field.NamedBlobImage"&gt;<br />      &lt;description /&gt;<br />      &lt;title&gt;Passport Photo&lt;/title&gt;<br />    &lt;/field&gt;<br />  &lt;/schema&gt;<br />&lt;/model&gt;</pre>
<p>The <a class="external-link" href="http://dev.plone.org/plone/browser/plone.supermodel/tags/1.0b8/plone/supermodel/schema.txt">doctest for plone.supermodel</a> goes into more detail about what's possible, and is a useful read.</p>
<h2>Customisation cookbook</h2>
<p>The following is a collection of useful snippets that can be plonked into your model files.</p>
<h3>Choosing different widgets</h3>
<p>Generally the default widget for a field is enough, however in some cases there is a selection. One example is a Choice field. Normally rendered with a drop-down select box, if there are only a few options then radio buttons might be more appropriate.</p>
<pre>&lt;model<br />  xmlns="http://namespaces.plone.org/supermodel/schema"<br />  xmlns:form="http://namespaces.plone.org/supermodel/form"<br />  &gt;<br />  . . . .<br />    &lt;field name="work_permit" type="zope.schema.Choice"<br />           form:widget="z3c.form.browser.radio.RadioFieldWidget"&gt;<br />        &lt;description&gt;&lt;/description&gt;<br />        &lt;title&gt;Do you require a work permit to work in the United Kingdom?&lt;/title&gt;<br />        &lt;required&gt;True&lt;/required&gt;<br />        &lt;values&gt;&lt;element&gt;Yes&lt;/element&gt;&lt;element&gt;No&lt;/element&gt;&lt;/values&gt;<br />    &lt;/field&gt;<br /><br /></pre>
<h3>Specifying a list of a field type</h3>
<p>You may want to have a list of items, which can be created by using a zope.schema.List field like this:-</p>
<pre>    &lt;field name="things" type="zope.schema.List"&gt;<br />    Â    &lt;min_length&gt;1&lt;/min_length&gt;<br />        &lt;title&gt;Things in the field&lt;/title&gt;<br />        &lt;value_type type="zope.schema.Text"&gt;<br />            &lt;title&gt;Thing&lt;/title&gt;<br />        &lt;/value_type&gt;<br />    &lt;/field&gt;</pre>
<p>The value_type can also be a zope.schema.Object, in which case the list can group multiple fields.</p>
<pre>&lt;field name="employment" type="zope.schema.List"&gt;<br />  &lt;required&gt;False&lt;/required&gt;<br />  &lt;min_length&gt;1&lt;/min_length&gt;<br />  &lt;value_type type="zope.schema.Object"&gt;<br />    &lt;required&gt;False&lt;/required&gt;<br />    &lt;title&gt;Employment Detail&lt;/title&gt;<br />    &lt;schema&gt;shuttlethread.farmyard.models.IApplicationEmployment&lt;/schema&gt;<br />  &lt;/value_type&gt;<br />&lt;/field&gt;</pre>
<p>Unfortunately the schema has to be a reference to a python interface, for now at least.</p>
<h3>Using an uploaded file to name the item</h3>
<p>If you are creating a type that is mostly a container for a file, then it may be more sensible to get the name from the file, rather than enforce users to type in a title also. Firstly you need to add the INameFromFileName behaviour within your types FTI:-</p>
<pre>&lt;property name="behaviors"&gt;<br />   . . .<br />  &lt;element value="plone.app.dexterity.behaviors.filename.INameFromFileName"/&gt;<br />&lt;/property&gt;<br /></pre>
<p>Then you need to set one of your fields to be primary, which will be where the title is derived from. In your schema:-</p>
<pre>&lt;model xmlns="http://namespaces.plone.org/supermodel/schema"<br />       xmlns:marshal="http://namespaces.plone.org/supermodel/marshal"&gt;<br />  &lt;schema&gt;<br />   . . .<br />    &lt;field name="image" type="plone.namedfile.field.NamedBlobImage"<br />           marshal:primary="true"&gt;<br />      &lt;title&gt;Background image&lt;/title&gt;<br />    &lt;/field&gt;<br />&lt;/model&gt;<br /></pre>
<h3>Arranging fields into fieldsets or tabs</h3>
<p>When editing content, available fields are arranged into tabs (or a dropdown, if there's over a certain threshold). You can use tabs to arrange your own fields by grouping them in fieldset nodes. Either use an existing name to add them to a tab, or use a new name to create a new tab.</p>
<pre>&lt;model xmlns="http://namespaces.plone.org/supermodel/schema"<br />  &lt;fieldset name="settings" label="Settings"&gt;<br />    &lt;field&gt; ... &lt;/field&gt;<br />  &lt;/fieldset&gt;<br />&lt;/model&gt;<br />

</pre>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-07-05T12:55:32+00:00</published>
    <updated>2011-07-05T12:55:32+00:00</updated>
  </entry>
  <entry>
    <title>Development with transmogrify.dexterity</title>
    <link href="http://localhost:8080/shuttlethread/blog/development-with-transmogrify.dexterity" rel="alternate" type="text/html"/>
    <id>urn:syndication:29c78d29c59c5da9ca7955a24fbde7c0</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>Transmogrifier is generally used for migrating content between Plone versions. However, we've found that export / import ability for Dexterity content really helps development too. We can:-</p>
<ul>
<li>Store some baseline content along with the sites custom product, which means you always have a representative set of content to develop and run integration tests against.</li>
<li>Transfer content from different instances, e.g. pulling content from a shared development instance to your local instance for further investigation.</li>
<li>Modify content with UNIX tools, when site structures change for example.</li>
</ul>
<p>Using transmogrify.dexterity, we can ilmport any content from dexterity to &amp; from a directory tree of JSON files.</p>
<p>We'll assume that you've already got a Plone 4.1 buildout set up, and have a custom product for your site that contains your dexterity types. Follow a guide <a class="external-link" href="http://plone.org/products/dexterity/documentation/manual/developer-manual/pre-requisites/creating-a-package">such as this</a> to get this going.</p>
<p>For this example I'll occasionally mention a shuttlethread.farmyard product, which is the custom product for a dummy site to manage our animals on the farm. The <a class="external-link" href="https://bitbucket.org/lentinj/shuttlethread.farmyard/src/0587b3df421d">source is available on bitbucket</a> if you'd rather read the entire thing.</p>
<h2>Enabling transmogrify.dexterity content export/import</h2>
<p>Firstly we need to include transmogrifier and transmogrify.dexterity. We can do this in shuttlethread.farmyard's setup.py:-</p>
<pre>install_requires = [
           . . .    Â 
    'quintagroup.transmogrifier',
    'transmogrify.dexterity',</pre>
<p>We also need to define a pipeline for quintagroup.transmogrifier to use. There is an example pipeline configuration within transmogrify.dexterity that should be good enough for us:-</p>
<pre>&lt;configure xmlns="http://namespaces.zope.org/zope"Â i18n_domain="shuttlethread.farmyard"&gt;
    &lt;include package="transmogrify.dexterity.pipelines" file="files.zcml" /&gt;
&lt;/configure&gt;</pre>
<p>If you needed to change it, you could use the import.cfg and export.cfg files.zcml includes as a starting point for your own.</p>
<p>Now start up your Plone instance with some dexterity content and go to <a href="http://localhost:8080/Plone/portal_setup/manage_importSteps">http://localhost:8080/Plone/portal_setup/manage_exportSteps</a>.Â There should be a "ï»¿Content (transmogrifier)" option, select that and "Export selected steps". We get a .tar.gz (or .zip under windows) with contents similar to the following:-</p>
<pre>structure/.objects.xml
structure/meadow/
structure/meadow/_content.json
structure/meadow/.objects.xml
structure/meadow/daisy/
structure/meadow/daisy/_content.json
structure/meadow/daisy/_field_feeding_notes.htm
structure/meadow/freda/
structure/meadow/freda/_content.json
structure/meadow/freda/_field_feeding_notes.htm</pre>
<p>Firstly, each page has it's own directory, and contains a _content.json file. This contains all simple fields in our dexterity type. For example, here is the content of Daisy's _content.json:-</p>
<pre>{
    "creators": ["admin"],
    "feeding_notes": {
        "contenttype": "text/html",
        "encoding": "utf-8",
        "file": "_field_feeding_notes.htm"
    },
    "species": "cow",
    "title": "Daisy"
}</pre>
<p>"Feeding notes" is a rich text field. The values for these are put in a separate file and the JSON contains a reference to the file name. The same would happen with an image field or any other BLOB field.Â Finally, the meadow is a container type so it has a .objects.xml which lists the cows within it.</p>
<p>There is also an equivalent import option, but we're going to do something a bit neater.</p>
<h2>Storing content in a GenericSetup profile</h2>
<p>We can use a GenericSetup profile to import content automatically when we create a new site, and keep this in our custom product. First, define we the "testfixture" profile in shuttlethread.farmyard's configure.zcml:-</p>
<pre>    &lt;genericsetup:registerProfile
        name="testfixture"
        title="unittest content"
        directory="profiles/testfixture"
        description="unittest content / example content for development"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        /&gt;
</pre>
<p>Then create the profile directory (i.e. "profiles/testfixture"). It makes sense to depend on the default profile, assuming that's where the types for the content we create are. So in metadata.xml:-</p>
<pre><div id="_mcePaste">&lt;metadata&gt;</div><div id="_mcePaste">  &lt;version&gt;1&lt;/version&gt;</div><div id="_mcePaste">  &lt;dependencies&gt;</div><div id="_mcePaste">    &lt;dependency&gt;profile-shuttlethread.farmyard:default&lt;/dependency&gt;</div><div id="_mcePaste">  &lt;/dependencies&gt;</div><div id="_mcePaste">&lt;/metadata&gt;</div></pre>
<p>And create a file quintagroup.transmogrifier-import.txt with the word "import". This file is just a marker to show the import happened, it's content is not important.</p>
<p>Finally, unzip/tar the export made earlier so at the end we have:-</p>
<pre>src/shuttlethread/farmyard/profiles/testfixture/metadata.xml
src/shuttlethread/farmyard/profiles/testfixture/quintagroup.transmogrifier-import.txt
src/shuttlethread/farmyard/profiles/testfixture/structure/.objects.xml
src/shuttlethread/farmyard/profiles/testfixture/structure/meadow/.objects.xml
src/shuttlethread/farmyard/profiles/testfixture/structure/meadow/_content.json
src/shuttlethread/farmyard/profiles/testfixture/structure/meadow/daisy/_content.json
  . . .
</pre>
<p>Now we can instantly build a new site full of content. Going to <a class="external-link" href="http://localhost:8080/@@plone-addsite?advanced=1">@@plone-addsite?advanced=1</a> and choose the new "unittest content" option.</p>
<p>Also note that we didn't have to export the content from the same server, it could have been a staging server or production server. Run the export process on your production server, put the content in your product, recreate the site and you have all the content from your live site available locally.</p>
<p>If your tests use plone.app.testing then they canÂ <a class="external-link" href="http://pypi.python.org/pypi/plone.app.testing/4.0#product-and-profile-installation" style="padding-left: 0px; ">install GenericSetup profiles</a>. This means integration tests can be written that refer to the test content too. I'll probably show this in another post.</p>
<h2><strong>More automation, more fun!</strong></h2>
<p>As useful as it is, updating your example content by clicking all the ZMI buttons and untarring the content in the right place quickly gets dull. We can use curl can automate this though. <a class="external-link" href="http://curl.haxx.se/">curl</a> is a command-line tool for interacting with webservers, and we can combine the request to export content with an untar into the right place. For example:-</p>
<pre>curl --user admin:admin \
     --data 'ids%3Adefault%3Atokens=' \
     --data 'ids%3Alist=content_quinta' \
     --data 'manage_exportSelectedSteps%3Amethod=+Export+selected+steps+' \
     http://localhost:8080/Plone/portal_setup \
     | tar -zxvC src/shuttlethread/farmyard/profiles/testfixture/
</pre>
<p>In our projects we have some extra bash script to empty the testfixture directory first, but this isn't ideal. I'm going to work on a buildout recipe to add a bin/exportsite script in a more reusable fashion.</p>
<h2>Workflow caveats</h2>
<p>We have used transmogrify.dexterity to import/export most field types without hiccups. However, one thing is the default pipelines do not know much about workflow. The export pipeline does not record the current state of content, and the import pipeline will try and transition everything to 'publish'. This works fine with the default workflow but if you have your own workflow you will need to make a copy of import.cfg and change this.</p>
<p>You can at least override the transitions a content item goes through. Most useful if you need to test the behaviour of an unpublished content item. Within it's _content.json add...</p>
<pre>"_transitions": [],</pre>
<p>...to disable the default transition to published. Note that another export will overwrite this though.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-06-08T17:10:00+00:00</published>
    <updated>2011-06-08T21:26:26+00:00</updated>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Distributing Diazo themes for Plone</title>
    <link href="http://localhost:8080/shuttlethread/blog/distributing-diazo-themes-for-plone" rel="alternate" type="text/html"/>
    <id>urn:syndication:28c5fc849af31208927764a9ea908393</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>It's been great to see so many <a class="external-link" href="http://plone.org/products?getCategories=themes&amp;sort_on=created">new themes</a> created over the past few weeks as people start using Diazo and plone.app.theming, and special thanks to Alex Clark for his work packaging up so many. In my view, the most exciting feature of plone.app.theming is the ability to <a class="external-link" href="http://pypi.python.org/pypi/plone.app.theming#zip-file-format">distribute themes as simple zip files</a>.Â Plone themers no longer need to understand the strange magic required to create python package distribution and once we ship with plone.app.theming, new users won't need to understand buildout to install new themes. (Note that there was a bug fixed in earlier versions of plone.app.theming that made the zip file upload form in the control panel unusable, it's fixed in 1.0b4.)</p>
<p>Of course there will be some themes that require supporting views or python code to work, but for the vast majority that don't, I'd like to encourage theme authors to distribute themes as zip files rather than as python packages. Uploading your theme as a simple zip file to Plone's <a class="external-link" href="http://plone.org/products">Add-on Products section</a> has several advantages:</p>
<ul>
<li>Less code. No need for a setup.py or several levels of folders containing __init__.py files.</li>
<li>Previous versions of your theme will continue to be available after you update it.</li>
<li>New users will often use an existing example as the basis of their own work. By keeping these examples simple we increase the probability they'll be successful in creating their own theme.</li>
<li>In future we hope to create a theme gallery on plone.org and integrate it into the plone.app.theming control panel. This can only work for simple zipped themes, not python packages, so for inclusion make sure to upload them!</li>
</ul>
<p>So with zipped themes now fully working, I don't see any reason to uploading simple themes as python packages to pypi. And please don't upload copied of your zipped theme into Plone's subversion repository, version control is intended for source code and it does not benefit from the plone.org cache server.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-05-29T16:50:00+00:00</published>
    <updated>2011-05-29T17:20:56+00:00</updated>
    <category term="Diazo"/>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Announcing Diazo 1.0b1 and plone.app.theming 1.0b1</title>
    <link href="http://localhost:8080/shuttlethread/blog/announcing-diazo-1.0b1-and-plone.app.theming-1.0b1" rel="alternate" type="text/html"/>
    <id>urn:syndication:c1eec67b5c38018b7989d8966adbfc58</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>I'm pleased to announce the 1.0b1 releases of Diazo and plone.app.theming.</p>
<p>Diazo is a theming tool that implements a Deliverance like language using a pure XSLT engine. Diazo 1.0b1 brings a number of language simplifications when compared to XDV, for instance we now use <i>&lt;replace theme-children="..."&gt;</i> instead of the confusingly named <i>&lt;copy theme=".."&gt;</i>. We have also added operations to support the copying, deletion and merging of attributes.</p>
<p>While Diazo is developed as part of the Plone project, there is nothing Plone specific about the package. Diazo 1.0b1 includes a WSGI middleware component which may be used as a simple proxy, see the <a class="external-link" href="http://diazo.org/quickstart.html">quick start guide</a>. Themes may alternatively be compiled down to XSLT and run in Apache or Nginx, for more information see the <a class="external-link" href="http://diazo.org/deployment.html">deployment guide</a>.</p>
<p>Diazo is the successor to XDV and in most cases is able to run your existing XDV rules without changes. For more information on Diazo see the documentation at <a class="external-link" href="http://diazo.org">diazo.org</a>. Download from the <a class="external-link" href="http://pypi.python.org/pypi/diazo">diazo pypi page</a>.</p>
<p>To use Diazo in a Plone site, we recommend <a class="external-link" href="http://pypi.python.org/pypi/plone.app.theming">plone.app.theming</a>. plone.app.theming is the successor to collective.xdv. It builds on the newly released <a class="external-link" href="http://pypi.python.org/pypi/plone.resource">plone.resource</a> to simplify the process of theme deployment and distribution, themes are no longer required to be a python package and may be distributed as simple zip files.</p>
<p>plone.app.theming adds the ability to pass parameters to your theme from calculated TAL expressions, enabling conditions to be tested in a python context which is generally simpler than XPath.</p>
<p>To get started with plone.app.theming read the <a class="external-link" href="http://pypi.python.org/pypi/plone.app.theming">documentation</a>. It is recommended to use with Plone 4.1b2, the package version <a class="external-link" href="http://good-py.appspot.com/release/plone.app.theming/1.0b1">known good set is available on good-py</a>. It should be possible to use with 4.0.x with appropriate pins for plone.app.registry and plone.app.z3c.form and dependencies.</p>
<p>Special thanks to Martin Aspeli and David Glick for their work on plone.app.theming, plone.resouce and Diazo.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2011-04-23T12:06:50+00:00</published>
    <updated>2011-04-23T12:06:50+00:00</updated>
  </entry>
  <entry>
    <title>Plone Roadmap</title>
    <link href="http://localhost:8080/shuttlethread/blog/plone-roadmap" rel="alternate" type="text/html"/>
    <id>urn:syndication:47e44ab7579737a4a461136af0cec4e4</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <div id="content-core" style="padding-left: 0px; ">
<div class="kssattr-macro-rich-field-view kssattr-templateId-widgets/rich kssattr-atfieldname-text " id="parent-fieldname-text" style="padding-left: 0px; ">
<p style="padding-left: 0px; "><i>Rather than let this languish unpublished any longer, I thought I should get this out there as it is.</i></p>
<p style="padding-left: 0px; ">With the release of Plone 4.0, I thought it would be useful to set out my understanding of where we are headed with future releases. This draws heavily on conversations with Hanno and discussions on the Framework Team list. The focus here is on infrastructure rather than user visible changes.</p>
<p style="padding-left: 0px; ">Over the years, Plone has accrued much code and added many concepts. In part this is a reflection of the vibrancy of our project, but it has come at the cost of complexity.</p>
<p style="padding-left: 0px; ">Hanno has been doing heroic work with Zope 2 and the ZTK recently, and we will soon be able to completely avoid the large chunks of old Zope 2 code we do not use at all.</p>
<p style="padding-left: 0px; ">All plans are of course subject to change - but it is useful to set out a direction.</p>
<div class="section" id="acquisition" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Acquisition</h3>
<p style="padding-left: 0px; ">Acquisition was introduced because the ZODB did not support reference cycles. As a programming paradigm though â at least in the implicit form used within Zope 2 â it has been a failure. It is strange and unfamiliar to new developers.</p>
<p style="padding-left: 0px; ">It also prevents us from using some natural patterns: the catalogue indexes content by path rather than directly; references between content must be indirected through a path.</p>
<p style="padding-left: 0px; ">Phillip and Hanno's work to enable Acquisition over __parent__ pointers (included in Zope 2.12 / Plone 4) has given us a path out of our current dependency on it. This has already simplified BrowserViews. The next step is to make sure all content has __parent__ pointers all the way to the application root. We should do this for Plone 5 and drop Acquisition entirely in a future version.<a class="external reference" href="http://wiki.zope.org/zope2/SetParentAndNameInOFS" style="padding-left: 0px; ">http://wiki.zope.org/zope2/SetParentAndNameInOFS</a></p>
</div>
<div class="section" id="catalogue-and-references" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Catalogue and References</h3>
<p style="padding-left: 0px; ">We won't actually end up using many of the ZTK catalog components - they are generally too simplistic. The ZCatalog and PluginIndexes components offer many more features, especially now that queryplan is part of ZCatalog in 2.13. We will probably end up coding our own plone.catalog and extend plone.indexer.</p>
<p style="padding-left: 0px; ">Once all content has __parent__ pointers to the root, we will be able to use zope.intid for the catalogue keys, enabling us to merge result sets across catalogues. The catalogue index will reference content objects directly (rather than their path), making renames and moves much less expensive operations.</p>
<p style="padding-left: 0px; ">We'll also be able to store relations as simple references on content - related items can be stored as a simple list of objects on a piece of content. These can then be indexed in zc.relation.</p>
</div>
<div class="section" id="archetypes" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Archetypes</h3>
<p style="padding-left: 0px; ">Plone 5 should be the last major release with Archetypes compatibility. For form based content types, Dexterity is the future. We will want to provide a simple migration route for existing content (by automatically creating a persistent Dexterity schema). Any custom templates or views would require manual updates.</p>
</div>
<div class="section" id="the-publisher" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">The Publisher</h3>
<p style="padding-left: 0px; ">The Zope2 publisher has become incredibly complex, with numerous different hooks. In the long run (Plone 6?) we should replace it with our own simplified publisher which runs only in a WSGI pipeline. There will be a lot to learn from BFG here, though that is probably too simplistic for Plone.</p>
<p style="padding-left: 0px; ">Ideally we will also move to WebOb based Request/Response objects, bringing us increased compatibility with other WSGI components.</p>
</div>
<div class="section" id="ofs-and-cmf" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">OFS and CMF</h3>
<p style="padding-left: 0px; ">Currently, all Zope2 content inherits OFS.SimpleItem. All Plone content also inherits from CMF. In the long run, content items should have simple classes with code in views. These are significant changes and are likely to be the most difficult.</p>
</div>
<div class="section" id="restricted-python-skins-form-controller" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Restricted Python, Skins, Form Controller</h3>
<p style="padding-left: 0px; ">This is another confusing hurdle for new developers and should be abandoned. There shouldn't be any support for writing persistent Python code in the form of scripts at all. The Python expressions in templates won't be using Restricted Python either after the move to Chameleon.</p>
<p style="padding-left: 0px; ">With the exception of Archetypes, core Plone should remove any remaining persistent (incl. CMF file-system based) code and templates. Old style templates should be replaced with views. CSS/JS/Images should all migrate to resource directories.</p>
<p style="padding-left: 0px; ">Other than the Archetypes edit forms, all other uses of Form Controller should be removed.</p>
</div>
<div class="section" id="security" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Security</h3>
<p style="padding-left: 0px; ">The current AccessControl security model has served us well. While some simplification may be possible by dropping unused legacy features, no major changes to functionality should be expected. Porting to Python 3 will be the obvious time to make any simplifications.</p>
</div>
<div class="section" id="the-zodb" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">The ZODB</h3>
<p style="padding-left: 0px; ">While it is unfamiliar to new developers, building on top of ZODB is hugely beneficial to Plone. Semi-structured content management data just doesn't map well to relational databases. That said, by reducing our expectations on content types, it should become easier for add ons to integrate relational database backed content into Plone.</p>
</div>
<div class="section" id="tools" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Tools</h3>
<p style="padding-left: 0px; ">The various tools should become utilities and views. Most of them need not be persistent as settings can be stored with plone.registry.</p>
</div>
<div class="section" id="portlets-and-viewlets" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Portlets and Viewlets</h3>
<p style="padding-left: 0px; ">Portlets and viewlets are powerful concepts but they have proved a difficult stumbling block for new developers. The Deco project is working increased layout flexibility for content editors. It also makes it much easier to create dynamic page fragments in the form of 'tiles'. These will replace portlets and most current uses of viewlets.</p>
</div>
<div class="section" id="python-3" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">Python 3</h3>
<p style="padding-left: 0px; ">Plone will not be an early adopter of Python 3 - there are too many dependencies which must be ported first. In three to five years time though, we will have to have made the move.</p>
<p style="padding-left: 0px; ">It seems likely that there will be others to help the ZTK porting effort, but little interest in porting Zope2. For the time being then, our focus should be on progressively removing our Zope2 baggage and reducing our dependencies so that our porting effort will be simpler.</p>
<p style="padding-left: 0px; ">It is unlikely that Plone will be able to support both Python 2 and Python 3 concurrently - there will be just too much code.</p>
</div>
<div class="section" id="wsgi" style="padding-left: 0px; ">
<h3 style="padding-left: 0px; ">WSGI</h3>
<p style="padding-left: 0px; ">WSGI capability will be in Zope 2.13 / Plone 4.1 and while it will certainly be considered experimental rather than supported at first, we can expect people to gain experience with it over the 4.x series. If all goes well, we will then be able to require WSGI for 5.0.</p>
<p style="padding-left: 0px; ">Various components should be move out of Plone and into the WSGI pipeline. This should allow us to share code with other projects. Prime contenders for this are Authentication and Resource Registries.</p>
<h3 style="padding-left: 0px; ">Theming</h3>
<p style="padding-left: 0px; ">Plone 5 will see plone.app.theming, the integration of Diazo (XDV) and plone.resource, become the default theming system. plone.resource allows themes to be packaged as simple zip files rather than python eggs. The Diazo (XDV) theming engine enables themes to be created without reference to the various markup generating technologies which make up a Plone page.</p>
<div></div>
</div>
</div>
</div>
<div class="visualClear" style="padding-left: 0px; "></div>
<div class="documentActions" style="padding-left: 0px; "></div>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2010-12-17T08:00:00+00:00</published>
    <updated>2010-12-17T09:15:23+00:00</updated>
  </entry>
  <entry>
    <title>Diazo / XDV sprint report</title>
    <link href="http://localhost:8080/shuttlethread/blog/diazo-xdv-sprint-report" rel="alternate" type="text/html"/>
    <id>urn:syndication:135f92a9f3156f000f05a0ebeaf31be3</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>Ken Wasetis, Kees Hink and Peter Uittenbroek worked on building example themes with Diazo. These currently live in the collective.examples.diazo package, but we're now discussing how best to present them.</p>
<p>Jamie Lentin worked on a Diazo debugger and succeeded in building a proof of concept implementation which extracts relevant information from the transform. This now needs to be hooked into the generated pages with a javascript UI.</p>
<p>Laurence Rowe (with help from Andi Zeidler and Wyn Williams) worked on importing the XDV subversion history into the Plone repository. There's still a few bugs to work out, but we should be there soon.</p>
<p>Volodymyr Cherepanyak worked on making Sphinx documentation. This will form the basis of the Diazo website once the repository move is finalised.</p>
<p>Outside of the sprint, Martin Aspeli and David Glick are now working on plone.app.theming, the new collective.xdv, and plone.resource, for simpler theme integration.</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2010-11-05T13:35:00+00:00</published>
    <updated>2010-11-15T11:14:12+00:00</updated>
    <category term="Diazo"/>
    <category term="Plone"/>
  </entry>
  <entry>
    <title>Laurence Rowe to present 'Theming with XDV' at Plone Conference 2010, Bristol</title>
    <link href="http://localhost:8080/shuttlethread/blog/theming-with-xdv" rel="alternate" type="text/html"/>
    <id>urn:syndication:e26501a002031bf09307c5672781358e</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>XDV is a way to apply a style/theme contained in a static HTML web page (usually with related CSS, JavaScript and image resources) to a dynamic website created using any server-side technology. The theme is compiled down to an XSLT file which can then be deployed in Plone, Apache, Nginx, or a WSGI pipeline.</p>
<p>This talk introduces the rules syntax; compares with Deliverance; and presents some examples of in production.</p>
<p><strong>Date:</strong> Thursday, 28th October 2010. <a class="external-link" href="http://www.ploneconf2010.org/the-event/talks/theming-with-xdv">Conference site talk page</a>.</p>
<p><strong>Update:</strong> <a class="external-link" href="http://ploneconference2010.blip.tv/file/4317699/">Video now available</a>.</p>
<p>
<script src="http://blip.tv/play/hrhTgojWTAI.js?width=480&amp;height=300" type="text/javascript"></script>
</p>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2010-10-26T16:45:00+00:00</published>
    <updated>2010-11-03T22:31:35+00:00</updated>
  </entry>
  <entry>
    <title>Meet Shuttle Thread</title>
    <link href="http://localhost:8080/shuttlethread/blog/meet-shuttle-thread" rel="alternate" type="text/html"/>
    <id>urn:syndication:235410d25f91d8d86e70c598189ac599</id><content type="html" xml:base="http://localhost:8080/shuttlethread/blog/aggregator" xml:lang="en" xml:space="preserve"><![CDATA[
        <p>So we (Laurence Rowe and Jamie Lentin) have just started Shuttle Thread.</p>
<p>We've been friends since high school and have kept in touch over the years and exchanged thoughts on the technology we'd been using in our different jobs. Though it's usually been different technologies, it's often felt like we've been working at the same fundamental problems.</p>
<p>We were both looking for a new challenge and wanted to base ourselves in Manchester. Realising that we were after the same thing, we talked it over and decided to take the plunge and start our own company. By joining forces we will be able to offer our customers the benefit of our combined experience.</p>
<p>A little more about ourselves:-</p>
<h3>Laurence Rowe</h3>
<p><img src="http://localhost:8080/shuttlethread/images/laurencerowe.jpg/image_preview" alt="Archipelago Sprint, Norway. 25th April, 2006. (Picture by Geir Baekholt.)" class="image-left" title="Laurence Rowe at work" /></p>
<p>Laurence has been building Plone sites since 2002 and has since made a career of it. He is an active core contributor and serves on the Plone Framework Team, the body which provides technical direction for the Plone CMS.</p>
<p>He's spent a lot of time integrating Plone with other systems, either at the database or user interface level.</p>
<p>After working in London and Norway, he decided to move back to Manchester where he had studied for his degree in Software Engineering.</p>
<p><a class="external-link" href="http://www.linkedin.com/in/laurencerowe">Laurence on Linked in</a>.</p>
<div class="visualClear"></div>
<h3 class="mceContentBody documentContent">Jamie Lentin</h3>
<h3 class="mceContentBody documentContent"><img src="http://localhost:8080/shuttlethread/images/tripple_store.jpg/image_preview" alt="http://www.flickr.com/photos/completedespair/3795441433/sizes/o/in/photostrea" class="image-right" title="Tripple Store" /></h3>
<p>Jamie has been developing websites and associated solutions since the turn of the century. He is a multi-skilled developer, turning his hand to client-side Javascript all the way down to Linux kernel development.</p>
<p>He has spent 5 years at the BBC where he has been lead developer architect behind several aspects of content management, in particular the in-house XML/XSLT-based CPMS managing and producing many parts of the site. Besides this, developing AV transcoding/moderation systems and voting/comment data warehouse solutions, making much use of Oracle and MySQL.</p>
<p>He will now, after moving back to Manchester, be taking his Python experience and applying it to Plone.</p>
<p><a class="external-link" href="http://uk.linkedin.com/in/jamielentin">Jamie on Linked in.</a><strong> </strong></p>
<div class="visualClear"><strong>We'll both be in Bristol for the <a class="external-link" href="http://www.ploneconf2010.org">Plone Conference</a>, so come up and say hello!</strong></div>
        ]]>
      </content>
    <author>
      <name></name>
    </author>
    <published>2010-10-26T16:40:00+00:00</published>
    <updated>2010-10-26T16:48:40+00:00</updated>
  </entry>
</feed>
