Re: [Zope-dev] To ZCML or not ;-)

2005-04-20 Thread Chris Withers
Stephan Richter wrote:
Can you be more specific? I think ZCML is very compact.
Well, I'm hoping to take a proper look at the latest Z3 "some time 
soon", so I'll let you know after that and shut up on the subject in the 
meantime ;-)

cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-20 Thread Chris Withers
Martijn Faassen wrote:
Anyway, while I have my criticisms of ZCML, too much typing is really 
not very important in my list. You can get it somewhat shorter, I'm 
sure, but not *that* much shorter. I'd worry more about the reading part 
than the writing.
More typing = more reading in my books, so I guess we're in agreement ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Martijn Faassen
Lennart Regebro wrote:
[snip]
For me, the main drawback with ZCML is that WingIDE doesn't to auto
completion on it. ;) An ZCML editor that automatically popped up a
list of the supported keywords for every statement would be really
nice. :-p
Actually emacs + nxml + the Relax NG schema (unfortunately out of date; 
it should be autogenerated from the code) for ZCML does that.

A benefit of using an XML format is that many editors will happily
both do syntax high-lighting, some sort of auto-indentation, and
automatic commenting/uncommenting. A non-standard syntax wouldn't do
that.
Yup, and if you use some XML editor (or an XML editor extension for your 
favorite editor) it can do quite sophisticated schema-driven stuff.

Regards,
Martijn
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Lennart Regebro
On Apr 8, 2005 3:09 PM, Stephan Richter <[EMAIL PROTECTED]> wrote:
> On Friday 08 April 2005 07:34, Lennart Regebro wrote:
> > For me, the main drawback with ZCML is that WingIDE doesn't to auto
> > completion on it. ;) An ZCML editor that automatically popped up a
> > list of the supported keywords for every statement would be really
> > nice. :-p:
> 
> Yeah, I talked to Stephan and John about that already. Using Wing's new plugin
> architecture, it should be possible to insert such functionality. Another
> good application for the plugin system would be the recognition of interfaces
> by showing the interface documentation of a class implementing a certain
> interface.

Cool, that's good news. I won't have time to do it for the forseeable
future though...

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Stephan Richter
On Friday 08 April 2005 07:34, Lennart Regebro wrote:
> For me, the main drawback with ZCML is that WingIDE doesn't to auto
> completion on it. ;) An ZCML editor that automatically popped up a
> list of the supported keywords for every statement would be really
> nice. :-p:

Yeah, I talked to Stephan and John about that already. Using Wing's new plugin 
architecture, it should be possible to insert such functionality. Another 
good application for the plugin system would be the recognition of interfaces 
by showing the interface documentation of a class implementing a certain 
interface.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Stephan Richter
On Friday 08 April 2005 03:24, Chris Withers wrote:
> Yes, this is all stuff I know and love about Z3 ;-);-) When I last saw
> ZCML, it was horrible though. I don't mind XML, just not if it lots of
> pointless typing...

Can you be more specific? I think ZCML is very compact.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Jim Fulton
Lennart Regebro wrote:
On Apr 8, 2005 12:54 PM, Martijn Faassen <[EMAIL PROTECTED]> wrote:
...
A benefit of using an XML format is that many editors will happily
both do syntax high-lighting, some sort of auto-indentation, and
automatic commenting/uncommenting. A non-standard syntax wouldn't do
that.
Speaking of which, a nice little project for someone would be
to write a generator to generate RelaxNG schemas from ZCML
meta configuration.  Then XML editors could provide more help with
the editing, possibly including hings like autocompletion.
This should be a realtively easy task in that apidoc already has
code for extracting documentation from meta configuration.
Jim
--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Lennart Regebro
On Apr 8, 2005 12:54 PM, Martijn Faassen <[EMAIL PROTECTED]> wrote:
> Chris Withers wrote:
> > Lennart Regebro wrote:
> >
> >> You know the feeling when a third party product has the wrong
> >> permission or no permission at all on something? What are you gonna
> >> do? Subclass: Lots of work. Patch: You gotta keep it updated. With
> >> ZCML, you override it. TADA!
> >
> >
> > Yes, this is all stuff I know and love about Z3 ;-) When I last saw
> > ZCML, it was horrible though. I don't mind XML, just not if it lots of
> > pointless typing...
> >
> > Jim suggests that ZCML has got better, I hope so, in which case I won't
> > have to write an alternative that uses the same underlying
> > infrastructure :-D
> 
> Since ZML is XML, creating a less verbose language may be easier to
> accomplish by actually *using* the XML infrastructure, and translating
> your language to ZCML.
> 
> Anyway, while I have my criticisms of ZCML, too much typing is really
> not very important in my list. You can get it somewhat shorter, I'm
> sure, but not *that* much shorter. I'd worry more about the reading part
> than the writing.

