Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Chris Withers
Shane Hathaway wrote: FWIW, I still hate ZCML for the following reasons: Everyone seems to agree on the direction suggested here: http://www.z3lab.org/sections/blogs/philipp-weitershausen/2005_12_14_zcml-needs-to-do-less Indeed, while I strongly agree with all of this, I think it's

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Dario Lopez-Kästen
Andreas Jung wrote: --On 23. Januar 2006 15:22:27 -0500 Andrew Sawyers [EMAIL PROTECTED] wrote: On Mon, 2006-01-23 at 18:51 +0100, Andreas Jung wrote: This separation is artificial. I've never seen a single Zope installation where a system administrator had to care about Zope

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Martijn Faassen
Andrew Sawyers wrote: 1. On Mon, 2006-01-23 at 18:29 +0100, Martijn Faassen wrote: [snip] And the intended audience of ZCML is a very different audience - developers versus sysadmins. I'd have to say, I belived quite the opposite. There are specific references to Admins being part of

Re: [Zope3-dev] RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Chris Withers
Fred Drake wrote: On 1/21/06, Jim Fulton [EMAIL PROTECTED] wrote: are really attributes of foo. In ZCML, this might have been: foo x=1 y=2 / Except this breaks down in the case of ZConfig multikey elements, which allow configuration like this: foo x = 1 x = 2

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Chris Withers
Martin Aspeli wrote: No, I heard you the first time. But whilst zope.conf has been around for ages, it has not been used for the purpose that ZCML is now used. Really? I thought ZCML was used for configuration of a web application/server. .conf has been used exactly that with Apache for a

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Chris Withers
Martin Aspeli wrote: Except ZConfig on/off switches are very easy to understand just by reading the zope.conf file. That doesn't mean that same syntax would make managing something as complex as the type of wiring ZCML is currently used for any clearer, though. No, but that's the realm of

[Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Chris Withers
Max M wrote: Personally I abhor these configuration languages. I can never figure out what all the options are, and I allways suspect that I am missing something clever in some undocumented cornercase somewhere. Well, ZCML is already self documenting, as far as I can see. Zope.conf would

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Sidnei da Silva
On Tue, Jan 24, 2006 at 10:13:33AM +, Chris Withers wrote: | Zope 3 then introduced ZCML, which | no other web server on the planet uses ;-) I think you are mistaken. If ZCML is a variant of XML, then Zope 3 is not alone. I've been told that IIS 7 does use XML for it's configuration. --

Re: [Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Chris Withers
Martijn Faassen wrote: Sure, but it's not my point. I don't think sysadmins, familiar with Apache configuration syntax, are the audience for ZCML. Developers are. Therefore, an important benefit of ZConfig syntax, familiarity from Apache, goes away in case of ZCML. Well, I can only speak for

Re: [Zope3-dev] ZCML bad ;-)

2006-01-24 Thread Chris Withers
Stephan Richter wrote: I'll note that I commonly make browser the default namespace in browser packages. And _I'll_ note that it's one of the things in your book that threw me... I had to do a double take to figure out where all these new directives had come from when I eventually noticed

Re: [Zope3-dev] ZCML bad ;-)

2006-01-24 Thread Fred Drake
On 1/24/06, Chris Withers [EMAIL PROTECTED] wrote: I find it irksome to have to type them at the top of ever file. Is there no way that they could be pre-bound in the XML parser? That way you'd only need to inlcude them if you wanted to rebind them... Even if we could avoid it at a technical

[Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Philipp von Weitershausen
Fred Drake wrote: I find it irksome to have to type them at the top of ever file. Is there no way that they could be pre-bound in the XML parser? That way you'd only need to inlcude them if you wanted to rebind them... Even if we could avoid it at a technical level, it means that what we're

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread cstrong
Shane Hathaway wrote: Philipp von Weitershausen wrote: However, I think one namespace for ZCML is enough. +1 Big +1 to all of Philipp's suggestions. context I have a fair amount of experience with Zope2 and am learning Zope3...but with half an eye at Ruby on Rails and Spring/Hibernate. I

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Fred Drake
On 1/24/06, Chris Withers [EMAIL PROTECTED] wrote: Shane Hathaway wrote: Philipp von Weitershausen wrote: However, I think one namespace for ZCML is enough. Are you sure? Perhaps it's reasonable to use a single namespace for all the ZCML directives defined as part of the Zope 3 release.

[Zope3-dev] zope.schema: defaults for non-immutables... questions

2006-01-24 Thread Shaun Cutts
It would seem that the current default mechanism is poorly suited to providing default values for non-immutables. For example: class IBar( Interface ): a = Object( schema = IFoo, default = Foo() ) But if a Foo is not immutable this doesnt make sense. (In my case, I want a to be

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread cstrong
That's a fair question. context This is a pattern I have learned by using Docbook 5.0, which is another one of those _lets_rewrite_an_established_technology_to_address_longstanding_issues_ releases. Norm uses the RelaxNG annotations namespace[1]. I like the design principle RelaxNG uses for

Re: [Zope3-dev] zope.schema: defaults for non-immutables... questions

2006-01-24 Thread Shane Hathaway
Shaun Cutts wrote: It would seem that the current default mechanism is poorly suited to providing default values for non-immutables. For example: Mutable is a better way to say non-immutable. :-) class IBar( Interface ): a = Object( schema = IFoo, default = Foo() ) But if a “Foo” is

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Gary Poster
On Jan 24, 2006, at 12:22 PM, Shane Hathaway wrote: Fred Drake wrote: On 1/24/06, Chris Withers [EMAIL PROTECTED] wrote: Shane Hathaway wrote: Philipp von Weitershausen wrote: However, I think one namespace for ZCML is enough. Are you sure? Perhaps it's reasonable to use a single

Re: [Zope3-dev] ZCML bad ;-)

