Web Frameworks (was Re: Squeak book !)

Stephen Pair spair at acm.org
Tue Sep 3 15:32:56 UTC 2002


Avi,

How are continuations implemented?  Can you cope with the use of the
back button in the browser with continuations?

I do exactly the same thing as continuations in Swiki.net.  They are
much nicer to work with.  I implemented it by copying the Squeak context
stack at each reply-request interaction.  If the browser's back button
is used, I just schedule a new Squeak Process on a saved copy of the
stack as it existed at the previous reply-request interaction.

Cincom's VisualWave also uses a continuation like mechanism to handle
stateful user interaction, however it doesn't deal with the browser's
back button at all.

- Stephen 

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Avi Bryant
> Sent: Tuesday, September 03, 2002 11:02 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Web Frameworks (was Re: Squeak book !)
> 
> 
> On Tue, 3 Sep 2002 goran.hultgren at bluefish.se wrote:
> 
> > 1. Seaside. See http://swiki.squeakfoundation.org/sea
> >
> > Haven't used it myself but Avi Bryant can tell you more and 
> it looks 
> > good. Fairly conventional approach (at least compared to number 2 
> > below).
> 
> Conventional?  Can you elaborate on this?  To my mind, the 
> main distinguishing feature of Seaside is its highly 
> un-conventional use of continuations to model control flow.  
> Typically, in web development, each request/response is an 
> isolated piece of code, with only crude paramterized GOTOs 
> (usually in the form of links to named URLs) transitioning 
> between them.  In Seaside, moving to another page is modeled 
> as a subroutine call, with a return value.  This means, among 
> other advantages, that multi-page processes can be described 
> in a single method; for example,
> 
> customer := self getCustomerInfo.
> payment := self getPaymentInfoFor: customer.
> (self processPayment: payment forCustomer: customer)
>   whileFalse: [payment := self getAlternatePaymentInfoFor: 
> customer]. self displaySuccessPage.
> 
> might trigger a sequence of pages in a shopping cart application.
> 
> By comparison, my understanding was that HttpView is 
> intentionally conventional and light-weight in its approach 
> to session management. What's somewhat unusual about it is 
> its approach to HTML generation, which is purely programmatic 
> rather than template based.
> 
> Goran, you might be interested in the work I've been doing 
> towards Seaside 2.0 - the lower layers, which are more or 
> less complete, take a programmatic approach somewhat similar 
> to HttpView, although within the continuation based session 
> model (the higher layers will re-introduce a template 
> system).  You can grab a snapshot at
> 
http://beta4.com/squeak/aubergines/source/Borges.st

and there is some (limited, unfinished, not really meant for end-users)
documentation at

http://beta4.com/squeak/aubergines/docs/seaside/borges.html

Cheers,
Avi






More information about the Squeak-dev mailing list