lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I know that Seaside does. It uses continuations to 'remember where it was'
when the user backs up through a series of forms. e.g., given code similar to
this:

function doFormSeries()
        drawForm1()
        r1 = getResultFromUser()
        drawForm2()
        r2 = getResultFromUser()
        drawForm3()
        r3 = getResultFromUser()
        performTransaction(r1, r2, r3)
end

(which is all quite doable with Lua coroutines), it allows the user to proceed
up to form 3, then press back to go to form 2, fill in different data, and
continue from there --- and the programmer doesn't have to write any extra
code to make this happen. It's amazingly neat, but does require non-standard
Smalltalk features.

I've done this in PHP before with the help of some scaffolding and a session... continuation-based web programming without language level support is painful at best.

But how could I do this behind HTTP with Lua coroutines?  Wouldn't I have to associate a user with a persistent lua_State?

--
Tom Barta