From chrism at zope.com Tue Feb 12 22:06:11 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - Contact.zcml:1.2 README.txt:1.4
Message-ID: <200202130306.g1D36Bt17514@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv17445
Modified Files:
Contact.zcml README.txt
Log Message:
Updating Python Programmer tutorial Step 1.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/Contact.zcml 1.1 => 1.2 ===
+
-
+
-
+
+
+
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/README.txt 1.3 => 1.4 ===
In this step, we present the minimum tasks necessary to create a class
- usable in Zope.
+ usable in Zope.
The first task is to create a 'Contact' package in the Zope
- 'Products' package. Components are contained in Zope file-based
- products [1], which are simply Python packages that are sub-packages
- of the Zope 'Products' package. A package is simply a directory that
- has a Python '__init__' module. We'll create the directory and add
- the file '__init__.py'. An empty file will do four our purposes.
+ package. Components are contained in Zope file-based products [1],
+ which are simply Python packages that are intialized within the
+ 'products.zcml' XML configuration file. A package is simply a
+ directory that has a Python '__init__' module. We'll create the
+ directory and add the file '__init__.py'. An empty file will do four
+ our purposes.
We also create the file 'Contact.py' containing the class
definition. This class doesn't use *any* Zope-specific classes. The
@@ -27,36 +28,39 @@
with a Zope configuration file, 'Contact.zcml'. A Zope
configuration file is an XML [3] file that contains elements that
express configuration directives. The configuration file in this
- example includes two directives. The first directive defines a Zope
- permission. The second directive, 'zmi:provideClass', registers our
- class. The class being registered is specified with the 'name'
- attribute. The 'permission' attribute is used to specify a Zope
- permission needed for creating instances. If a permission wasn't
- specified, then contacts could not be created through the web or
- through code managed through the web. Additional attributes can be
- used to provide additional meta data, however, the meta-data is
- infered from class meta-data.
+ example includes two directives. The first directive,
+ security:protectClass protects some methods of the Contact class
+ with a predetermined Zope permission. The second directive,
+ 'zmi:provideClass', registers our class. The class being registered
+ is specified with the 'name' attribute. The 'permission_id'
+ attribute is used to specify a Zope permission needed for creating
+ instances. If a permission wasn't specified, then contacts could
+ not be created through the web or through code managed through the
+ web. The "title" attribute is used to specify the ZMI title for the
+ class in the Add list. Additional attributes can be used to provide
+ additional meta data, however, the meta-data is infered from class
+ meta-data.
In the configiration file, the class was provided using the string
- ".Contact". This bears some explanation. First, the string
- ".Contact" is an abreviation of the string:
- "Zope.Products.Contact.Contact.Contact", which is the full name of the
+ "Zope.Contact.". This bears some explanation. First, the string
+ "Zope.Contact." is an abreviation of the string:
+ "Zope.Contact.Contact.Contact", which is the full name of the
class object. The full name is a combination of the class module
- name, "Zope.Products.Contact.Contact" and the class name, "Contact". A
+ name, "Zope.Contact.Contact" and the class name, "Contact". A
full name can be abreviated using the following rules:
- If the full name begins with "Zope.Products.", then the "Zope.Products"
prefix can be omitted. A leading dot implies the 'Zope.Products'
- package.
+ package. So ".Contact" implies "Zope.Products.Contact"
- If the end of the name has repeating parts, as in
".Contact.Contact.Contact", then the repeated parts other than the
first can be omitted.
- We could have used the same mechanism to specify the permission. The
- value of the permission attribute should be either a name used in a
- 'definePermission' directive, or the name of a permission defined in
- a module.
+ We could have used the same mechanism to specify the
+ permission_id. The value of the permission_id attribute should be
+ either a name used in a 'definePermission' directive (not discussed
+ here), or the name of a permission defined in a module.
The 'zmi:provideClass' directive accomplishes two things:
@@ -69,7 +73,7 @@
An identifier for the factory is generated from the registered
class module and class name. In this case, the module is
- 'Zope.Products.Contact.Contact' and the class is
+ 'Zope.Contact.Contact' and the class is
'Contact'. Abbreviations are allowed, as in configuration
files. A different identifier could have been provided in the
'zmi:provideClass' directive.
@@ -81,14 +85,19 @@
Zope's management interface for adding objects to containers.
Simply creating the configuration file isn't enough. The
- configuration file must be copied (or linked) to a Zope 'Products'
- package directory, typically the one containing the 'Contact'
- package. Copying the configuration file makes installing components
- an explicit step by the site manager. The site manager can disable a
- product by simply removing it's configuration file from the
- 'Products' package.
+ configuration file must be mentioned (by convention) within the Zope
+ top-level 'products.zcml' file. Manipulating this configuration
+ file makes installing components an explicit step by the site
+ manager. The site manager can disable a product by simply removing
+ it's the mention of its configuration file from the 'products.zcml'
+ file.
- With this registration, contacts can be added to Zope folders.
+ Here's the entry we put in to the 'products.zcml' file in order to
+ register the Contact class::
+
+
+
+ With this registration, contacts can now be added to Zope folders.
Simply adding contacts to Zope folders is of limited usefulness. We
can't do anything with the added contacts from the Zope management
From chrism at zope.com Tue Feb 12 22:32:36 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - Contact.zcml:1.3 README.txt:1.5
Message-ID: <200202130332.g1D3WaQ24793@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv24776/Step1
Modified Files:
Contact.zcml README.txt
Log Message:
Extended to step2.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/Contact.zcml 1.2 => 1.3 ===
>
-
-
-
+
1.5 ===
usable in Zope.
- The first task is to create a 'Contact' package in the Zope
- package. Components are contained in Zope file-based products [1],
- which are simply Python packages that are intialized within the
- 'products.zcml' XML configuration file. A package is simply a
- directory that has a Python '__init__' module. We'll create the
- directory and add the file '__init__.py'. An empty file will do four
- our purposes.
+ The first task is to create a 'Contact' package in the Zope package
+ (it's in Zope3/lib/python/Zope). Components are contained in Zope
+ file-based products [1], which are simply Python packages that are
+ intialized within the 'products.zcml' XML configuration file at the
+ root of the Zope3 software home. A package is simply a directory
+ that has a Python '__init__' module. We'll create the directory and
+ add the file '__init__.py'. An empty file will do four our purposes.
We also create the file 'Contact.py' containing the class
definition. This class doesn't use *any* Zope-specific classes. The
From chrism at zope.com Tue Feb 12 22:32:36 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2 - Contact.zcml:1.2
Message-ID: <200202130332.g1D3WaK24794@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2
In directory cvs.zope.org:/tmp/cvs-serv24776/Step2
Modified Files:
Contact.zcml
Log Message:
Extended to step2.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2/Contact.zcml 1.1 => 1.2 ===
+
-
+
-
+
-
+
From chrism at zope.com Tue Feb 12 22:47:02 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - products.zcml:1.1 Contact.zcml:1.4 README.txt:1.6
Message-ID: <200202130347.g1D3l2D28464@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv27706
Modified Files:
Contact.zcml README.txt
Added Files:
products.zcml
Log Message:
Whoops, corrected the problem with definePermission and added a bit about products.zcml.
=== Added File Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/products.zcml ===
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/Contact.zcml 1.3 => 1.4 ===
>
-
+
+
+
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/README.txt 1.5 => 1.6 ===
express configuration directives. The configuration file in this
example includes two directives. The first directive,
- security:protectClass protects some methods of the Contact class
- with a predetermined Zope permission. The second directive,
- 'zmi:provideClass', registers our class. The class being registered
- is specified with the 'name' attribute. The 'permission_id'
- attribute is used to specify a Zope permission needed for creating
- instances. If a permission wasn't specified, then contacts could
- not be created through the web or through code managed through the
- web. The "title" attribute is used to specify the ZMI title for the
- class in the Add list. Additional attributes can be used to provide
+ security:permission defines a permission that we'll use for the
+ Contact product. The second directive, 'zmi:provideClass',
+ registers our class. The class being registered is specified with
+ the 'name' attribute. The 'permission_id' attribute is used to
+ specify a Zope permission needed for creating instances. If a
+ permission wasn't specified, then contacts could not be created
+ through the web or through code managed through the web. The
+ "title" attribute is used to specify the ZMI title for the class in
+ the Add list. Additional attributes can be used to provide
additional meta data, however, the meta-data is infered from class
meta-data.
@@ -49,9 +49,10 @@
name, "Zope.Contact.Contact" and the class name, "Contact". A
full name can be abreviated using the following rules:
- - If the full name begins with "Zope.Products.", then the "Zope.Products"
- prefix can be omitted. A leading dot implies the 'Zope.Products'
- package. So ".Contact" implies "Zope.Products.Contact"
+ - If the full name begins with "Zope.Products.", then the
+ "Zope.Products" prefix can be omitted. A leading dot implies the
+ 'Zope.Products' package. So, for example, ".Contact" implies
+ "Zope.Products.Contact"
- If the end of the name has repeating parts, as in
".Contact.Contact.Contact", then the repeated parts other than the
@@ -59,8 +60,8 @@
We could have used the same mechanism to specify the
permission_id. The value of the permission_id attribute should be
- either a name used in a 'definePermission' directive (not discussed
- here), or the name of a permission defined in a module.
+ either a name used in a 'security:permission' directive or the name
+ of a permission defined in a module.
The 'zmi:provideClass' directive accomplishes two things:
From chrism at zope.com Tue Feb 12 22:50:27 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - README.txt:1.7
Message-ID: <200202130350.g1D3oRM28927@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv28918
Modified Files:
README.txt
Log Message:
Added a bit about using the products.zcml in the step1 directory.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/README.txt 1.6 => 1.7 ===
+ The products.zcml file provided in the Step1 directory should be
+ copied to the Zope3 software home, or you can edit the existing
+ products.zcml file.
+
With this registration, contacts can now be added to Zope folders.
Simply adding contacts to Zope folders is of limited usefulness. We
From chrism at zope.com Tue Feb 12 22:52:30 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - Contact.zcml:1.5
Message-ID: <200202130352.g1D3qUS29931@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv29924
Modified Files:
Contact.zcml
Log Message:
Removed protectClass declaration.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/Contact.zcml 1.4 => 1.5 ===
/>
-
-
From chrism at zope.com Tue Feb 12 22:53:55 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2 - Contact.zcml:1.3
Message-ID: <200202130353.g1D3rtY30069@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2
In directory cvs.zope.org:/tmp/cvs-serv30031
Modified Files:
Contact.zcml
Log Message:
Re-added permission declaration after finding out it actually works.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2/Contact.zcml 1.2 => 1.3 ===
>
-
+
From chrism at zope.com Wed Feb 13 02:57:53 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2 - products.zcml:1.1
Message-ID: <200202130757.g1D7vrm28401@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2
In directory cvs.zope.org:/tmp/cvs-serv28382/Step2
Added Files:
products.zcml
Log Message:
Added products.zcml to Step2 and Step3, modified necessary files in Step3 to have a working component.
=== Added File Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2/products.zcml ===
From chrism at zope.com Wed Feb 13 02:57:53 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3 - products.zcml:1.1 Contact.zcml:1.2 ContactViewPresentation.py:1.2 README.txt:1.4
Message-ID: <200202130757.g1D7vrN28402@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3
In directory cvs.zope.org:/tmp/cvs-serv28382/Step3
Modified Files:
Contact.zcml ContactViewPresentation.py README.txt
Added Files:
products.zcml
Log Message:
Added products.zcml to Step2 and Step3, modified necessary files in Step3 to have a working component.
=== Added File Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3/products.zcml ===
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3/Contact.zcml 1.1 => 1.2 ===
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3/ContactViewPresentation.py 1.1 => 1.2 ===
+from Zope.PageTemplate import SimpleViewClass
from IContactInfo import IContactInfo
# Create a simple view presentation
-ContactViewPresentation = SimplePresentationClass(
- 'view.pt', applicable_for=IContactInfo)
+ContactViewPresentation = SimpleViewClass(
+ 'view.pt', used_for=IContactInfo)
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3/README.txt 1.3 => 1.4 ===
very simple, consisting of a single page, expressed as a page
template. Page templates provide a convenience functon,
- 'SimplePresentationClass' for creating a web presentation class from
+ 'SimpleViewClass' for creating a web presentation class from
a page template source file. We use this function to create our view
presentation class in the 'ContactViewPresentation' module in the
file 'ContactViewPresentation.py'. We pass the function the name of
@@ -92,7 +92,7 @@
assertion for the new presentation class. In this case, we protect a
single method, 'index', wich is used to render the presentation.
- The configuration file contains a 'browser:defaultPresentation'
+ The configuration file contains a 'browser:defaultView'
directive that registers the view presentation. The 'for' attribute
specifies the interface that the presentation applies to. By
specifying the name of the 'IContactInfo' interface, we specify that
@@ -104,7 +104,7 @@
...../aContact/view/
- The 'component' attribute specifies the name of a callable
+ The 'factory' attribute specifies the name of a callable
object that returns a presentation component when called with an
object that implements the given interface. In this case, we specify
the presentation component class. The presentation was registered as
From chrism at zope.com Wed Feb 13 14:40:50 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4 - products.zcml:1.1 Contact.zcml:1.3 ContactEditPresentation.py:1.4 ContactViewPresentation.py:1.2 IContact.py:1.2 README.txt:1.6
Message-ID: <200202131940.g1DJeoo15605@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4
In directory cvs.zope.org:/tmp/cvs-serv15582
Modified Files:
Contact.zcml ContactEditPresentation.py
ContactViewPresentation.py IContact.py README.txt
Added Files:
products.zcml
Log Message:
Turned lies into truth.
=== Added File Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/products.zcml ===
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/Contact.zcml 1.2 => 1.3 ===
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
-
+
-
+
-
+
-
+
+
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/ContactEditPresentation.py 1.3 => 1.4 ===
-from Zope.Products.PageTemplate import PresentationPageTemplateFile
+from Zope.PageTemplate import PageTemplateFile
from IContactEdit import IContactEdit
-class ContactEditPresentationClass(AttributePublisher):
+class ContactEditPresentation(AttributePublisher.AttributePublisher):
"""Provide an interface for editing a contact
"""
@@ -17,7 +17,7 @@
__used_for__=IContactEdit
# Input form
- index = PresentationPageTemplateFile('edit.pt', globals())
+ index = PageTemplateFile('edit.pt', globals())
# action method
def action(self, first, last, email, address, pc):
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/ContactViewPresentation.py 1.1 => 1.2 ===
+from Zope.PageTemplate import SimpleViewClass
from IContactInfo import IContactInfo
# Create a simple view presentation
-ContactViewPresentation = SimplePresentationClass(
- 'view.pt', applicable_for=IContactInfo)
+ContactViewPresentation = SimpleViewClass(
+ 'view.pt', used_for=IContactInfo)
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/IContact.py 1.1 => 1.2 ===
from Contact import Contact
-class IContactInfo(Interface):
+class IContact(Interface):
"Marker for objects that provide specific behavior"
implements(Contact, IContact)
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/README.txt 1.5 => 1.6 ===
prevents someone from mistakedly configuring the component for use
with other (incompatable) interfaces. The '__used_for__'
- attribute is optional. Only one interfac can be specifeid. One
+ attribute is optional. Only one interface can be specified. One
could concievably create a component that is applicable to several
alternative interfaces, in which case, the '__applicable__'
attribute would not be set.
We modify the configuration file to add a security assertion for the
- new component and we add a 'browser::presentation' directive to
+ new component and we add a 'browser::view' directive to
register the component.
We also need to add a security assertion for the 'update' method of
From chrism at zope.com Wed Feb 13 15:54:12 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5 - products.zcml:1.1 Contact.zcml:1.4 ContactEditPresentation.py:1.5 ContactViewPresentation.py:1.3 IContact.py:1.2 README.txt:1.5
Message-ID: <200202132054.g1DKsCO02834@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5
In directory cvs.zope.org:/tmp/cvs-serv2822
Modified Files:
Contact.zcml ContactEditPresentation.py
ContactViewPresentation.py IContact.py README.txt
Added Files:
products.zcml
Log Message:
Turned lies into truth.
=== Added File Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/products.zcml ===
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/Contact.zcml 1.3 => 1.4 ===
>
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
+
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/ContactEditPresentation.py 1.4 => 1.5 ===
+from Zope.Publisher.Browser import AttributePublisher
from Zope.PageTemplate import PageTemplateFile
from IContactEdit import IContactEdit
-class ContactEditPresentation(AttributePublisher):
+class ContactEditPresentation(AttributePublisher.AttributePublisher):
"""Provide an interface for editing a contact
"""
@@ -23,4 +23,4 @@
def action(self, first, last, email, address, pc):
"Edit a contact"
self.getContext().update(first, last, email, address, pc)
- return self.index()
+ return self.view()
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/ContactViewPresentation.py 1.2 => 1.3 ===
+from Zope.PageTemplate import SimpleViewClass
from IContactInfo import IContactInfo
# Create a simple view presentation
-ContactViewPresentation = SimplePresentationClass(
- 'view.pt', globals(), used_for=IContactInfo)
+ContactViewPresentation = SimpleViewClass(
+ 'view.pt', used_for=IContactInfo)
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/IContact.py 1.1 => 1.2 ===
from Contact import Contact
-class IContactInfo(Interface):
+class IContact(Interface):
"Marker for objects that provide specific behavior"
implements(Contact, IContact)
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/README.txt 1.4 => 1.5 ===
Components that provide new presentation-independent logic are
called "application-functionality" components. There are three
- standard kinds of application-functionality components. Features
+ standard kinds of application-functionality components. Adapters
provide new functionality for other components, typically content
components. Utilities and services provide stand-alone
functionality.
- Utilities and services differ primarily in their role
- with respect to the system overall and in their management. Services
- are foundational. Many components and applications will depend on
- services and services are moe prominent within the
+ Utilities and services differ primarily in their role with respect
+ to the system overall and in their management. Services are
+ foundational. Many components and applications will depend on
+ services and services are more prominent within the
compoent-management facilities. A common use of services is to
- manage components. There are services for managing presentation components,
- features, utilities and services. Services may provide other
- foundational capabilities, such as cataloging, version management,
- and event channels. Utilities provide functionality that may be
- used by a few applications or components.
+ manage components. There are services for managing presentation
+ components, features, utilities and services. Services may provide
+ other foundational capabilities, such as cataloging, version
+ management, and event channels. Utilities provide functionality
+ that may be used by a few applications or components.
- In this step, we'll add a simple (trivial) feature for getting city
+ In this step, we'll add a simple (trivial) adapter for getting city
and state information for contacts. The functionality is provided
- using a feature because the computation depends on a content
- component, specifically a contact. The feature will look up the city
- and state for a contact using the contact postal code. Looking up a
- city and state for a postal code is not unique to working with
+ using an adapter because the computation depends on a content
+ component, specifically a contact. The adapter will look up the
+ city and state for a contact using the contact postal code. Looking
+ up a city and state for a postal code is not unique to working with
contacts however. We'll use a separate utility for doing the
postal-code lookup.
@@ -44,17 +44,17 @@
module allows us to build and test our contact feature, but we don't
expect it to be used in a production environment.
- The configuration file registers the the stub utility using
- the 'utility' directive. The 'utility' directive uses two
+ The configuration file registers the the stub utility using the
+ 'utility' directive. The 'utility' directive uses two
attributes. The 'provides' attribute specifies the interface that
- the component provides. The 'component' attribute specifies the
- component. The interface identifies the
- utility and the compnent provides the implementation. In this case,
- we register an actual component, which is an instance of our lookup
- class. This is in contrast to the way that presentation components
- are registered. For presentation components, we don't register the
- component directly, but register a callable object that returns the
- presentation component for a given context.
+ the component provides. The 'factory' attribute specifies the
+ component. The interface identifies the utility and the component
+ provides the implementation. In this case, we register an actual
+ component, which is an instance of our lookup class. This is in
+ contrast to the way that presentation components are registered. For
+ presentation components, we don't register the component directly,
+ but register a callable object that returns the presentation
+ component for a given context.
The configuration module makes security assertions for the utility
classes, declaring the utilities and their methods to be public.
@@ -74,30 +74,30 @@
searched. The constructor gets the city and state, which it saves
for later use in the 'city' and 'state' methods.
- The feature is registered with 'feature' directive in the configuration
- file. The 'feature' directive uses three attributes. The 'for'
- attribute specifies the interface of the objects the feature is used
- for. The 'component' and 'provides' attributes specify the
- component and the provided interface. The feature can be used with
- any component that provides the input interface. In this example, we
- pass the class as the callable object. Features are like
- presentation components in that they are context-dependent and must
- be registered with a callable object that creates a component for a
- given context.
+ The adapter is registered with the 'adapter' directive in the
+ configuration file. The 'adapter' directive uses three
+ attributes. The 'for' attribute specifies the interface of the
+ objects the feature is used for. The 'factory' and 'provides'
+ attributes specify the component and the provided interface. The
+ adapter can be used with any component that provides the input
+ interface. In this example, we pass the class as the callable
+ object. Adapters are like presentation components in that they are
+ context-dependent and must be registered with a callable object that
+ creates a component for a given context.
To use the feature, we need to look it up with the
- 'Zope.ComponentArchitecture.getFeature' method. For example, consider a
- Python script that wants to find out how many contacts, in a list of
- contacts live in Virginia::
+ 'Zope.ComponentArchitecture.getAdapter' method. For example,
+ consider a Python script that wants to find out how many contacts,
+ in a list of contacts live in Virginia::
- from Zope.ComponentArchitecture import getFeature
+ from Zope.ComponentArchitecture import getAdapter
nva=0
for contact in aListOfContacts:
- info =getFeature(contact, IPostalInfo, None)
+ info =getAdapter(contact, IPostalInfo, None)
if info is not None and info.state() == 'Virginia':
nva = nva+1
- In this example, 'getFeature' is passed three arguments, an object,
+ In this example, 'getAdapter' is passed three arguments, an object,
an interface, and a default value. In this case, the object passed
specifies both a location to search for the feature and an object
that the feature will be passed when it is created (or bound). It's
@@ -105,10 +105,10 @@
implements the interface passed as the second argument, the object
will be returned.
- It's worth noting that the feature can be used with any
+ It's worth noting that the adapter can be used with any
implementation of 'ContactInfo' and 'PostalLookup'. If there were
- multiple or alternative contact implementations, this feature would
- be applicable. Similarly, the feature works equally well with a
+ multiple or alternative contact implementations, this adapter would
+ be applicable. Similarly, the adapter works equally well with a
production-quality postal-information lookup component and with the
stub that we've provided here.
From chrism at zope.com Thu Feb 14 17:59:57 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5 - README.txt:1.6
Message-ID: <200202142259.g1EMxvX11974@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5
In directory cvs.zope.org:/tmp/cvs-serv11942/Chapter1/Step5
Modified Files:
README.txt
Log Message:
Committing Sean Bowman's corrections. Thanks Sean!
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/README.txt 1.5 => 1.6 ===
foundational. Many components and applications will depend on
services and services are more prominent within the
- compoent-management facilities. A common use of services is to
+ component-management facilities. A common use of services is to
manage components. There are services for managing presentation
components, features, utilities and services. Services may provide
other foundational capabilities, such as cataloging, version
@@ -39,7 +39,7 @@
postal-code data from postal code information objects. The second
interface defines postal code lookup.
- The 'stubpostal' module, in 'stubpostal.py' provides an
+ The 'stubpostal' module, in 'stubpostal.py', provides an
implementation of the postal interfaces suitable for testing. This
module allows us to build and test our contact feature, but we don't
expect it to be used in a production environment.
@@ -59,10 +59,10 @@
The configuration module makes security assertions for the utility
classes, declaring the utilities and their methods to be public.
- The 'ContactCityState' module, in 'ContactCityState.py' defines a
+ The 'ContactCityState' module, in 'ContactCityState.py', defines a
feature component for getting the city and state for a contact
object. The constructor for the component uses the contact
- 'postal_code' method, defined in the 'ContactInfo' interface to get
+ 'postal_code' method, defined in the 'IContactInfo' interface to get
the contact postal code. It then retrieves a 'PostalLookup' utility
to get a 'PostalInfo' object for the given postal code. It looks up
the utility with 'Zope.ComponentArchitecture.getUtility', which
@@ -91,13 +91,13 @@
in a list of contacts live in Virginia::
from Zope.ComponentArchitecture import getAdapter
- nva=0
+ nva = 0
for contact in aListOfContacts:
- info =getAdapter(contact, IPostalInfo, None)
+ info = getAdapter(contact, IPostalInfo, None)
if info is not None and info.state() == 'Virginia':
- nva = nva+1
+ nva = nva+1
- In this example, 'getAdapter' is passed three arguments, an object,
+ In this example, 'getAdapter' is passed three arguments: an object,
an interface, and a default value. In this case, the object passed
specifies both a location to search for the feature and an object
that the feature will be passed when it is created (or bound). It's
@@ -105,8 +105,8 @@
implements the interface passed as the second argument, the object
will be returned.
- It's worth noting that the adapter can be used with any
- implementation of 'ContactInfo' and 'PostalLookup'. If there were
+ This adapter can be used with any
+ implementation of 'IContactInfo' and 'IPostalLookup'. If there were
multiple or alternative contact implementations, this adapter would
be applicable. Similarly, the adapter works equally well with a
production-quality postal-information lookup component and with the
@@ -116,7 +116,7 @@
[1] -- We allow either an interface or a name. The name is only used
in cases where defining an interface is too much
- bother. Interfaces are prefered.
+ bother. Interfaces are preferred.
[2] -- An optional third argument can provide a default. If no default
is specified, an error is raised if the lookup fails.
From chrism at zope.com Thu Feb 14 18:00:29 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2 - README.txt:1.4
Message-ID: <200202142300.g1EN0Sb12072@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2
In directory cvs.zope.org:/tmp/cvs-serv11942/Chapter1/Step2
Modified Files:
README.txt
Log Message:
Committing Sean Bowman's corrections. Thanks Sean!
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step2/README.txt 1.3 => 1.4 ===
In this step, we'll make security assertions that make the 'Contact'
class we created in Step1 usable in Zope. The contact module,
- 'Contact.py' remains unchanged. We add a security assertion in the
+ 'Contact.py', remains unchanged. We add a security assertion in the
configuration file. The security assertion is made with the
'security:protectClass' directive. The class protected is specified
with the 'name' attribute and the permission used is specified in
@@ -13,7 +13,7 @@
specified permission also applies to instances of the class.
In this example we protected the methods for getting contact
- information with the Zope 'View' permission. With this change, we
+ information with the Zope "View" permission. With this change, we
can write templates and scripts that access these methods.
The file 'view.pt' shows a sample page template for viewing
@@ -29,7 +29,7 @@
..../aContact/view.pt
- When this happens the template variable, 'here' is bound to the
+ When this happens the template variable 'here' is bound to the
contact, so the path expression 'here/first' calls the 'first'
method on the contact.
@@ -39,7 +39,7 @@
'Acquisition.Implicit' base class. Implicit acquisition causes an
object's containers to be automatically searched for attributes not
found in the object. Implicit acquisition is quite powerful, but can
- sometimes lead to unpleasent surprises.
+ sometimes lead to unpleasant surprises.
In Zope 3, objects will still take advantage of acquisition, but in
much more explicit ways. Most objects will have a searchable
@@ -67,7 +67,7 @@
presentation for contacts.
In this example, the view template was put in the folder containing
- the content. The content, and the software for displaying the
+ the content. The content and the software for displaying the
content are mixed up in the same folder (or folder
hierarchy). Mixing software and content in the same place makes
managing both more difficult. We could put the presentation in the
@@ -79,5 +79,5 @@
----------------------------------------------------------------------
[1] -- This URL uses a URL parameter to indicate that an object with
-the name "view.pt" should be looked up in the context or it's
-containers.
+ the name "view.pt" should be looked up in the context or its
+ containers.
From chrism at zope.com Thu Feb 14 18:00:29 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4 - README.txt:1.7
Message-ID: <200202142300.g1EN0S512070@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4
In directory cvs.zope.org:/tmp/cvs-serv11942/Chapter1/Step4
Modified Files:
README.txt
Log Message:
Committing Sean Bowman's corrections. Thanks Sean!
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step4/README.txt 1.6 => 1.7 ===
- An assertion that instances of the class implement the
- 'BrowserPublish' interface by defining the '__implements__'
+ 'IBrowserPublisher' interface by defining the '__implements__'
attribute. This example illustrates how to assert interfaces in a
class definition.
- An implementation of the 'browser_traverse' method of the
- 'IBrowserPublish' interface. In this case,'browser_traverse'
+ 'IBrowserPublisher' interface. In this case, the 'browser_traverse'
method provides publishing of attribute values.
This implementation handles names with an ".html" suffix by
removing the suffix before looking up an attribute.
- An implementation of the 'browser_default' method of the
- 'IBrowserPublish' interface. The 'browser_default' method is used
+ 'IBrowserPublisher' interface. The 'browser_default' method is used
to control what happens when a URL points to a component, rather
than to one of its methods. The return value can be either:
@@ -47,12 +47,12 @@
sequence of additional names to traverse the object with.
In this case, we use the simpler form and simply return the string
- "index.html". Subclasses must provide an attribute, 'index' that provides
- their default interface, or they must override this method to
+ "index.html." Subclasses must provide an 'index' attribute that provides
+ their default presentation, or they must override this method to
supply a different name.
Presentation components present other components. We refer to the
- component presented by a presentation component as it's "context".
+ component presented by a presentation component as its "context."
The methods of a presentation component need access to the
presentation context. They do so by calling the 'getContext' method
that must be provided by a presentation component. The class
@@ -63,7 +63,7 @@
form. It implements this using a 'PresentationPageTemplateFile',
with the source in the file 'edit.pt'.
- The action of the form is "action.html", which names the 'action' method of
+ The action of the form is "action.html," which names the 'action' method of
the component. The 'action' method applies the update and redisplays
the editing form.
@@ -74,17 +74,17 @@
extends the 'IContactInfo' interface with the 'update' method.
The presentation component uses and thus is only applicable to
- object objects that implement the 'IContactEdit' interface. We
+ objects that implement the 'IContactEdit' interface. We
specify this by defining the '__used_for__' attribute. This
- prevents someone from mistakedly configuring the component for use
- with other (incompatable) interfaces. The '__used_for__'
+ prevents someone from mistakenly configuring the component for use
+ with other (incompatible) interfaces. The '__used_for__'
attribute is optional. Only one interface can be specified. One
- could concievably create a component that is applicable to several
- alternative interfaces, in which case, the '__applicable__'
+ could conceivably create a component that is applicable to several
+ alternative interfaces, in which case the '__used_for__'
attribute would not be set.
We modify the configuration file to add a security assertion for the
- new component and we add a 'browser::view' directive to
+ new component, and we add a 'browser:view' directive to
register the component.
We also need to add a security assertion for the 'update' method of
@@ -92,7 +92,7 @@
permissions, we need to use a more complicated form for the security
assertions. Rather than using a single empty element for the
assertion, we use three empty elements grouped by a non-empty
- 'security:protectClass' element. When need to include an explicit assertion
+ 'security:protectClass' element. We need to include an explicit assertion
for protecting class instances (as opposed to their methods)
whenever we use the complex form of 'security:protectClass'.
@@ -110,7 +110,7 @@
The tabs are defined using a new 'IContact' interface, defined in
the 'IContact' module. This is a "marker" interface. It doesn't
- actually specify any contacts but provides a way of very
+ actually specify any methods but provides a way of very
specifically tagging certain classes (usually one). We do this for
tabs because we usually want very specific control over the tabs
that a content object displays.
From chrism at zope.com Thu Feb 14 18:00:29 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3 - README.txt:1.5
Message-ID: <200202142300.g1EN0Si12071@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3
In directory cvs.zope.org:/tmp/cvs-serv11942/Chapter1/Step3
Modified Files:
README.txt
Log Message:
Committing Sean Bowman's corrections. Thanks Sean!
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step3/README.txt 1.4 => 1.5 ===
In this step, we'll begin to introduce Zope components. We'll use
Zope components to provide a default Web presentation for contacts.
- Before getting into details, we'll define some terms, "component",
- "content component" and "presentation component".
+ Before getting into details, we'll define some terms: "component,"
+ "content component," and "presentation component".
The definition of "component" is very simple. A component is an
object with introspectable interfaces. Interfaces allow us to
@@ -15,8 +15,8 @@
using the 'Interface' package [2].
Interfaces specify behavior. We'll often refer to an interface as a
- "contract" or a "promise". A component "implements" ("realizes",
- "satisfies", "provide") it's interfaces.
+ "contract" or a "promise." A component "implements" ("realizes,"
+ "satisfies," "provides") its interfaces.
Interfaces group (or "classify") objects based on their
behavior. Objects that provide the same interface are similar and
@@ -34,7 +34,7 @@
XML-RPC). Presentation components don't provide data or
functionality except as necessary to support the presentation. We
will often use the word "presentation" alone where the context is
- clear, as in "contact view presentation".
+ clear, as in "contact view presentation."
In this step, we'll use the component architecture to cause the view
page template to be used when viewing a contact. To use the
@@ -56,7 +56,7 @@
example, we asserted the instance contract outside the class
definition. We could have included the interface assertion in the
'Contact' class definition. We'll see an example of this in a later
- example. There are two advanages to specifying the interface
+ example. There are two advantages to specifying the interface
externally, as we have here:
- The interface assertion doesn't require modifying the class
@@ -66,7 +66,7 @@
- The 'implements' function performs minimal conformance checks and
raises errors if the class can be determined not to implement the
- interface. [4]
+ interface [4].
Now that contacts are components, we can associate presentation
components with them.
@@ -75,22 +75,22 @@
contacts. We normally create components using Python classes and
interfaces, as we did with 'Contact'. This presentation component is
very simple, consisting of a single page, expressed as a page
- template. Page templates provide a convenience functon,
- 'SimpleViewClass' for creating a web presentation class from
+ template. Page templates provide a convenience function,
+ 'SimpleViewClass', for creating a web presentation class from
a page template source file. We use this function to create our view
presentation class in the 'ContactViewPresentation' module in the
file 'ContactViewPresentation.py'. We pass the function the name of
the template file, relative to the package. We also provide an
- interfact with the 'used_for' keyword argument. The
+ interface with the 'used_for' keyword argument. The
optional 'used_for' argument is used to say that the component
applicable to objects that implement the 'IContactInfo' interface.
- By specifying the interface that presented object must implement, we
- can protect the component from being configures to present
- incompatable objects.
+ By specifying the interface that presented objects must implement, we
+ can protect the component from being configured to present
+ incompatible objects.
The configuration file is modified. First, we add a security
assertion for the new presentation class. In this case, we protect a
- single method, 'index', wich is used to render the presentation.
+ single method, 'index', which is used to render the presentation.
The configuration file contains a 'browser:defaultView'
directive that registers the view presentation. The 'for' attribute
@@ -122,14 +122,14 @@
------------------------------------------------------------------------------
[1] -- Some would argue that abstract base classes could provide the
- same capability. This is true, however, we think interfaces provide
+ same capability. This is true; however, we think interfaces provide
a cleaner approach, for a number of reasons:
- Using abstract base classes increases the depth and
complexity of class hierarchies.
- Using abstract base classes imposes the restriction that
- classes must satifsy all of the promises of their base
+ classes must satisfy all of the promises of their base
classes. We feel that this is overly restrictive. This
restriction limits opportunities for reuse and the
restriction is often not satisfied in practice.
@@ -161,6 +161,6 @@
[4] -- The 'implements' function does *not* verify that the
instances of the class conforms to the interface. Such a
verification requires additional semantic information that isn't in
- the interface. Thye best we can do is check for gross errors, like
- missing methods or mismatches arguments.
+ the interface. The best we can do is check for gross errors, like
+ missing methods or mismatched arguments.
From chrism at zope.com Thu Feb 14 18:00:29 2002
From: chrism at zope.com (Chris McDonough)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1 - README.txt:1.8
Message-ID: <200202142300.g1EN0Sc12073@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1
In directory cvs.zope.org:/tmp/cvs-serv11942/Chapter1/Step1
Modified Files:
README.txt
Log Message:
Committing Sean Bowman's corrections. Thanks Sean!
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step1/README.txt 1.7 => 1.8 ===
(it's in Zope3/lib/python/Zope). Components are contained in Zope
file-based products [1], which are simply Python packages that are
- intialized within the 'products.zcml' XML configuration file at the
+ initialized within the 'products.zcml' XML configuration file at the
root of the Zope3 software home. A package is simply a directory
that has a Python '__init__' module. We'll create the directory and
- add the file '__init__.py'. An empty file will do four our purposes.
+ add the file '__init__.py'. An empty file will do for our purposes.
We also create the file 'Contact.py' containing the class
definition. This class doesn't use *any* Zope-specific classes. The
- class provides methods for accessing contact data and for modifying
- the data.
+ class provides methods for accessing and modifying the contact data.
This class mixes in the 'Persistent' base class. Doing so allows
instances of the class to be stored in Zope's object database and
@@ -29,7 +28,7 @@
configuration file is an XML [3] file that contains elements that
express configuration directives. The configuration file in this
example includes two directives. The first directive,
- security:permission defines a permission that we'll use for the
+ 'security:permission', defines a permission that we'll use for the
Contact product. The second directive, 'zmi:provideClass',
registers our class. The class being registered is specified with
the 'name' attribute. The 'permission_id' attribute is used to
@@ -38,16 +37,16 @@
through the web or through code managed through the web. The
"title" attribute is used to specify the ZMI title for the class in
the Add list. Additional attributes can be used to provide
- additional meta data, however, the meta-data is infered from class
+ additional meta data; however, the meta-data is inferred from class
meta-data.
- In the configiration file, the class was provided using the string
+ In the configuration file, the class was provided using the string
"Zope.Contact.". This bears some explanation. First, the string
- "Zope.Contact." is an abreviation of the string:
+ "Zope.Contact." is an abbreviation of the string
"Zope.Contact.Contact.Contact", which is the full name of the
class object. The full name is a combination of the class module
name, "Zope.Contact.Contact" and the class name, "Contact". A
- full name can be abreviated using the following rules:
+ full name can be abbreviated using the following rules:
- If the full name begins with "Zope.Products.", then the
"Zope.Products" prefix can be omitted. A leading dot implies the
@@ -90,7 +89,7 @@
top-level 'products.zcml' file. Manipulating this configuration
file makes installing components an explicit step by the site
manager. The site manager can disable a product by simply removing
- it's the mention of its configuration file from the 'products.zcml'
+ the mention of its configuration file from the 'products.zcml'
file.
Here's the entry we put in to the 'products.zcml' file in order to
@@ -107,7 +106,7 @@
Simply adding contacts to Zope folders is of limited usefulness. We
can't do anything with the added contacts from the Zope management
interface or from through the web code, because we haven't provided
- security assertions that make them accessable. Conceivably, we could
+ security assertions that make them accessible. Conceivably, we could
use contacts from trusted (file-based) code.
In the next step, we'll make security assertions for the class,
@@ -116,18 +115,18 @@
------------------------------------------------------------------------------
[1] -- Components can also be developed through the web and contained
- in the Zope object database. This tutorial, however, only discussed
+ in the Zope object database. This tutorial, however, only discusses
file-based products.
-[2] -- There are a few additional restrictions, sometimes refered to
- as the "rules of persistence", that persistent class
+[2] -- There are a few additional restrictions, sometimes referred to
+ as the "rules of persistence," that persistent class
authors should be aware of. Persistent objects should be picklable
with Python's standard pickle module. Subobjects should be immutable
or persistent, or special handling is needed. See the Zope object
database documentation.
- In is likely that, in the future, it will be possible to store
- objects in Zope without mixing in 'Persistent', however, it will be
+ In is likely that in the future it will be possible to store
+ objects in Zope without mixing in 'Persistent'; however, it will be
necessary to make explicit calls when objects are modified so that
changes can be saved.
From jim at zope.com Thu Feb 14 20:35:27 2002
From: jim at zope.com (Jim Fulton)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5 - Contact.zcml:1.5
Message-ID: <200202150135.g1F1ZRj17659@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5
In directory cvs.zope.org:/tmp/cvs-serv17652
Modified Files:
Contact.zcml
Log Message:
Copied from latest slides.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/Contact.zcml 1.4 => 1.5 ===
+
+ xmlns:browser='http://namespaces.zope.org/browser'>
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
-
-
From jim at zope.com Thu Feb 14 20:39:00 2002
From: jim at zope.com (Jim Fulton)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5 - ContactViewPresentation.py:1.4
Message-ID: <200202150139.g1F1d0t18802@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5
In directory cvs.zope.org:/tmp/cvs-serv18778
Modified Files:
ContactViewPresentation.py
Log Message:
Changed to reflect new jargon.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/ContactViewPresentation.py 1.3 => 1.4 ===
from IContactInfo import IContactInfo
-# Create a simple view presentation
-ContactViewPresentation = SimpleViewClass(
- 'view.pt', used_for=IContactInfo)
+# Create a simple info view
+ContactViewView = SimpleViewClass(
+ 'info.pt',
+ used_for=IContactInfo)
From jim at zope.com Thu Feb 14 20:39:43 2002
From: jim at zope.com (Jim Fulton)
Date: Sun Aug 10 16:40:35 2008
Subject: [Zope-book] CVS: Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5 - edit.pt:1.4
Message-ID: <200202150139.g1F1dhI18877@cvs.baymountain.com>
Update of /cvs-repository/Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5
In directory cvs.zope.org:/tmp/cvs-serv18870
Modified Files:
edit.pt
Log Message:
Changed to use standard_macros.
=== Docs/ZopeComponentArchitecture/PythonProgrammerTutorial/Chapter1/Step5/edit.pt 1.3 => 1.4 ===
+
Edit contact
-