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 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...

It's like those damned imports in Python. Why can't everything just be
available in one big honkin' namespace automatically?

;-)

Seriously - it's not that bad. ZCML's use of namespaces is judicious,
I believe. There's no namespaced attributes - just the directives. I
too use browser: as the default namespace in my browser focused ZCML
files.

There's only one or two things to type, ever. The namespaces are easy
to remember. I can't believe it's a big deal at all. It's certainly a
case of 'explicit is better than implicit', I believe. Like with
Python code and modules and avoidance of import *, it makes all names
easily traceable.

Are you using an editor that makes it difficult to go to the top of
the file to check on the names?
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-24 Thread Chris Withers

Fred Drake wrote:

Even if we could avoid it at a technical level, it means that what
we're reading is no longer XML.  One of the desires with ZCML was to
not invent everything from scratch.  So, *if* we're using XML, we need
to use it as defined, otherwise it *isn't* XML.  


Yay.. bow down and worship the god of dead chickens...

*sulk*

and in other news...

Can anyone recommend an XML editor that lets me define certain default 
namespaces?


Failing that, anyone know how to do this in emacs?

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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 level, it means that what
we're reading is no longer XML.  One of the desires with ZCML was to
not invent everything from scratch.  So, *if* we're using XML, we need
to use it as defined, otherwise it *isn't* XML.  We're shying away
from what's invented here in favor of what's been developed in a
broader community.

An alternate syntax could of course do things differently, but
introducing an alternate syntax just means there's more than one way
to do it.  That's usually a bad idea.  Philipp's proposal cuts more to
the heart of the problems with ZCML, and they aren't syntax-specific.


  -Fred

--
Fred L. Drake, Jr.
"There is no wealth but life." --John Ruskin
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-24 Thread Chris Withers

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 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...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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 the rebound namespace 
at the top of the file...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Luciano Ramalho
On 1/19/06, Chris Withers <[EMAIL PROTECTED]> wrote:
> - the tags never have any content, that's a sign xml is the wrong solution

When the ZCML syntax was initially proposed I complained about the
fact that it abused arguments and underused nested elements. At the
time it just felt wrong but months later I realized what the real
problem is: XML provides no way to comment out attributes, only
elements. If you want to temporarily disable a certain attribute you
must remove it entirely.

Or am I missing something?

Cheers,

Luciano
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Shane Hathaway

Stephan Richter wrote:

On Monday 23 January 2006 20:56, Shane Hathaway wrote:


Chris Withers wrote:


You didn't read what I said... I assert that anyone who binds the
http://namespaces.zope.org/zope to anything other than the default
namespace, or http://namespaces.zope.org/browser to anything other than
browser: will be causing confusion for themselves an anyone else who has
to read the .zcml they've generated.


As a matter of style, I'd also prefer that the default namespace always
be http://namespaces.zope.org/zope.



I'll note that I commonly make browser the default namespace in browser 
packages.


Right.  That's what I don't like. :-)  But I'm not going to argue about it.

Shane
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Gary Poster


On Jan 23, 2006, at 10:08 PM, Stephan Richter wrote:


On Monday 23 January 2006 20:56, Shane Hathaway wrote:

Chris Withers wrote:

You didn't read what I said... I assert that anyone who binds the
http://namespaces.zope.org/zope to anything other than the default
namespace, or http://namespaces.zope.org/browser to anything  
other than
browser: will be causing confusion for themselves an anyone else  
who has

to read the .zcml they've generated.


As a matter of style, I'd also prefer that the default namespace  
always

be http://namespaces.zope.org/zope.


I'll note that I commonly make browser the default namespace in  
browser

packages.


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.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Stephan Richter
On Monday 23 January 2006 20:56, Shane Hathaway wrote:
> Chris Withers wrote:
> > You didn't read what I said... I assert that anyone who binds the
> > http://namespaces.zope.org/zope to anything other than the default
> > namespace, or http://namespaces.zope.org/browser to anything other than
> > browser: will be causing confusion for themselves an anyone else who has
> > to read the .zcml they've generated.
>
> As a matter of style, I'd also prefer that the default namespace always
> be http://namespaces.zope.org/zope.

I'll note that I commonly make browser the default namespace in browser 
packages.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Shane Hathaway

Chris Withers wrote:
You didn't read what I said... I assert that anyone who binds the 
http://namespaces.zope.org/zope to anything other than the default 
namespace, or http://namespaces.zope.org/browser to anything other than 
browser: will be causing confusion for themselves an anyone else who has 
to read the .zcml they've generated.


As a matter of style, I'd also prefer that the default namespace always 
be http://namespaces.zope.org/zope.


Shane


___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-23 Thread Chris Withers

Stephan Richter wrote:

On Thursday 19 January 2006 13:45, Chris Withers wrote:


- the tags never have any content, that's a sign xml is the wrong solution


Not true. All complex directives have sub-directives.


Well, what about the most deeply nested directive directives? And what 
about the common ones as described in your and Philipp's books? do they 
have contents? ;-)



- if anyone has or does rebind xml namespaces, it causes confusion.
having to include the namespace definitions at the top of each file is
dead chicken most of the time.


It's not a dead chicken at all. In every fairly advanced package I write I 
have at least 2, if not 3 or 4 different namespaces.


You didn't read what I said... I assert that anyone who binds the 
http://namespaces.zope.org/zope to anything other than the default 
namespace, or http://namespaces.zope.org/browser to anything other than 
browser: will be causing confusion for themselves an anyone else who has 
to read the .zcml they've generated. For me, this means I see the 
namespace declarations you have to write at the zope of _every_ .zcml 
file as dead chickens...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



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

2006-01-20 Thread Stephan Richter
On Thursday 19 January 2006 13:45, Chris Withers wrote:
> - the tags never have any content, that's a sign xml is the wrong solution

Not true. All complex directives have sub-directives.

> - if anyone has or does rebind xml namespaces, it causes confusion.
> having to include the namespace definitions at the top of each file is
> dead chicken most of the time.

It's not a dead chicken at all. In every fairly advanced package I write I 
have at least 2, if not 3 or 4 different namespaces.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] ZCML bad ;-)

2006-01-19 Thread Chris Withers

Martijn Faassen wrote:

Jim Fulton wrote:



One issue though is that I want to replace ZConfig with a ZConfig
format for zcml. (This would include making ZCML extensible to accept
any other format.) The user experience would be the same, but
extending it would be a lot easier than extensing ZConfig.  I plan to
make a proposal for this in the next few days.


Running ahead of your proposal, I wonder whether you mean using 
ZConfig's syntax to replace ZCML's syntax, or replace ZConfig's syntax 
with ZCML syntax. Both are fundamentally different approaches, but I can 
read either in what you say here. :)


FWIW, I still hate ZCML for the following reasons:

- the tags never have any content, that's a sign xml is the wrong solution

- if anyone has or does rebind xml namespaces, it causes confusion. 
having to include the namespace definitions at the top of each file is 
dead chicken most of the time.


- personally, I just find it hard to read..

I'd really like to see everything done in zope.conf-style format, I 
think this would work for all ZCML's use cases, we could even extend 
ZConfig to support "namespaces", what do people think?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com