[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-dev
Subject:    Re: [Zope-dev] Utility factory handling for zope.component
From:       Wichert Akkerman <wichert () wiggy ! net>
Date:       2008-07-23 15:29:25
Message-ID: 48874E55.2030006 () wiggy ! net
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Stephan Richter wrote:
> On Wednesday 23 July 2008, Wichert Akkerman wrote:
>    
>> If there are no objections I intend to merge the branch to trunk in a
>> few days
>>      
>
> I am uncomfortable with the way you approached this. I think there are at
> least two other possibilities that I can see without having looked closer:
>
> 1. Use the info object. The point of the info is to contain this sort of
> information.
>    

Which info object are you referring to? The only information I could see 
for utility registration is a tuple, not an object. This is used to 
build the UtilityRegistration object when querying registration 
information, and I added a factory method there.

> 2. Make the component have a "factory" attribute. I have done this at some
> places for APIDOC as well.
>    

Why would a component need to know how it was created? I can envision 
that a component may very well have an attribute named factory for 
something else entirely.

Wichert.

-- 
Wichert Akkerman<wichert@wiggy.net>    It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Stephan Richter wrote:
<blockquote cite="mid:200807230824.21122.srichter@cosmos.phy.tufts.edu"
 type="cite">
  <pre wrap="">On Wednesday 23 July 2008, Wichert Akkerman wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">If there are no objections I intend to merge the branch to trunk in \
a few days
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I am uncomfortable with the way you approached this. I think there are at 
least two other possibilities that I can see without having looked closer:

1. Use the info object. The point of the info is to contain this sort of 
information.
  </pre>
</blockquote>
<br>
Which info object are you referring to? The only information I could
see for utility registration is a tuple, not an object. This is used to
build the UtilityRegistration object when querying registration
information, and I added a factory method there.<br>
<br>
<blockquote cite="mid:200807230824.21122.srichter@cosmos.phy.tufts.edu"
 type="cite">
  <pre wrap="">2. Make the component have a "factory" attribute. I have done this at \
some  places for APIDOC as well.
  </pre>
</blockquote>
<br>
Why would a component need to know how it was created? I can envision
that a component may very well have an attribute named factory for
something else entirely. <br>
<br>
Wichert.<br>
<br>
<pre class="moz-signature" cols="72">-- 
Wichert Akkerman <a class="moz-txt-link-rfc2396E" \
href="mailto:wichert@wiggy.net">&lt;wichert@wiggy.net&gt;</a>   It is simple to make \
things. <a class="moz-txt-link-freetext" \
href="http://www.wiggy.net/">http://www.wiggy.net/</a>                  It is hard to \
make things simple. </pre>
</body>
</html>



_______________________________________________
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 )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic