[Grok-dev] Dolmen and its releases
Souheil CHELFOUH
trollfot at gmail.com
Thu Oct 22 09:32:12 EDT 2009
2009/10/22 Martin Aspeli <optilude+lists at gmail.com>:
> Souheil CHELFOUH wrote:
>
> Nice to see so many new packages! :-)
>
>> http://pypi.python.org/pypi/dolmen.file
>> A Zope3/Grok File Representation package.
>> dolmen.file is a layer above zope.app.file.file.File, adding a notion
>> of filename, missing in the original implementation.
>
> Is it Grok specific? Otherwise, there's also plone.namedfile, which I
> guess does something similar.
Yes, it does something similar. It uses Grok for the registration of
the views and traverser.
This has been started around the same time, it's not meant to be
concurrent. Also, I didn't want to ship any blob things out of the
box.
The dolmen.blob is the package that extends this. This is very
straightforward and no special imports.
dolmen.file also uses and provides what I use a lot myself, the FileProperty.
>
>>
>> http://pypi.python.org/pypi/dolmen.blob
>> Dolmen zodb blob handlers (using ZODB >= 3.9.2)
>> dolmen.blob is a layer above dolmen.file, using the ZODB blobs as a
>> storage facility. It respects the zope.app.file IFile and the
>> dolmen.file INamedFile interfaces.
>
> ... which is also in plone.namedfile (as an optional extra if you don't
> have blob support in your ZODB). :-)
dolmen.blob is very ztk centric and doesn't really support anything zope2-ish
and same remarks : I use a lot the BlobProperty :)
>
>> http://pypi.python.org/pypi/dolmen.relations
>> Dolmen relations
>> dolmen.relations is a thin layer above zc.relation, allowing a simple
>> and straightforward implementation of standalone relationships between
>> objects.
>
> How is this different to z3c.relationfield, which I believe is also used
> by Grok?
This is not meant to act like a field, stored on the object. It's a level lower.
I used to work with z3c.relationfield, but it's too specific. A lot of
the mechanisms are similar,
as it was my start point. Howevern this is more of the framework
level. It would be possible to use
dolmen.relations to make a relationfield-like feature.
>
>> http://pypi.python.org/pypi/dolmen.thumbnailer
>> Dolmen thumbnailing library
>> dolmen.thumbnailer is package specialized in Thumbnail generation.
>> Using the dolmen.storage mechanisms, it allows a pluggable and
>> flexible thumbnail storage.
>
> Cool. What does it use to scale? At what time does it do the scaling?
> (upload? download?)
Actually, it only provides the tools to create the thumbnails with PIL
The trigger of the thumbnailing is left to the discretion of the developper.
Readme tests, they cover most of the features. I personnaly use a
IFieldUpdate adapter, to trigger that, at download time.
But it can be differed in a queue (dolmen.queue is to come)
>
>> http://pypi.python.org/pypi/dolmen.widget.file
>> File widget for z3c.form, using Grok
>> dolmen.widget.file is a package that walks hand-in-hand with
>> dolmen.file. It provides a useable and pluggable way to render the
>> dolmen.file.FileField in a z3c.form.Form, using Grok (through
>> megrok.z3cform.base)
>
> Nice. There's a file widget in plone.formwidget.namedfile, by the way,
> although that's possibly a bit more Ploney.
>
>> http://pypi.python.org/pypi/dolmen.widget.image
>> Image widget (with thumbnails) for z3c.form, using Grok
>> dolmen.widget.image is a thin layer above dolmen.widget.file providing
>> a widget suitable to fields implementing IImageField. It adds, thanks
>> to dolmen.thumbnailer a preview of the uploaded image in both input
>> and display mode.
>
> Again, one can be found in plone.formwidget.namedfile, though that
> doesn't have scaling support yet. Hopefully, that'll get added soon,
> maybe with the dolmen.thumbnailer thing.
>
It's directly tied to the thumbnailer and it's merely a thin layer
about the file widget.
The widgets are registered with megrok.z3cform.base
>> We have also released the first version of megrok.z3cform.base, used
>> in the project
>> http://pypi.python.org/pypi/megrok.z3cform.base/0.1"
>
> That's really good to hear. We have some z3c.form-in-Grok stuff in
> plone.directives.form. I would like to maybe unify that with something a
> bit more Grok specific. I'm hoping that in Plone 4/Zope 2.12 it'll be a
> bit easier to use standard z3c.form forms (currently there's a
> requirement to wrap forms in a view when using plone.z3cform, which
> annoys me a bit).
>
> Martin
>
I forgot the dolmen.storage, which I use a lot !
http://pypi.python.org/pypi/dolmen.storage
Dolmen Zope3 Grok Storage Annotation
dolmen.storage defines a clear high-level API to deal with pluggable
storage components.
This is an alternative to the grok.annotation use.
More information about the Grok-dev
mailing list