You might be wondering what this Flow thing is about - this page contains basic information about it.


The Cocoon flow layer was originally created by Ovidiu Predescu based on work done by Christopher Oliver, who implemented RhinoWithContinuations in the Rhino script engine.

Although Ovidiu is currently taking a break from Cocoon, several people have been continuing his work on code, samples and documentation.

Christopher and others have been working on the petstore example recently, a complete web application that demonstrates the Flow concepts (available with the Cocoon source code, see WhereToGet21Dev).


The flow layer of Cocoon acts as a very powerful yet simple to use controller in Model-View-Controller applications.

Here's a (slightly updated) example of a flowscript taken from Ovidiu's 2002 GetTogether Flow presentation (see link below)

var cart;
function checkout()
  var user = UserRegistry.getUser(cocoon.request.get("name"));
  var address = cocoon.request.get("address");
  var creditCard = cocoon.request.get("creditCard");

If you've been writing web applications with any other system you should see the huge advantage of Flow: the magic of continuations allows you to write the controller in linear fashion, with the Flow layer's sendPage method taking care of:

At this point we expect you to say something like WOW and go play with your first Flow application at GettingStartedWithFlow!

See also


Feel free to add any relevant information here! -- BertrandDelacretaz

WhatIsFlow (last edited 2009-09-20 23:40:53 by localhost)