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

List:       zope-cmf
Subject:    [Zope-CMF] Re: getToolByName depreciation, getUtility, and five.lsm
From:       Philipp von Weitershausen <philipp () weitershausen ! de>
Date:       2007-03-29 18:54:08
Message-ID: 460C0B50.2090808 () weitershausen ! de
[Download RAW message or body]

Tres Seaver wrote:
> I'm not sure what impact that would have for the already-converted code
> which used to use the API.  I can see value both in leaving it
> converted, as showing the Zope3-ish way, as well as in reverting some or
> all of it.  For instance, perhaps we should consider reverting just
> those changes which look up acquisition-dependent tools, since the call
> site has now become required to manage the wrapper itself.

I would only be comfortable doing that if we had unit tests for those 
tools that aren't acquisition-dependent. And by unit test, I mean real 
unit tests and not a ZopeTestCase. That's the only way we can really be 
sure that that a tool can function as a utility, an independent 
component, w/o acquisition.

Not knowing the codebase, I suspect that this isn't the case and suggest 
using getToolByName for all right now and adding such tests to the TODO 
list for the next CMF release.


-- 
http://worldcookery.com -- Professional Zope documentation and training

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests
[prev in list] [next in list] [prev in thread] [next in thread] 

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