Re: [Zope3-dev] Re: Zope Configuration Processing and Side Effects

2006-10-22 Thread Jim Fulton

Philipp von Weitershausen wrote:

Jim Fulton wrote:

At:

  http://dev.zope.org/Zope3/ZopeConfigurationProcessingAndSideEffects

I've written an informational proposal stating the goal for
eliminating side effects, other than import, during the first phase
of configuration processing and generally minimizing first phase
processing. This will lead toward refactoring most existing
configuration directives.

I don't expect this to be controversial, but comments are welcome.


You only mention one example for side effects (putting a global object 
into a module and using them later), so I presume that the refactorings 
will mainly be targeting this case.


This is really the only case (other than import) that I can think of.
I may be forgetting something.

Note that I also proposed moving as much processing into actions as
possible, to avoid doing unnecessary work when actions are discarded.

Do you already have specific plans on how to move the path 
resolving/validating into the handlers,


I don't plan to move it into handlers.  I plan t move it into
actions. :)

But you raise a good point.  We were able to simplify handler
implementation using schemas to do much error checking upstream
of handlers.  Now, by actually moving this downstream into the
actions, we'll end up putting more work on handler/action
implementors.  This is a downside of the proposal.

I'll note:

1. When we made ZCML use schemas for upstream validation, we
   made it *much* slower, so this was a mixed blessing.

2. Making it much easier to implement configuration handlers and
   actions is important when there are many different handlers and
   actions.  This was true when we moved to schema-based
   configuration but now many of us would like to see a smaller
   selection of configuration options.

Note that we could probably provide some helper functions that provide
a similar level of automation downstream.  For example, something like:

  def importGlobal(id, info):
  Try to import a global object for the given identifier

  On success, the imported object is returned.  On failure,
  an exception is raised that includes information from the passed
  configuration info object, such as configuration file name and
  line number.
  

 and how to provide backward compatibility for 3rd-party directives?

I don't anticipate doing anything to break old directives, so I
don't see a backward compatibility issue.


Right now the proposal is quite  high-level...


Yes, that's true.  That's because it simply states a goal. It also
proposes that some specific directives be reworked, which should serve
to highlight issues/problems if any.

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
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: Zope Configuration Processing and Side Effects

2006-10-22 Thread Philipp von Weitershausen

Jim Fulton wrote:

At:

  http://dev.zope.org/Zope3/ZopeConfigurationProcessingAndSideEffects

I've written an informational proposal stating the goal for
eliminating side effects, other than import, during the first phase
of configuration processing and generally minimizing first phase
processing. This will lead toward refactoring most existing
configuration directives.

I don't expect this to be controversial, but comments are welcome.


You only mention one example for side effects (putting a global object 
into a module and using them later), so I presume that the refactorings 
will mainly be targeting this case.


Do you already have specific plans on how to move the path 
resolving/validating into the handlers, and how to provide backward 
compatibility for 3rd-party directives? Right now the proposal is quite 
high-level...


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



Re: [Zope3-dev] Re: Zope Configuration Processing and Side Effects

2006-10-22 Thread Stephan Richter
On Sunday 22 October 2006 14:21, Jim Fulton wrote:
 2. Making it much easier to implement configuration handlers and
     actions is important when there are many different handlers and
     actions.  This was true when we moved to schema-based
     configuration but now many of us would like to see a smaller
     selection of configuration options.

I think the desire to have a smaller set of configuration options is due to 
the fact that a lot of teams work pretty much in a Python developer 
environment.

In the two projects I am involved in, there is a desire to develop high-level 
configuration directives to allow another audience to do customization and 
integration. Zope 3 Developers (be it core Python or template integration 
developers) are a real scarce at this point, so we need to find solutions to 
make other developers productive without them knowing the dirt about Zope 3.

Thus, I would really hate to see ZCML directive creation to become more 
difficult. But then, you (Jim) said that you want to be BBB, so I am not 
worried.

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] Re: Zope Configuration Processing and Side Effects

2006-10-21 Thread Simon Michael

Baiju M wrote:

I have added this page to new wiki:
http://zope3.zwiki.org/ZopeConfigurationProcessingAndSideEffects

Also updated the index, http://zope3.zwiki.org/Zope3Proposals


Thank you, Baiju.



Let's use new wiki now onwards.  Sooner or later this will be wiki.zope.org
We have to make current wiki read only very soon.


How do you feel about this folks ? I'd like to make the old zope 3 wiki 
read-only and activate the subscriptions on the new one. A small but good 
step forward from the present situation of two identical writable wikis.


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



Re: [Zope3-dev] Re: Zope Configuration Processing and Side Effects

2006-10-21 Thread Benji York

Simon Michael wrote:

Baiju M wrote:

Let's use new wiki now onwards.  Sooner or later this will be wiki.zope.org
We have to make current wiki read only very soon.


How do you feel about this folks ? I'd like to make the old zope 3 wiki 
read-only and activate the subscriptions on the new one.


+1
--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: Zope Configuration Processing and Side Effects

2006-10-21 Thread Fred Drake

On 10/21/06, Simon Michael [EMAIL PROTECTED] wrote:

How do you feel about this folks ? I'd like to make the old zope 3 wiki
read-only and activate the subscriptions on the new one. A small but good
step forward from the present situation of two identical writable wikis.


The new wiki is much nicer to work with; thanks, Simon!


 -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Every sin is the result of a collaboration. --Lucius Annaeus Seneca
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com