[Zope3-dev] ZCML alternative
Jim Fulton
jim@zope.com
Sun, 02 Jun 2002 12:51:03 -0400
Jeff Kowalczyk wrote:
>
....
> I'd like to offer a pretty radical suggestion: Put the Zope component
> metadata attributes in prefix slots, right in the python class source.
Aaaah, no. That's one of the problems ZCML was trying to avoid, for a number
of reasons:
- We want to minimize, or eliminate changes to source to make
classes usable in Zope.
- Allow a site manager to configure how software will be used
*without* modifying the software. With your proposal, the
site manager would jave to modify the original source to
make changes.
> Have some defaults that make sense for vanilla python classes, so they
> can be used securely without modification. Use ZCML for configuration
> where attributes in the source are not desirable.
That would be pretty much everwhere.
...
> I've been using C# for 18 months now, and the declarative attributes
> work, IMHO.
I'm all in favor of adding something like this to Python and I know
Zope would make good use of it. I don't think that this would affect
the need for ZCML.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org