[Checkins] SVN: bluebream/website/docs/v1.0/tutorial.rst sub-sections added and sligthly expanded

Baiju M baiju.m.mail at gmail.com
Sun Jan 17 00:26:57 EST 2010


Log message for revision 108184:
  sub-sections added and sligthly expanded
  

Changed:
  U   bluebream/website/docs/v1.0/tutorial.rst

-=-
Modified: bluebream/website/docs/v1.0/tutorial.rst
===================================================================
--- bluebream/website/docs/v1.0/tutorial.rst	2010-01-16 21:36:25 UTC (rev 108183)
+++ bluebream/website/docs/v1.0/tutorial.rst	2010-01-17 05:26:55 UTC (rev 108184)
@@ -542,6 +542,9 @@
 Creating the application object
 -------------------------------
 
+Container objects
+~~~~~~~~~~~~~~~~~
+
 In this section, we will create ticketcollector main application
 container object.  BlueBream use the object database know as ZODB to
 store your data (object).  An object data base, you can think of as a
@@ -565,6 +568,9 @@
 from some special classes.  You will see more details about how to do
 it in the upcoming sections.
 
+Declaring Interface
+~~~~~~~~~~~~~~~~~~~
+
 As the first step for creating the main application container object
 which is going to hold all other objects, you need to create an
 interface.  You can name the main container interface as
@@ -597,6 +603,9 @@
 second one is ``description``.  The schema is used for
 auto-generating web forms.
 
+Implementing Interface
+~~~~~~~~~~~~~~~~~~~~~~
+
 Next, you need to implement this interface.  To implement
 ``IContainer``, it is recommended to inherit from
 ``zope.container.btree.BTreeContainer``.  You can create the
@@ -616,8 +625,41 @@
       name = u""
       description = u""
 
-To declare a class is implementing a particular interface, you
+To declare a class is implementing a particular interface, you can
+use ``implements`` function.
 
+Registering components
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+  <interface 
+     interface=".interfaces.ICollector" 
+     type="zope.app.content.interfaces.IContentType"
+     /> 
+
+  <class class=".ticketcollector.Collector">
+    <implements
+       interface="zope.annotation.interfaces.IAttributeAnnotatable"
+       />
+    <implements
+       interface="zope.container.interfaces.IContentContainer" 
+       />
+    <require
+       permission="zope.ManageContent"
+       interface=".interfaces.ICollector"
+       />
+    <require
+       permission="zope.ManageContent"
+       set_schema=".interfaces.ICollector"
+       />
+  </class>
+
+The ``zope.app.content.interfaces.IContentType`` represents a content
+type.  If an **interface** provides ``IContentType`` interface type,
+then all objects providing the **interface** are considered content
+objects.
+
 .. _tut-main-page:
 
 Creating the main page



More information about the checkins mailing list