[Checkins] SVN: grokapps/gbe added gbe headings

Michael Haubenwallner michael at d2m.at
Tue Aug 26 12:01:45 EDT 2008


Log message for revision 90351:
  added gbe headings

Changed:
  U   grokapps/gbe99bottles/README.txt
  U   grokapps/gbe99bottles/REVIEW.txt
  U   grokapps/gbe99bottles/src/gbe99bottles/app.py
  U   grokapps/gbe99bottles/src/gbe99bottles/app.txt
  U   grokapps/gbeguestbook/README.txt
  U   grokapps/gbeguestbook/REVIEW.txt
  U   grokapps/gbeguestbook/src/gbeguestbook/app.py

-=-
Modified: grokapps/gbe99bottles/README.txt
===================================================================
--- grokapps/gbe99bottles/README.txt	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbe99bottles/README.txt	2008-08-26 16:01:45 UTC (rev 90351)
@@ -13,15 +13,15 @@
 
 
 Overview
---------
+========
 
 The '99 Bottles of Beer' website holds a collection of the Song 99 Bottles of 
 Beer programmed in different programming languages. Actually the song is 
 represented in more than 1200 different programming languages and variations.
 
-The Grok implementation uses persistent 'wall' and 'bottle' objects. It follows
-the song lyrics by putting bottles on the wall, taking them off again and at
-each step reporting the state of the scenery.
+The Grok implementation uses persistent 'Wall' and 'Bottle' objects. It follows
+the song lyrics by putting bottles on the wall, taking them off again and - at
+each step - reporting the state of the scenery.
 
 Usage
 -----

Modified: grokapps/gbe99bottles/REVIEW.txt
===================================================================
--- grokapps/gbe99bottles/REVIEW.txt	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbe99bottles/REVIEW.txt	2008-08-26 16:01:45 UTC (rev 90351)
@@ -31,13 +31,15 @@
 --------------------------
 
 When we create the 'Song' Application object, we want to set it to an initial 
-state, like creating a Wall, a number of Bootles and add them to the Wall.
+state, like creating a Wall, creating a number of Bootles and adding them to the
+Wall.
 
 Grok also is an event driven framework. Events can be sent and subscribed to.
-When the Application object is created it is added to the object graph an 
+When the Application object is created it is added to the object graph and an 
 'ObjectAddedEvent' is sent by the framework. We can now simply *subscribe* to
 that event (or the Interface that describes the event type) and initialize our
-application objects by adding a container and filling it with objects::
+application objects by adding a container to the application object and filling
+it with Bottle objects::
 
     @grok.subscribe(Song, grok.IObjectAddedEvent)
     def handle(obj, event):
@@ -51,7 +53,7 @@
 Request
 -------
 
-The application accepts only one request: the default view.
+The application accepts only one distinct request: the default view.
 
 Grok uses 'index' for its default view name (lowercase of the class name). 
 This view class is bound to the 'Song' application object::
@@ -94,8 +96,8 @@
 Persistent Storage
 ------------------
 
-When a Response is created by the view class Bottle objects are removed from and
-added to the Wall container by calling methods of the Wall instance object::
+When a Response is created by the view class, Bottle objects are removed from 
+and added to the Wall container by calling methods of the Wall instance object::
 
     def remove_a_bottle(self):
         bottles=list(self.keys())

Modified: grokapps/gbe99bottles/src/gbe99bottles/app.py
===================================================================
--- grokapps/gbe99bottles/src/gbe99bottles/app.py	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbe99bottles/src/gbe99bottles/app.py	2008-08-26 16:01:45 UTC (rev 90351)
@@ -48,7 +48,8 @@
         self.wall=self.context['wall']
         
     def render(self):
-        out=[]
+        out=['Grok-by-Example: 99 Bottles of Beer']
+        out.append('===================================')
         while self.still_beer():
             description=self.describe_wall()
             out.append('%s on the wall, %s.' % (description, description.lower()))

Modified: grokapps/gbe99bottles/src/gbe99bottles/app.txt
===================================================================
--- grokapps/gbe99bottles/src/gbe99bottles/app.txt	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbe99bottles/src/gbe99bottles/app.txt	2008-08-26 16:01:45 UTC (rev 90351)
@@ -3,13 +3,13 @@
 
 :Test-Layer: functional
 
-Let's first create an instance of the Wall at the top level:
+Let's first create an instance of the Song at the top level:
 
    >>> from gbe99bottles.app import Song
    >>> root = getRootFolder()
    >>> root['song'] = Song()
 
-Creating the wall implicitely puts 99 beers on it.
+Creating the Song initializes the Wall and puts 99 beers on it.
 
    >>> root['song']['wall'].contents()
    99

Modified: grokapps/gbeguestbook/README.txt
===================================================================
--- grokapps/gbeguestbook/README.txt	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbeguestbook/README.txt	2008-08-26 16:01:45 UTC (rev 90351)
@@ -1,7 +1,7 @@
 Grok-by-Example: Guestbook
 ==========================
 
-:Author: d2m (michael at d2m.at)
+:Author: d2m (michael at d2m.at)
 :Motivation: look at the original source and the Grok code side-by-side 
              and deduce from both
 

Modified: grokapps/gbeguestbook/REVIEW.txt
===================================================================
--- grokapps/gbeguestbook/REVIEW.txt	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbeguestbook/REVIEW.txt	2008-08-26 16:01:45 UTC (rev 90351)
@@ -1,8 +1,11 @@
+==========================
 Grok-by-Example: Guestbook
 ==========================
 
-:Author: d2m (michael at d2m.at)
+.. contents:: Contents
 
+:Author: d2m (michael at d2m.at)
+
 A basic 'Grok Guestbook' application [source__] ported from the 
 Google Appengine [GAE] demo application [source__].
 
@@ -10,17 +13,18 @@
 __ http://code.google.com/p/googleappengine/source/browse/trunk/demos/guestbook/guestbook.py
 
 Overview
-~~~~~~~~
+========
 
 The application presents you a list of 10 guestbook entries both by 
 authenticated and anonymous users, reverse sorted by date of creation
 and a form to submit new entries to the guestbook. Response text 
-formatting is done using python string templates only.
+formatting is done using Python string templates only.
 
+
 Review
-~~~~~~
+======
 
-Let's now compare how the code is laid out for both frameworks:
+Let's now compare how the code is laid out for both frameworks.
 
 Application object
 ------------------
@@ -113,8 +117,8 @@
     class Greeting(db.Model):
       author = db.UserProperty()
 
-Persistency
------------
+Persistent Storage
+------------------
 
 Grok content objects are instantiated, modified and finally inserted into 
 a container (which here is the application object itself). A local-unique name

Modified: grokapps/gbeguestbook/src/gbeguestbook/app.py
===================================================================
--- grokapps/gbeguestbook/src/gbeguestbook/app.py	2008-08-26 15:53:29 UTC (rev 90350)
+++ grokapps/gbeguestbook/src/gbeguestbook/app.py	2008-08-26 16:01:45 UTC (rev 90351)
@@ -22,6 +22,7 @@
 
     def render(self):
         out=['<html><body>']    
+        out.append('<h1>Grok-by-Example: Guestbook</h1>')
         greetings=[(x.date, x) for x in self.context.values()]
         greetings=list(reversed(sorted(greetings)))
         for date,greeting in greetings[:10]:



More information about the Checkins mailing list