plonewars.com

January 15th, 2007

Attendees and info — plone.org

Attendees and info — plone.org

Originally from del.icio.us/tag/plone by gotcha


from Yoda http://plonewars.com/2007/01/15/attendees-and-info-a%c2%80%c2%94-ploneorg/







January 15th, 2007

Daniel Nouri: Generic functions kick ass

Yesterday, I watched Guido van Rossum’s talk about Python 3000
along with some Monty Python sketches that turned up in my search
results page. It was quite interesting to see what Python 3.0 will be
and what it will not be.

One thing that occured to me some months ago after I watched the
TurboGears Ultimate DVD was that those generic functions (in the
form of RuleDispatch) are an alternative to adaptation, as it
exists in Zope. That is, you could do everything that you wanted to
do with adaptation also with generic functions, and that in an
arguably less verbose way. Also, Guido explains in his Google talk
that adapters are only a special case of generic functions.

I tried it out. In plone.checksum (which is not that interesting
by itself), I’m using a generic function instead of adaptation. I
have a class called Checksum that returns an md5 checksum in its
do_checksum method:

import dispatch
class Checksum:
    @dispatch.generic()
    def do_checksum(self, value):
        """Return md5 object that has the calculated checksum.
        """

You can see that the generic function doesn’t actually have an
implementation. It’s meant to be overloaded like this:

import md5
@Checksum.do_checksum.when('isinstance(value, object)')
def do_checksum(self, value):
    checksum = md5.new()
    checksum.update(str(value))
    return checksum

This is the most general implementation that I could come up with.
It’ll be called when the argument value is an instance of object,
that is, always, unless there’s a more specialized generic function.
Let’s say we want a different implementation for OFS.Image.File.
Instead of having File implement an interface just for this
purpose and register an adapter, we register a generic function:

import OFS.Image.File
@Checksum.do_checksum.when('isinstance(value, OFS.Image.File)')
def do_checksum(self, value):
    checksum = md5.new()
    value = value.data
    if isinstance(value, str):
        checksum.update(value)
    else:
        while value is not None:
            checksum.update(value.data)
            value = value.next
    return checksum

Interfaces are a generally a good thing, but not in this case where we
would have to mark the File object just to serve our adaptation.

Guido blogged about adaptation versus generic functions half a year
ago. There are also some nice additional links in there.

Daniel Nouri: Generic functions kick ass

Originally from Planet Plone


from Yoda http://plonewars.com/2007/01/15/daniel-nouri-generic-functions-kick-ass/







January 15th, 2007

Content management with Plone | 456 Berea Street

Content management with Plone | 456 Berea Street

Originally from del.icio.us/tag/plone by kveretennicov


from Yoda http://plonewars.com/2007/01/15/content-management-with-plone-456-berea-street/







January 15th, 2007

CPbrief.pdf about IMS Content Packaging

IMS Content Packaging is a way to share learning resource from one program to another, keeping descriptions of the material involved. Plone is capable of importing this using IMS Transport

CPbrief.pdf about IMS Content Packaging

Originally from del.icio.us/tag/plone by keesT


from Yoda http://plonewars.com/2007/01/15/cpbriefpdf-about-ims-content-packaging/







January 15th, 2007

Top 7 Plone Conference Videos — The Plone Blog

Top 7 Plone Conference Videos — The Plone Blog

Originally from del.icio.us/tag/plone by dirceu


from Yoda http://plonewars.com/2007/01/15/top-7-plone-conference-videos-a%c2%80%c2%94-the-plone-blog/







January 15th, 2007

Hacker’s story – How Plone changed my life — Red Innovation

Hacker’s story – How Plone changed my life — Red Innovation

Originally from del.icio.us/tag/plone by dirceu


from Yoda http://plonewars.com/2007/01/15/hackers-story-how-plone-changed-my-life-a%c2%80%c2%94-red-innovation/







January 15th, 2007

CMFContentPanels — plone.org

CMFContentPanels — plone.org

Originally from del.icio.us/tag/plone by hrck


from Yoda http://plonewars.com/2007/01/15/cmfcontentpanels-a%c2%80%c2%94-ploneorg-3/







January 15th, 2007

Open Source CMS Award

Open Source CMS Award

Originally from del.icio.us/tag/plone by kveretennicov


from Yoda http://plonewars.com/2007/01/15/open-source-cms-award/







January 15th, 2007
January 15th, 2007

TextIndexNG3

Alternate index product for the ZCatalog

TextIndexNG3

Originally from del.icio.us/tag/plone by offmessage


from Yoda http://plonewars.com/2007/01/15/textindexng3/