People reading this blog might be forgiven for thinking that I don't do software development for a living, so here's some technical stuff to even up the balance.
Spent some of the weekend reading up on "continuation-based web programming". This is a pretty interesting technique, using continuations to allow the flow of web-based applications to be scripted as if they were modal command-line applications. There are some frameworks based on this - Seaside (Smalltalk), Borges (Ruby) and SISCWeb (Scheme) being examples. Cocoon has also had this for a while - using a continuation-enhanced version of Javascript (based on Mozilla Rhino.) Cocoon also created a continuation system for Java called JavaFlow which quite scarily rewrites your classes as they get loaded (via a custom classloader) so that the stack frames become objects on the heap (which is a necessity for proper continuations.)
The best explanation I found about the way continuations work is Sam Ruby's "Continuations for curmudgeons". Once you've read this, you'll see why Java can't do this out of the box while Ruby can.
This seems like quite an attractive idea, given the amount of descriptors needed to wire up a Struts or JSF application, and fits with the move away from descriptors exemplified by environments like Ruby on Rails. If continuations can be persisted, either to browser viewstate or the backend database, then state management can become completely transparent too, while still handling the nightmare that is The Back Button.
Intuitively it seems to me like BPM and workflow systems could gain from this approach too, based as they are on the coordination of asynchronous event-driven processes.
So insightful, its scary :)
Posted by: Dennis Pilarinos | July 19, 2005 at 12:59 AM