ovidiu 02/04/05 12:33:50
Modified: src/scratchpad/schecoon/webapp/docs index.xml
Log:
Split the description over multiple pages.
Revision Changes Path
1.3 +6 -52 xml-cocoon2/src/scratchpad/schecoon/webapp/docs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/webapp/docs/index.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.xml 28 Feb 2002 01:33:09 -0000 1.2
+++ index.xml 5 Apr 2002 20:33:50 -0000 1.3
@@ -2,6 +2,12 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN"
"dtd/document-v10.dtd">
<document>
+ <header>
+ <title>Apache Cocoon - Control Flow</title>
+ <authors>
+ <person name="Ovidiu Predescu" email="[EMAIL PROTECTED]"/>
+ </authors>
+ </header>
<body>
<s1 title="Schecoon - Cocoon with control flow">
<p>Schecoon is an attempt to add advanced control flow
@@ -33,58 +39,6 @@
<em>continuations</em>, Schecoon tries to solve this problem,
and promises to allow the control flow in Web applications to be
modeled as a normal program.</p>
-
- <s2 title="What are continuations?">
-
- <p>A continuation is a way to represent what is the processing
- that still needs to happen. Think of a continuation as an
- object that, for a given point in your program, contains a
- snapshot of the stack trace, including all the local
- variables, and the program counter. You can not only store
- these things in the continuation object, but also restore the
- execution of the program from a continuation object. This
- means that the stack trace and the program counter of the
- running program become the ones stored in a continuation.</p>
-
- <p>By resuming the processing stored by a continuation object,
- you essentially resume the program from the point it was
- stopped. This allows you to write programs that do something
- like this:</p>
-
- <source><![CDATA[
- // some processing going here
- ...
--> send-page("response.xml");
- ...
- // some other processing here
- ...
-]]></source>
-
- <p>With continuations in the language, you can essentially
- store the continuation of <code>send-page</code> (think of all
- the stack trace, and the program counter), put it in a global
- hash table associated with an id. The id is then encoded in
- the <code>response.xml</code> page as an URL. When the user
- clicks on that URL, on the server side the associated
- continuation is resumed. Resuming the processing happens as if
- nothing was stopped, you get all the stack trace back, and all
- the local variables.</p>
-
- <p>So instead of using beans to store things in session, you
- use normal variables in a program. Since each user has its own
- version of the program, all the local variables in the program
- are separate between users.</p>
-
- <p>With this approach clicking the <em>Back</em> button in the
- browser is no longer a hassle to deal with for you as a
- server-side programmer. They will simply refer to past
- continuations objects, which have their own state of the local
- variables.</p>
-
- <p>Since continuations are objects, you can also store them in
- a database, for really long-lived session, just like you do
- with session beans.</p>
- </s2>
</s1>
</body>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]