Re: [Zope-dev] ZCA summary so far...
On Dec 3, 2009, at 1:54 AM, Chris McDonough wrote: > My $.02 is here: > > http://www.plope.com/Members/chrism/zca_thoughts_summary I was going to comment on your blog, even though it was separate from the mailing list, but then I couldn't register an account, so here I am. I agree with a decent chunk of what you say. I guess my experiences working with new and casual ZCA users in Launchpad are somewhat similar to your BFG experiences. I'm very interested in working on changes in the underlying registry. Like you (I think), I'd also like to support the ability for using classes and abcs for specs. I have some work in that direction. I also want a better debugging API, which I have also investigated. We might disagree on the specifics, but it sounds like we're similar in broad desires there. I also agree with many of your perceptions of what we have: the experimental package I have started that subsumes the jobs of zope.interface and zope.component is called "pluggable," which echoes one of your points. I don't think replacing these packages is a practical way forward, but it helps me think and imagine. I think that moving forward might be easiest to do by making the adapter registry pluggable in zope.interface and zope.component, and working on this in another package.At that point, interested users of zope.interface and zope.component could choose to use our registry (and perhaps it might evolve to become the "blessed" registry at some point); and we could provide alternative ways of using the package, separate from zope.component and zope.interface. We should collaborate. In my "copious spare time" I would like to call you and see if you and I can at least agree on some experiments in this direction. I'd like it if my work had some chance of uptake in BFG. I personally think these efforts do not make the potential consensus on ``adapt`` and ``utility`` methods any less interesting: they would be a concrete win for my users. Gary ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCA summary so far...
Hey, Thanks for doing this summary! Gary Poster wrote: [snip] > == Utilities available from interfaces == > > As far as I can tell, no one is against this generally, and several > people are for it. Some people are against the syntax that has been > proposed for this that merges utilties and adapters (see "No > consensus" section below). An alternate syntax was proposed > involving a ``utility`` callable. This made the most sense when it > was paired with an ``adapters`` (or ``factory`` or ``new`` or > ``instance`` or ``create``) callable, which contradicts the consensus > of the "tuple multi-adaptation" section above. It's clear that a unification of adaptation and utility lookup in the API as I discussed is going much too far for many people. So I've given up on that. (we can always take it up again in some other context in the future) Regards, Martijn ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZCA summary so far...
My $.02 is here: http://www.plope.com/Members/chrism/zca_thoughts_summary Gary Poster wrote: > ...from my perspective. > > = Things vaguely approaching consensus = > > == General == > > There's a consensus that changes to the ZCA need to be backwards compatible. > The practical definition of that varies for different people. > > == Syntactic == > > === Tuple multi-adaptation === > > Example: > IFoo((bar, baz)) == z.c.getMultiAdapter((bar, baz), IFoo) > > - It has the most consensus of any proposed change so far. > > - It is concerning because it breaks backwards compatibility in two real > world use cases from the very small set of Zope users who actually watch > zope-dev. There is a workaround spelling at least, but it is ugly (i.e., > what was ``IFoo((bar, baz))`` will need to become ``IFoo(((bar, baz),))``). > > - It is easier to remember than ``z.c.getMultiAdapter((bar, baz), IFoo)`` (I > always have to look up the order of arguments for getMultiAdapter myself) but > not as easy to remember as ``IFoo(bar, baz)``. It introduces yet another > spelling of the same thing (e.g., ``IFoo(bar)`` is the same as > ``IFoo((bar,))``. > > == Utilities available from interfaces == > > As far as I can tell, no one is against this generally, and several people > are for it. Some people are against the syntax that has been proposed for > this that merges utilties and adapters (see "No consensus" section below). > An alternate syntax was proposed involving a ``utility`` callable. This made > the most sense when it was paired with an ``adapters`` (or ``factory`` or > ``new`` or ``instance`` or ``create``) callable, which contradicts the > consensus of the "tuple multi-adaptation" section above. > > > > = No consensus AFAICT = > > - Utilities and adapters should be merged. > > - We care significantly about new and casual users and perceive that the > current API does not serve them well. > > - Adapters are usually used as factories, and utilities are used as > instances, and it is valuable to present them that way. Related: the term > "adapter" buys us little and costs us more than nothing among new and casual > users. > > > > = Rejected = > > - Utilities should be called singletons. > > > ___ > Zope-Dev maillist - Zope-Dev@zope.org > https://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] ZCA summary so far...
...from my perspective. = Things vaguely approaching consensus = == General == There's a consensus that changes to the ZCA need to be backwards compatible. The practical definition of that varies for different people. == Syntactic == === Tuple multi-adaptation === Example: IFoo((bar, baz)) == z.c.getMultiAdapter((bar, baz), IFoo) - It has the most consensus of any proposed change so far. - It is concerning because it breaks backwards compatibility in two real world use cases from the very small set of Zope users who actually watch zope-dev. There is a workaround spelling at least, but it is ugly (i.e., what was ``IFoo((bar, baz))`` will need to become ``IFoo(((bar, baz),))``). - It is easier to remember than ``z.c.getMultiAdapter((bar, baz), IFoo)`` (I always have to look up the order of arguments for getMultiAdapter myself) but not as easy to remember as ``IFoo(bar, baz)``. It introduces yet another spelling of the same thing (e.g., ``IFoo(bar)`` is the same as ``IFoo((bar,))``. == Utilities available from interfaces == As far as I can tell, no one is against this generally, and several people are for it. Some people are against the syntax that has been proposed for this that merges utilties and adapters (see "No consensus" section below). An alternate syntax was proposed involving a ``utility`` callable. This made the most sense when it was paired with an ``adapters`` (or ``factory`` or ``new`` or ``instance`` or ``create``) callable, which contradicts the consensus of the "tuple multi-adaptation" section above. = No consensus AFAICT = - Utilities and adapters should be merged. - We care significantly about new and casual users and perceive that the current API does not serve them well. - Adapters are usually used as factories, and utilities are used as instances, and it is valuable to present them that way. Related: the term "adapter" buys us little and costs us more than nothing among new and casual users. = Rejected = - Utilities should be called singletons. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )