Re: Re: What does Five and Z3 mean for Archetypes?
Sidnei da Silva <sidnei-/awGbKECNgO/3pe1ocb+swC/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <20051121151924.GB9554@cotia> |
On Mon, Nov 21, 2005 at 04:00:06PM +0100, Martijn Faassen wrote: | >It's equivalent to creating multiple edit views for a single schema in | >zcml, assigning different fields to each of them, and chaining them | >together in a specific order (the order in which they are defined, as | >silly as it may be). | | Hm, interesting, for complicated layouting purposes, or to make wizards? Basically wizard-like, but less powerful. It's generally used by people that think 50 fields to fill for a single object is fine, and prefer to have 5 pages with 10 fields each than a single 50 fields page *wink* Note we don't have any kind of 'standalone wizard', eg: generating a wizard from a schema with no object attached. This is mainly because the widgets edit-mode expect the field to provide a value, and the field *needs* an instance to provide a value. Of course you can fake a instance, but that's very hackish. | >Yes, marshalling is one of the great promises of AT, but it remains | >largely unfulfilled in practice. In z3 it would likely be implemented as | >an adapter that processed some formatted data and applied it to your | >content object, and a view that displayed your content object in the | >desired format. | | Right. There are of course all kinds of tricky issues with this in | practice, like interaction with workflow, versioning, whether you want | to use the marshalled state for other purposes than just export (in the | case where you want to use it for something else, you may need security | restrictions on what exactly gets marshalled), and so on. We've done a | lot of thinking about this kind of issue in the context of Silva. :) Thats great. I'm very interested in hearing what you have to say about it. | >In both cases there would seem to generally be very little python code in | >a widget, what logic there is can probably be shared between an AT and z3 | >widget easily by having them share a common base class. The html/js/ajax | >or whatever that is the heart of a nice widget whould probably be easily | >be shareable. To this end, I will attempt to make sure future AT widgets | >that I make will also function as z3 widgets, and to retrofit my existing | >custom widgets to work with z3 schemas as I have the time. | | Cool! | | Hm, making widgets that work for both sounds like a challenge to me. The | alternative route would be to try to keep AT as it is intact, but allow | it to search Zope 3-style widgets and work with them too. Not sure | whether that's any easier a route to follow, but it would keep the new | widget clean of code necessary to work with Archetypes in particular. It's actually not that hard, but the z3 widgets would have to 'adapt' the AT fields to the the interface for a z3 field. | >AT widgets primary | >disadvantage is that they rely on AT's byzantine template/macro structure, | >and their primary advantage is that there is a very nice library of them | >in existence. It would seem there are very few nice z3 widgets in the | >wild, but if we encourage developers to target their widget development to | >both frameworks, and offer some easy tips for doing so, we can probably | >grow that library significantly. | | Yes, that would be nice. If we could do a combination of: | | a) make Archetypes work with Zope 3 widgets Should be trivial. Archetypes doesn't expect much from a widget other than providing a macro and a method to extract it's own value from the request. | b) port over Archetypes widgets to Zope 3 style | | then that would hopefully eventually benefit both Archetypes and Zope 3 | equally. I don't know how hard a) is though, and I don't know whether | Zope 3 is still missing facilities to accomplish b)... I also imagine | that right now many widgets in Archetypes rely on various facilities | that are not there or are called differently in Zope 3. I'm +10 on this. -- Sidnei da Silva Enfold Systems, LLC. http://enfoldsystems.com ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click