perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <per...@elem.com>
Subject Re: [Maybe OT] Modular design - calling pages like a subroutine with a twist.
Date Thu, 15 Nov 2001 20:33:42 GMT
> I'll try to show how Apache::ASP could help here.  In Apache::ASP,
> scripts can be executed as subroutines, even with return values,
> and I think this goes to the heart of what you need here.

The original e-mail was confusing, but I think what he's after is not so
much the ability to call pages as subs but rather the ability to abstract
away the fact that a sub might actually involve multiple user interactions
(present a form, get a response, present another form, etc.) with breaks in
actual execution.  In other words, he wants to think of program execution in
terms of a linear user session (as you would with a GUI app) rather than a
series of separate requests.

In my opinion, trying to abstract that stuff away in a web application
causes to more problems than it solves, especially where back buttons and
bookmarks are concerned.  I think it's easier to take a state machine
approach, the way CGI::MxScreen or Apache::PageKit do.  (CGI::Application
sort of does, but it doesn't capture the relationships of states to each
other.)  With Apache::ASP, I think people would generally embed the state
transition logic in the pages, although this could probably be separated out
if you were careful about it.

- Perrin


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message