Re: RFC: Schema Refactoring, first steps
Martin Aspeli <[email protected]> Fri, 14 Jul 2006 08:17:43 +0100
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
Rob Miller wrote: >> The better-interoperbility argument you make is really good (though I >> can't envisage how it'd work right now), > > i imagine having the 'main' slot of main_template.pt invoke a viewlet > container. then we'd write viewlets that can render AT schema widgets, > and other viewlets that can render Z3 widgets. perhaps we can embed some > display organizational info that the viewlet manager would use as Z3 > annotations on the FTI for a type, or even on individual instances. Sorry, I still don't understand this. A viewlet manager is basically something you put in a template (using a special TAL expression: <div tal:replace="structure provider:plone.top"/> where plone.top is the registered name of the viewlet manager). Viewlets register themselves (in ZCML, at Zope startup) as being renderable in a particular viewlet manager, for a particular view (i.e. page; or just all pages), for a particular context (e.g. a content type, or just any content type). At least in the way that zope.viewlet works now, I don't see how they'd be used in this way. Perhaps the composition of the fields in base_edit.pt or similar could be handled by viewlet registrations, although this still seems a bit of a strange use of viewlets to me. I'd need to think about it a bit more, though. > trickier would be handling the validation, since the AT validation is > usually driven by CMFFormController while the Z3 validation is driven by > formlib. it may be possible to invoke these processes one after the > other... i'd have to play around to see if that were really possible. And not just the validation, the whole saving logic (e.g. what happens with title-to-id renaming, storage initialisation etc.). But the one-step-back I'd like to take is not "how do we make it work", but rather, "how does the AT developer work". i.e., what would your fictional product that started life in AT and wanted to do some Z3 look like. Let's invent the syntax we'd like to use first, and then think about how it may actually be made to work, rather than the other way around. At least for me, AT is just about making things convenient to use for the "end developer". :) Martin ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642