Why am I doing this Control Flow stuff?
Maybe I should explain why I'm wasting valuable late-night Roller development time with this continuations stuff. I'm experimenting with Control Flow because I'm frustrated with Struts (and other web-MVC frameworks) lack of support for building complex web applications where user-interactions extend over multiple pages. I'm tired of little ad-hoc tricks like session attibute here, request parameter there, breadcrumb stacks, and hidden fields that developers must remember to place on each page. There has got to be a better way and a continuations-based approach seems like it may be that better way. Ken McLeod explains the appeal of a continuations-based approach quite nicely:
<a href= "http://bitsko.slc.ut.us/blog/prevalent-continuations.html">Ken MacLeod: Continuation-based web frameworks let you write complex, modeless, interactive web applications in a top-down, linear fashion as simple as writing command-line based applications that prompt for input.
That sounds great, but I don't really want to switch to a new framework to take advantage of a continuations approach. I've got an investment in Struts and JSP and what I would really like to do is to learn from the continuations-based frameworks and, if possible, apply that knowledge to my existing webapps. What I would like to learn is:
- Should you write entire webapps as "top-down, linear" programs, or should you just use a continuations-based approach for portions of webapps, perhaps only the parts that involve multi-page user-interactions. Charles Miller points out an important reason why you might not want to take the entire-app approach: webapps must be able to provide meaningful and bookmarkable URLs (cool URLs) and some continuations-based frameworks make this difficult.
- Does it make sense to use Control Flow in the context of a plain-old web-MVC based framework (e.g. Struts, Webwork). How would you do this? Does the Control Flow script kick in before an Action is run, as part of the Front Controller, or after the Action completes?
- Does it make sense to use Control Flow in the context of a next-generation web-MVC based framework with events and server-side UI components (e.g. JSF, Tapestry)? How would you do this? How should the Control Flow engine fit into the component request/response lifecycle?
There you have it. Please, leave a comment if you have any insight into any of the above questions.
These "elements" are tied together flow-wise by a sitemap written XML.
I can't comment tho on integration with something like JSF, or a pre-existing codebase in Struts, but parbly Geert will find this discussion and comment.
Posted by F.Baube on March 17, 2004 at 09:16 AM EST #
Posted by Geert Bevin on March 17, 2004 at 09:55 AM EST #
Posted by Buko on March 17, 2004 at 04:44 PM EST #
Posted by Dave Johnson on March 17, 2004 at 05:22 PM EST #
Posted by Don Brown on March 17, 2004 at 07:27 PM EST #
Posted by Steve Shelley on March 17, 2004 at 09:15 PM EST #
Posted by Steve Shelley on March 17, 2004 at 09:22 PM EST #
Posted by Dave Johnson on March 17, 2004 at 09:26 PM EST #
Using continuations with the "next-gen" MVC frameworks (ie, clones of WebObjects circa 1996) is not only possible, but very desirable, and gets rid of the "scalability" issues that I assume Buko is talking about - you don't really have a single flow for the entire app, you have lots of event handlers each with independent flow. Done properly, this approach absolutely rocks. I'm a bit skeptical about grafting this onto an existing framework like Tapestry or Struts, however. Continuations are a game changer, and a lot of the existing infrastructure would suddenly be redundant or get in your way.
If you want to talk about doing it "right" (for my NSHO of what's "right"), contact me...
Posted by Avi Bryant on March 18, 2004 at 12:50 AM EST #
Posted by Unknown on March 19, 2004 at 07:37 PM EST #