2006-01-24 Thread Jeff Shell
On 1/24/06, Chris Withers [EMAIL PROTECTED] wrote: Gary Poster wrote: FWIW, me too. I'm no XML guru (as Fred will attest ;-) ) but reading the namespaces on an XML file seems like basic XML procedure. Well, the reading of them is the lesser of my two complaints... I find it irksome to

RE: [Zope3-dev] zope.schema: defaults for non-immutables... questions

2006-01-24 Thread Shaun Cutts
Shane, I considered 'default_factory' myself It seems good, but it complicates the logic internally. For one thing, logically, we'd have to also have 'missing_value_default' (unless we decree that missing values have to be not-non-immutable, ah... immutable). A further thought on where to

[Zope3-dev] doctest: Get type of object

2006-01-24 Thread Florian Lindner
Hello, I'm currently writing a test in a README.txt and I want to make sure that returned object a is of type zope.app.x. How can I test that? Thanks, Florian ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub:

Re: [Zope3-dev] RFC: ZConfig and other formats for ZCML

2006-01-24 Thread ksmith99 (sent by Nabble.com)
Jim Fulton wrote: Martijn Faassen wrote: Shane Hathaway wrote: Jim Fulton wrote: See: http://dev.zope.org/Zope3/ZConfigAndOtherFormatsForZCML Comments and volunteers welcome. I like this proposal. It is likely to reduce the total amount of code. However, I want to be sure that

[Zope3-dev] Re: Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Martin Aspeli
On Tue, 24 Jan 2006 10:16:13 -, Chris Withers [EMAIL PROTECTED] wrote: Commercial development tools typically have pretty decent XML support, and if you were to write e.g. a ZCML editor as an Eclipse plug in, being able to rely on existing XML components would be much easier.

Re: [Zope3-dev] RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Dieter Maurer
Martijn Faassen wrote at 2006-1-23 18:27 +0100: ... For one, ZConfig is a syntax not very well known, even granting its similarity to the Apache configuration language, while XML is very well known. Come on: The only syntactic part of ZConfig is: there are keys with values and sections

Re: [Zope3-dev] RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Dieter Maurer
Fred Drake wrote at 2006-1-23 09:56 -0500: On 1/23/06, Chris Withers [EMAIL PROTECTED] wrote: As I said earlier, I think XML is wrong for configuration for exactly this kind of reason... element-based is right for this type of config, it's why Apache uses, it's why Zope 2 uses it, and it's why

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Shane Hathaway
Christian Lück wrote: From a lerners point of view (for example me) the thematic organization is a pro too: The z3 beginner will probably need the 'zope' and 'browser' namespaces at first. Browsing apidoc zcml namespaces lets your knowledge grow fast, because you get structured information.

Re: [Zope3-dev] doctest: Get type of object

2006-01-24 Thread Florian Lindner
Am Dienstag, 24. Januar 2006 21:07 schrieb Florian Lindner: Hello, I'm currently writing a test in a README.txt and I want to make sure that returned object a is of type zope.app.x. How can I test that? I've tried: Failed example: homeFolder #doctest: +ELLIPSIS Expected:

Re: [Zope3-dev] doctest: Get type of object

2006-01-24 Thread Tim Peters
[Florian Lindner] I've tried: Failed example: homeFolder #doctest: +ELLIPSIS Expected: zope.app.file.file.File object at ... Got nothing I've also tried it without the #doctest Why do I get just nothing? That's expected if (and only if) `homeFolder` is bound to `None`.

Re: [Zope3-dev] Deploying WSGI Apps with Zope 3.2+

2006-01-24 Thread Jim Fulton
Sidnei da Silva wrote: Hello, I'm refactoring a application developed for Zope 3.0, and in the proccess of doing that, one of the things I wanted to do is to remove some hardcoded xslt pipeline and instead use a WSGI 'middleware' or 'filter'. Cool So.. I was planning to use paste.deploy to

[Zope3-dev] Re: RFC: ZConfig and other formats for ZCML

2006-01-24 Thread Florent Guillaume
Dieter Maurer wrote: What I like with ZConfig is its schemas and especially the ability to define datatypes. I hope that similar things can be achieved with ZCML. Of course it can, ZCML is defined in terms of Zope 3 schemas. Florent -- Florent Guillaume, Nuxeo (Paris, France) Director of

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Christian Lück
Shane Hathaway wrote: Christian Lück wrote: From a lerners point of view (for example me) the thematic organization is a pro too: The z3 beginner will probably need the 'zope' and 'browser' namespaces at first. Browsing apidoc zcml namespaces lets your knowledge grow fast, because you get

Re: [Zope3-dev] Re: ZCML bad ;-)

2006-01-24 Thread Philipp von Weitershausen
Chris Withers wrote: (and if we can get it down to one, we don't have to specify it at the top of the file... yay!) Not really. Specifying no namespace at all is not the same as specifying the namespace of prefix-less elements. Even with one namespace the declaration of that namespace is still