Hi George --
> From the time I first started tinkering with CGI, just
> 3 years ago, I always thought that submit buttons were
> greatly under-utilized in maintaining state. Between
> this, and the recent discussion on this group about
> 'finite state machines', I thought I could use submit
> buttons to that end, within the framework of
> CGI::Application.
As I said in my previous message, I am 100% certain you are capable of
making it work with CGI::Application. The question really is, *should* you
do it! What does it gain you, and at what cost?
> My setup is only 15 lines, excluding comments, and 5
> of those are calls to $self->param(). I thought this
> was pretty compact. Perhaps I abstract out some of
> the excess using cgiapp_init()?
You have to include all the lines of code in all your other functions, such
as runModePerButton(), getSubmittedCrud(), autoDefine(), etc. At any rate,
I'm not talking about compression for space's sake, or a quantitative means
of evaluating your code. My suggestion provides only a qualitative and
anecdotal method of analyzing your application structure.
> Unfortunately this could never work for the system I
> am envisioning, because, even if you are in the middle
> of a 'create' of a new record, the back button is a
> 'read' of the previous page's data.
I don't see why this couldn't work:
<form>
<input type="hidden" name="rm" value="read">
<input type="hidden" name="thingy_id" value="4321">
<input type="button" value="Back">
</form>
If anything, binding a button called "Back" to a run-mode called "read" is
MORE easy using run-modes as opposed to button names.
> I still believe I am getting great benefit from
> CGI::Application. I was going to use CGI.pm and
> HTML::Template anyway, so it gives me a wrapper around
> the two of them: scaffolding so to speak. This is my
> first project on this scale so its nice to have a firm
> foundation to fall back on, as well as the support of
> this email group (which I hope I am not abusing).
I'm glad you find the module useful. You asked for some feedback, and I
hope the feedback you received has helped you evaluate your implementation.
Warmest regards,
-Jesse-
----
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]