-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 7 Apr 2005 02:49 am, Jim Fulton wrote:
Paul Winkler wrote:
i.e. will I still write:
security.declareProtected(SomePermission, 'foo') def foo(self): ...
That will work, and I don't see a need to deprecate it. Eventually, though, I expect products to migrate to ZCML-based security declarations.
Is this a general trend for Zope 2? I'd rather see Zope 2 kinda avoid ZCML if possible. It's just one of those personal preference things, I suppose, but I know I'm not the only one who isn't that enamored of the ZCML approach. I actually like having the declarations all in the python code like it is in Zope 2.
As I said, I don't see a need to deprecate the Zope 2 style in this case. I think that most people who've tried it find they prefer having the security declarations separate. This is more compelling for Zope 3 code, which tends to have less Zope-isms to begin with,
I'd like to see the declarative style that Zope 2 move to using decorators. I was sitting in a presentation at PyCon talking about MetaClasses, and I finally *got* them. I realised that the security declarations in Zope 2 are a perfect fit for metaclasses and decorators. If only I had the time to actually implement this dream ;)
I don't see any use for metaclasses in making security declarations.
For me, metaclasses (like proxies) are deep and powerful magic that should only be used when they are realy needed.
Note that this all comes from the perspective of someone whose only exposure to Zope 3 has been through two sprints. I've not actually tried to develop any sort of application using it. My day job is very firmly fixed in Zope 2, and isn't likely to change for a long time. So I'm definitely speaking from ignorance of real-world application development in Zope 3.
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce