[z3-five] Re: [Archetypes-devel] Future of Archetypes

Sidnei da Silva sidnei at awkly.org
Sat Sep 11 15:50:21 MEST 2004


On Sat, Sep 11, 2004 at 03:30:39PM +0200, Martijn Faassen wrote:
| Jean Rodrigo Ferri wrote:
| [snip]
| 
| >Humm, it was exactly what I was thinking. Then the future of Archetypes 
| >is a fusion with Z3, desapearing gradually, seemingly without trauma!
| 
| Note that I heard that Ben Saller may have other plans in mind for the 
| future of Archetypes, called version 2. I don't know exactly what these 
| plans are -- there was a talk at EuroPython last june but I didn't get 
| to attend it. I'm not a good person to talk to about archetypes itself, 
| as I'm not one of the developers. Ben, and Sidnei, are. I'm the Zope 2 
| -> Zope 3 guy, myself.

The main issue is that Zope 3 schemas are not rich enough to provide
all the features that Archetypes does. As Paul noted in some other
thread, it is rather complex to control UI information with Z3
schemas, because though they provide some hints for form rendering,
those hints are not enough to do it all.

Turning views into multiadapters is a step closer to filling this gap.

The migration, as I see it would be sort of like Tres's 'bridge'
thing, that bridges Z2 interfaces to Z3 interfaces. From there on, we
could experiment with Z3 widgets as replacements for Archetypes
widgets. That's it, as far as I can see.

I imagine the flow being something like this:

- Declare an Archetypes schema on the class
- Use a at:schema directive to building a z3 schema from the at one
  and at the same time register a generic adapter from z3 schema to at
  schema
- Have a browser:addform and browser:editform be generated from a
  at:forms or something like that

This would get us with a Zope 3 view on a Zope 3 schema. Then, editing
would be like:

- User submits form
- Z3 processes widgets, extracting values and doing validation
- Z3 gets an adapter from object to Z3 schema
- The adapter found is the generic one registered with at:schema above
- The adapter would use Archetypes Fields api for storing the data

That would take care of the general case.

Other than this, I would really like to see events being used for all
sorts of things, like validation, references, transforms. Archetypes
validators could be hooked as subscribers for a IValidation event when
Z3 is processing widgets after a form submission, etc.

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

Is a computer language with goto's totally Wirth-less?


More information about the z3-five mailing list