I was thinking about an alternative design that works similar to the continuations usage but that (I think) is more intuitive from a software developer's point while keeping the same ideas.
Basically it consist of developing what I call a "Web Virtual Machine". The WVM will consists of a set of instructions ( could be something similar to servlets or piece of servlets), memory addresses (expressed as URLs instead of integer numbers and pointing to the instructions), and I/O functionality. The main trick is considering that the WVM CPU runs permanently and the human being or user submiting a form is just an external slave hardware entering data into the WVM when it's requested to do so (yes, I know it's somethinglike sad expresed this way!). The normal "Real Hardware" CPU instruccion "read bytes from input port" will translate in a "send form to the browser and read back the submitted user-data". As a normal hardware the human-being/user could be available (fill the browser form and press the submit button), enter non-correct data or just fail to answer. The main servlet will act as a combination of the WVM CPU with + Interrupt Controller. Any request from the user browser will be interpreted as a WVM CPU Interrupt request similar to a normal PC. The WVM will process the interrupt when possible and if needed will submit a new form to the user (A new WVM read byte from port). "Complex" processes just require the use of an WVM stack pointer so that it will be possible to interrupt the process in place, call a new process (push current Instruction Pointer onto the stack) and return/come back to the original point (poping the "Instruccion Pointer" from the WVM stack). (The WVM Instruccion Pointer and stack, again, will store an URL to a servlet instead of an 16/32/... integer number). Concrete examples: if the WVM executes a "READ name FROM USER" the final form send to the navigator could include an input form similar to "<input name='WVM_name_input' size=60>" The main servlet (The WVM CPU) will read the field 'WVM_name_input' and either continue with the next instruccion or send back a form to the browser in the WVM_name_input is empty. A list of WVM instructions will look like: 0 "READ formLogin FROM USER" 1 "SERVLET_CheckFormLogin" ... 10 "READ formUserSelection FROM USER" 11 "READ formContact FROM USER" 12 "READ formPaymentInfo FROM USER" 13 "SERVLET_RegisterBuyInDataBase" 14 "READ formUserExit FROM USER" 15 "IF formUserExit NOT TRUE" 16 "GOTO 10" 17 "GOTO 0" The programmer will just need to work on the formData's and the custom-made "SERVLET_..." I'm open for refreshing ideas. --- Nick Murtagh <[EMAIL PROTECTED]> escribi�: > Tom Schwaller wrote: > > and after reading > > > > http://www.ds9a.nl/webcoding.html > > > > even template engines seem questionable ;-) > > Interesting, I recently came across this: > > > http://www-106.ibm.com/developerworks/library/j-contin.html > > which talks about using continuations in web > programming (Apache > Cocoon). It would be cool to have something like > this in Python. > Should be doable with stackless, I've heard mention > of people > using stackless with zope. > > The code referenced by the above article > > http://csoki.ki.iif.hu/~vitezg/impostor/ > > doesn't appear to use continuations and hence has > problems > handling back / forward button presses. > > > Nick > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the > post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt > from ThinkGeek. > It's fun and FREE -- well, > almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Webware-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/webware-discuss > ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Webware-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/webware-discuss
