# HG changeset patch # User paulb # Date 1114466642 0 # Node ID 32f41c83f4ac4a998bcc6d1d294f98146ac3f5d3 # Parent 43f697c83a5ee7a6fc48acc79982ae921e2f63ec [project @ 2005-04-25 22:04:02 by paulb] Changed the labels in the components table. Improved the design considerations document. Added an integration document. Added a note about templating systems in the responses document. diff -r 43f697c83a5e -r 32f41c83f4ac docs/anatomy.html --- a/docs/anatomy.html Mon Apr 25 22:03:10 2005 +0000 +++ b/docs/anatomy.html Mon Apr 25 22:04:02 2005 +0000 @@ -38,7 +38,7 @@ Most new code will be written in the application. Applications are -described in this part of the documentation. +described in "Applications and Resources". Mostly copying an existing adapter or writing a short module. - Adapters are explained in -the deployment -documentation. + Adapters are explained in "Deploying a WebStack Application". Server environments are covered -in the deployment -documentation. +in "Deploying a WebStack Application". + diff -r 43f697c83a5e -r 32f41c83f4ac docs/design.html --- a/docs/design.html Mon Apr 25 22:03:10 2005 +0000 +++ b/docs/design.html Mon Apr 25 22:04:02 2005 +0000 @@ -10,14 +10,55 @@

Application Design Considerations

When writing an application, we -must consider a number of factors which -have an impact on the code (and other things) that we will need to -provide as -part of the finished product or service.

+must try and cover the three activities mentioned in our overview of +what a simple application looks like:

+
    +
  1. Examine the transaction, decide what the user wants to do.
  2. +
  3. Perform some kind of action with the information supplied.
  4. +
  5. Produce some kind of response which tells the user what happened.
  6. +
+

We briefly covered the third activity in the MyApplication +example, but for a real, properly-behaved application, we need to visit +each activity in detail.

+

Examine the Transaction

+

In WebStack, the transaction is an object which is passed into a +resource when a user makes contact with an application. This +transaction object effectively tells us what it is the user wants to +do; it does so through a number of different pieces of information +including the request method, headers, parameters, cookies and sessions.

+
+

WebStack API - The Transaction Object

+

The transaction object appears as the first parameter in a +resource's respond method:

+
class SomeResource:
def respond(self, trans):
[Here is where the code for the resource is written.]
+

For full information about transaction objects, see the API +documentation for the WebStack.Generic.Transaction +class.

+
+

Within this activity, certain topics are of interest:

+

Perform Actions

+

Of all activities summarised above, this is the most vague because +the kinds of actions performed by applications will vary substantially +depending on what the application is supposed to do. Indeed, it is +within this activity that most applications will probably be integrated +with other systems - they may access databases or Web services, for +example.

+

WebStack does not mandate any particular style of integration with +other systems. It is generally recommended that developers use +whichever Python modules or packages they prefer and just to import +these into their applications. See "Integrating +with Other Systems" for advice on this subject.

+

Produce a Response

+

This activity was briefly covered in the MyApplication +example, but for "real world" applications the following topics must be +understood in more detail:

+