|
Re: Manage State with Continuation Servers
|
Posted: Mar 23, 2006 2:44 AM
|
|
Personally I think it is a bad idea, that will only confuse programmers.
> It gives you a stateful programming model. The > framework can restore any continuation at any time. If the > user submits a form a second time, the continuation can > pick up processing at an earlier point in time.
If a user submits a form for a 2nd time, then he should be notified that the requested action has already been performed.
> You can invalidate continuations based on business > rules, so it's easy to prevent a form from being submitted > twice.
Aha...new framework for business rules is needed. More programming, to get around the problems of continuations. I see a lot of code written in the form of "...if this job has already been done, do nothing" inside and outside the code captured by continuations. New DSL for business rules, with the same old problems (who decides to apply the rule, who writes it, who executes it, who is maintaining it; both for persons and processes)
> You get Back button support thrown in for free. > Because you literally have the execution state at any > point in time, the framework can simply restore the > appropriate continuation if the user ever hits the Back > button.
Actually the problem lies with the back button: it should not exist in the browser, but in the HTML document. In other words, if a web page is browsable in the form of wizards "go back, go forward, etc", then it should provide a back/forward button, otherwise the web page itself must provide the way to navigate the application.
The real problem with the back button is that the web was originally for static html pages and not for interactive distributed applications.
> > Threading becomes easy because no resources are > shared. No resource contention means most threading > problems go away.
Resource sharing could have been avoided in the current frameworks if each session had its own state of the web application. In fact, a web application environment is nothing more than a time-sharing multiuser operating system. Just like in a multiuser operating system processes do not share resources, unless they need to, so should instances of web applications.
|
|