Yeah, I mean:



   



Is not significantly shorter than:

something/something:
   foo=bar
   frotz=fnyppel

   fingal/ohlsson:
  bitbucket=buccaneer

Which would be really a minimal/shortest way to write it.
   
For me, the main drawback with ZCML is that WingIDE doesn't to auto
completion on it. ;) An ZCML editor that automatically popped up a
list of the supported keywords for every statement would be really
nice. :-p

A benefit of using an XML format is that many editors will happily
both do syntax high-lighting, some sort of auto-indentation, and
automatic commenting/uncommenting. A non-standard syntax wouldn't do
that.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Martijn Faassen
Chris Withers wrote:
Lennart Regebro wrote:
You know the feeling when a third party product has the wrong
permission or no permission at all on something? What are you gonna
do? Subclass: Lots of work. Patch: You gotta keep it updated. With
ZCML, you override it. TADA!

Yes, this is all stuff I know and love about Z3 ;-) When I last saw 
ZCML, it was horrible though. I don't mind XML, just not if it lots of 
pointless typing...

Jim suggests that ZCML has got better, I hope so, in which case I won't 
have to write an alternative that uses the same underlying 
infrastructure :-D
Since ZML is XML, creating a less verbose language may be easier to 
accomplish by actually *using* the XML infrastructure, and translating 
your language to ZCML.

Anyway, while I have my criticisms of ZCML, too much typing is really 
not very important in my list. You can get it somewhat shorter, I'm 
sure, but not *that* much shorter. I'd worry more about the reading part 
than the writing.

Regards,
Martijn
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-08 Thread Chris Withers
Lennart Regebro wrote:
You know the feeling when a third party product has the wrong
permission or no permission at all on something? What are you gonna
do? Subclass: Lots of work. Patch: You gotta keep it updated. With
ZCML, you override it. TADA!
Yes, this is all stuff I know and love about Z3 ;-) When I last saw 
ZCML, it was horrible though. I don't mind XML, just not if it lots of 
pointless typing...

Jim suggests that ZCML has got better, I hope so, in which case I won't 
have to write an alternative that uses the same underlying 
infrastructure :-D

cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-07 Thread Lennart Regebro
Richard Jones wrote:
> 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.

ZCML started out for me (and as an experinced zope2 programmer I guess
the experience may not be that unusual) as "ooh, my, lots to learn,
why is it that complex"? Then it becames "oh, it's a consistent way of
doing all those thinks that weren't very pythonic, like defining page
templates", and then finally I grasped it with "ah, it's really the
best parts of aspect orientation; you make all these separate modules,
and you tie them together with ZCML!"

Like XML or not, the approach of moving this type of meta-information
to ZCML rocks.

You know the feeling when a third party product has the wrong
permission or no permission at all on something? What are you gonna
do? Subclass: Lots of work. Patch: You gotta keep it updated. With
ZCML, you override it. TADA!
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] To ZCML or not ;-)

2005-04-07 Thread Jim Fulton
Chris Withers wrote:
Richard Jones wrote:
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.

Am I right in thinking that the XML part of ZCML is layered over python 
functionality underneath? If so, how hard would it be to provide an
alternative to the baroque XML? - the bit of ZCML I don't like ;-)
It's is theoretically possible, but not really worth the effort.
I'll note that ZCML has gotten progressively simpler over the years.
It continues to get simpler.  For example, now that we we can say more
about adapters in Python, a typical adapter registration looks like:
  
Also, for various reasons, ZCML took on implementation capabilities.
We're looking at ways to move that implementation capability
back into Python, where it belongs, which will make page definition
easier.  I expect that page definitions in the future will look more
like:
  
Jim
--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )