[Zope3-checkins]
SVN: Zope3/branches/3.3/src/zope/app/session/design.txt
Update session docs to match reality
Philipp von Weitershausen
philikon at philikon.de
Thu Aug 31 16:54:16 EDT 2006
Log message for revision 69904:
Update session docs to match reality
Changed:
U Zope3/branches/3.3/src/zope/app/session/design.txt
-=-
Modified: Zope3/branches/3.3/src/zope/app/session/design.txt
===================================================================
--- Zope3/branches/3.3/src/zope/app/session/design.txt 2006-08-31 16:32:03 UTC (rev 69903)
+++ Zope3/branches/3.3/src/zope/app/session/design.txt 2006-08-31 20:54:16 UTC (rev 69904)
@@ -115,34 +115,32 @@
Application code will merely adapt request objects to a session data
interface. Initially, we will define the session data interface
-`IPersistentSessionData'. `IPersistentSessionData` provides a mapping
-interface. Keys in the mapping are application identifiers. Values are
-persistent mapping objects.
+``ISession``. It provides a mapping interface. Keys in the mapping
+are application identifiers. Values are persistent mapping objects.
Application code that wants to get object session data for a request
-adapts the request to `IPersistentSessionData`::
+adapts the request to ``ISession``::
- data = IPersistentSessionData(request)[appkey]
+ appkey = "mycorp.actionplan"
+ data = ISession(request)[appkey]
-where `appkey` is a dotted name that identifies the application, such
-as ``zope.app.actionplan``. Given the session data, the application
-can then store data in it::
+where ``appkey`` is a dotted name that identifies the application.
+Given the session data, the application can then store data in it::
data['original'] = original_actions
data['new'] = new_actions
From ZPT, you can access session data using adapter syntax::
- request*PersistentSession
+ request/session:key
-So, for example, to access the `old` key for the session data for the
-sample key above:
+So, for example, to access the ``old`` key for the session data for
+the sample key above:
- request*PersistentSession/zope.app.actionplan/old
+ request/session:mycorp.actionplan/old
In this example, the data for an aplication key was a mapping object.
The semantics of a session data for a particular application key are
-determined by the session data type interface.
-`IPersistentSessionData` defines the application data to be a mapping
-object by default. Other data interfaces could specify different
-bahavior.
+determined by the session data type interface. ``ISession`` defines
+the application data to be a mapping object by default. Other data
+interfaces could specify different bahavior.
More information about the Zope3-Checkins
mailing list