[Checkins] SVN: grok/trunk/doc/reference/ - added preliminary structure for the grok reference

Christian Theune ct at gocept.com
Sat Oct 21 11:43:10 EDT 2006


Log message for revision 70868:
   - added preliminary structure for the grok reference
  
  

Changed:
  _U  grok/trunk/doc/reference/
  A   grok/trunk/doc/reference/components.tex
  A   grok/trunk/doc/reference/core.tex
  A   grok/trunk/doc/reference/decorators.tex
  A   grok/trunk/doc/reference/directives.tex
  A   grok/trunk/doc/reference/events.tex
  A   grok/trunk/doc/reference/exceptions.tex
  U   grok/trunk/doc/reference/reference.tex

-=-

Property changes on: grok/trunk/doc/reference
___________________________________________________________________
Name: svn:ignore
   - reference.pdf
reference

   + reference.pdf
reference
.aux


Added: grok/trunk/doc/reference/components.tex
===================================================================
--- grok/trunk/doc/reference/components.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/components.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,22 @@
+\chapter{Components}
+
+The \module{grok} module defines a set of components that provide basic Zope 3
+functionality in a convenient way.
+
+    \section{grok.Model}
+
+    \section{grok.Container}
+
+    \section{grok.Adapter}
+
+    \section{grok.MultiAdapter}
+
+    \section{grok.Utility}
+
+    \section{grok.View}
+
+    \section{grok.XMLRPC}
+
+    \section{grok.Traverser}
+
+    \section{grok.EditForm}


Property changes on: grok/trunk/doc/reference/components.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Added: grok/trunk/doc/reference/core.tex
===================================================================
--- grok/trunk/doc/reference/core.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/core.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,6 @@
+\chapter{Core}
+
+The \module{grok} module defines a few functions to interact with grok itself.
+
+    \section{grok.grok}
+


Property changes on: grok/trunk/doc/reference/core.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Added: grok/trunk/doc/reference/decorators.tex
===================================================================
--- grok/trunk/doc/reference/decorators.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/decorators.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,16 @@
+\chapter{Decorators}
+
+grok uses a few decorators to register functions or methods for specific
+functionality.
+
+    \section{\function{grok.subscribe} -- Register a function as a subscriber
+    for an event}
+
+    Similar to Zope 3's \function{zope.component.subscriber} decorator, the
+    function where it is applied to is registered as a subscriber for an event. 
+
+
+
+
+    \section{grok.action}
+


Property changes on: grok/trunk/doc/reference/decorators.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Added: grok/trunk/doc/reference/directives.tex
===================================================================
--- grok/trunk/doc/reference/directives.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/directives.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,23 @@
+\chapter{Directives}
+
+The \module{grok} module defines a set of directives that allow you to
+configure and register your components. Most directives assume a default, based
+on the environment of a module. (For example, a view will be automatically
+associated with a model if the association can be made unambigously.) 
+
+If no default can be assumed for a value, grok will explicitly tell you what is
+missing and how you can provide a default or explicit assignment for the value
+in question.
+
+    \section{grok.implements}
+
+    \section{grok.context}
+
+    \section{grok.name}
+
+    \section{grok.template}
+
+    \section{grok.templatedir}
+
+    \section{grok.templatedir}
+


Property changes on: grok/trunk/doc/reference/directives.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Added: grok/trunk/doc/reference/events.tex
===================================================================
--- grok/trunk/doc/reference/events.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/events.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,20 @@
+\chapter{Events}
+
+grok provides convenient access to a set of often-used events from Zope 3.
+Those events include object and containment events. All events are available as
+interface and implemented class.
+
+    \section{grok.IObjectCreatedEvent}
+
+    \section{grok.IObjectModifiedEvent}
+
+    \section{grok.IObjectCopiedEvent}
+
+    \section{grok.IObjectAddedEvent}
+
+    \section{grok.IObjectMovedEvent}
+
+    \section{grok.IObjectRemovedEvent}
+
+    \section{grok.IContainerModifiedEvent}
+


Property changes on: grok/trunk/doc/reference/events.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Added: grok/trunk/doc/reference/exceptions.tex
===================================================================
--- grok/trunk/doc/reference/exceptions.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/exceptions.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -0,0 +1,49 @@
+\chapter{Exceptions}
+
+grok tries to inform you about errors early and with as much guidance as
+possible. grok can detect some errors already while importing a module, which
+will lead to the \class{GrokImportError}.  Other errors require more context and can
+only be detected while executing the \function{grok} function.
+
+    \section{\class{grok.GrokImportError} -- errors while importing a module}
+
+    This exception is raised if a grok-specific problem was found while
+    importing a module of your application. \class{GrokImportError} means there
+    was a problem in how you are using a part of grok. The error message tries
+    to be as informative as possible tell you why something went wrong and how
+    you can fix it.
+
+    \class{GrokImportError} is a subclass of Python's \class{ImportError}.
+
+    Examples of situations in which a GrokImportError occurs:
+
+    \begin{itemize}
+        \item Using a directive in the wrong context (e.g. grok.templatedir on
+        class-level instead of module-level.)
+        \item Using a decorator with wrong arguments (e.g. grok.subscribe
+        without any argument)
+        \item \ldots
+    \end{itemize}
+
+    \section{\class{grok.GrokError} -- errors while grokking a module}
+
+    This exception is raised if an error occurs while grokking a module.
+
+    Typically a \class{GrokError} will be raised if one of your modules uses a
+    feature of grok that requires some sort of unambigous context to establish
+    a reasonable default.
+
+    For example, the \class{grok.View} requires exactly one model to be defined
+    locally in the module to assume a default module to be associated with.
+    Having no model defined, or more than one model, will lead to an error
+    because the context is either underspecified or ambigous.
+
+    The error message of a \class{GrokError} will include the reason for the
+    error, the place in your code that triggered the error, and a hint, to help
+    you fix the error.
+
+    \begin{classdesc}{GrokError}{Exception}
+        \begin{memberdesc}{component}
+            The component that was grokked and triggered the error.
+        \end{memberdesc}
+    \end{classdesc}


Property changes on: grok/trunk/doc/reference/exceptions.tex
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: grok/trunk/doc/reference/reference.tex
===================================================================
--- grok/trunk/doc/reference/reference.tex	2006-10-21 15:41:59 UTC (rev 70867)
+++ grok/trunk/doc/reference/reference.tex	2006-10-21 15:43:09 UTC (rev 70868)
@@ -74,12 +74,16 @@
 
 \tableofcontents
 
-\include{model}
+\include{core}
 
-%\include{view}
+\include{components}
 
-%\include{adapter}
+\include{directives}
 
-%\include{resources}
+\include{decorators}
 
+\include{events}
+
+\include{exceptions}
+
 \end{document}



More information about the Checkins mailing list