Re: [Zope3-Users] Zope3-3.1.0c1.tgz OpenBSD 3.7

2005-08-12 Thread Philippe Nenert
On Mer 10 août 2005 13:43, Benji York a écrit :
 Philippe Nenert wrote:

 /usr/local/src/Zope-3.10c1$ make check [pas ok, i dont now the command
 to
 create a log file blabla 2fic.log don't walk. Message : [...]
 ImportError: No module named interfaces [...] and so one]

 ...except for this.  Can you give us some more information on this one
 failure?

1) i want make a error.log file, but the command make check 2 error.log
don't work
2) i explain my command
root mode
/#   cd /usr/local/src/Zope-3.10c1
/usr/local/src/Zope-3.10c1#   make check   [i'm readind the doc and try it]

You can see the firt ligne of the log :

make check
/usr/local/bin/python install.py -q build
/usr/local/bin/python test.py -v
Running UNIT tests at level 1
Running UNIT tests from
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3
not a package
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/app/introspector/tests
not a package
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/documenttemplate/tests


Error in test Invalid Test (zope.app.apidoc.codemodule.browser.tests)
Traceback (most recent call last):
  File
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/app/testing/test.py,
line 616, in get_suite
return mod.test_suite()
  File
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/app/apidoc/codemodule/browser/tests.py,
line 110, in test_suite
optionflags=doctest.NORMALIZE_WHITESPACE),
  File
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/testing/doctest.py,
line 2450, in DocFileSuite
suite.addTest(DocFileTest(path, **kw))
  File
/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/testing/doctest.py,
line 2382, in DocFileTest
doc = open(path).read()
IOError: [Errno 2] No such file or directory:
'/usr/local/src/Zope-3.1.0c1/build/lib.openbsd-3.7-i386-2.3/zope/app/apidoc/codemodule/browser/README.txt'

Thanks for you'r help
Philippe

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Dominik Huber

Hi James
A few other thoughts...

James Allwyn wrote:


I would appreciate any guidance on what the
recommended Zope3-ish way of handling this would be. I
feel the options are either to create a generic
IProperty object, and subclass it to IHouse,
ICateredHall, ISelfCateredHall, IHomeStay, or
whatever, which each add extra features or
constraints; or to go down some sort of adapter route.
 

Your question points out the general problematic the implementation 
decision between classification and composition. Zope 3 has the power to 
reduce an object to its *pure* identity and implement all further 
functionality by adapters and annotated objects (see 
zope.app.annotation). This possibility allows you to build objects 
heavily throu composition. In extreme case the classification aspect is 
*only* used to determine the adapter lookups and other registration aspects.


Therefore it will be usefull to use interfaces to build the above 
classification, but - and that's very important - that does not mean 
that you transfer this classification directly to your deeper 
implementation (classes), but you could use *pure* marker interfaces for 
that classification purpose too. Those pure marker interfaces could mark 
instances of a generic object implementation [1].


You could use a generic Property instance that is directly 
classified/typed by a marker (see zope.interface.directlyProvides), for 
example ICateredHall. You can add further funcitonality  by adapters 
registered to ICanteredHall and you could 'emulate' inheritance 
registering general adapters to super-marker-interfaces such as 
IProperty and dedicated adapters to the sub-marker-interfaces like 
ICateredHall.


To follow this pattern it is nessesary to simplify the composition 
handling of the generic Property in such a way that it becomes easy to 
implement new adapters and the corresponding delegated objects 
(composite). The IProperty interface should reflect the API to 
handle/access the stuff like washing machine, mircowave etc. (compositon 
of delegated objects). In other words a simple attribution of the 
delegated objects which allows validation and should be fairly 
extentable [2].



Regarding the Adapters route, in his book Phillip
gives an analogy of Interfaces as a contract that an
object uses to promise its functionality. If an
Interface promises that an object will have a given
method, does it have to provide it directly, or can it
use an adapter to provide it?
 


If an object promises it provides an interface it has to do so directly, but 
*it can also promises an adapter to an interface* (for example 
zope.app.annotation.IAttributeAnnotable promisses an IAnnotations adapter).

Regards,
Dominik

PS: We try to follow such a generic approach within tiks. Our 
implementation abstraction
unit is IComponent where such a component could be an ISystem or an 
IElement (Nested v.. atomic). Each IComponent represents a *logical* 
information cluster or system [3]. A concrete instance consists of a 
generic container which is marked by a domain-specific type-marker. The 
type-marker determines the hierarchical specific attribution-namespace 
called delegations [4].  Alll delegated composites live there and can be 
accessed by a general IDelegations-API .Result: Programming gets pretty 
modular and extendable, but the abstraction and generalisation hurts the 
brain and slows down the understanding/communication ;)


[1] Example implementation which accounts this problem: tiks.typing 
[svn://svn.tiks.org/repos/Tiks/trunk/src/tiks/typing] there we follow 
such an approach. It a little framework to use generic implementation 
that get classified or typed by an marker interface only


[2] Example implementation which accounts this problem: tiks.attribution 
[svn://svn.tiks.org/repos/Tiks/trunk/src/tiks/attribution] there we 
provide hierarchical namespaces (Attribution). A namespace  is 
determined by a attribution schema which allows to map dotted-names to 
an interface that should be required for an object referenced by the 
given name.


[3] tiks.system [svn://svn.tiks.org/repos/Tiks/trunk/src/tiks/system]

[4] tiks.delegation 
[svn://svn.tiks.org/repos/Tiks/trunk/src/tiks/delegation]


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Stephan Richter
On Friday 12 August 2005 04:20, Dominik Huber wrote:
 Your question points out the general problematic the implementation
 decision between classification and composition. Zope 3 has the power to
 reduce an object to its *pure* identity and implement all further
 functionality by adapters and annotated objects (see
 zope.app.annotation). This possibility allows you to build objects
 heavily throu composition. In extreme case the classification aspect is
 *only* used to determine the adapter lookups and other registration
 aspects.

 Therefore it will be usefull to use interfaces to build the above
 classification, but - and that's very important - that does not mean
 that you transfer this classification directly to your deeper
 implementation (classes), but you could use *pure* marker interfaces for
 that classification purpose too. Those pure marker interfaces could mark
 instances of a generic object implementation [1].

Right, I know you follow this approach with Tiks and it is probably a good 
approach for CMSs, where everything depends on the behavior in the system, 
but for regular applications its bogus. I really expect my core objects to 
have a core functionality.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Stephan Richter
On Thursday 11 August 2005 06:36, James Allwyn wrote:
 If so, I guess we will be building an adapter along
 similar lines to the size adapter both Stephan and
 Phillip use as an example in their books - maybe
 create an IRating interface, and create adapters for
 each of the sub-classes to adapt those to IRating?

Yep.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users