J
Jim Burns
Hi all,
I need some feedback on an issue. I use a perl script provided by a third
party that processes an html form. When I recreated the html form on my
end, initially identical to the third party form, things worked perfectly.
But then I set out to rearrange the html form elements in a better order on
the web page and the form broke inconsistently.
In chasing down this problem I discovered the form /never/ broke if the html
form elements were in the original order.
Now this has be terribly confused. I've been writing software for 15 yrs
and this immediately bothered me since the UI layers input elements should
have no effect on any backend processing.
But, allowing that I'm not web/cgi/perl expert, I must be missing something
on the technical end here.
My premise is that since any perl script would decode the input to get
access to the $name,$value pairs that make up the html's UI control names
and data, that it was unconscionable that the perl script ignore the UI
control names and process the data in an expected order. This is just
against all best practices in my experience. After all, in a normal
programming environment we don't tend to have data outside variables to hold
on to them with (variables, references, memory addresses).
I wrote the third party nicely asking for help and explaining what I thought
was the problem and the short answer I received was,
I briefly examined this perl script and determined tthat, in
this case, the order is important because the perl is piping
the input directly into a Fortran program, which is doing the
real work.
Ok so the only way I can see this explanation working is if the perl script
is somehow, literally, a mere conduit for the browser input and passes it on
to this fortran program without ever looking at, considering or touching the
data. This would be like using data without the variables that tell us the
type of that data or what that data is for.
Can this be done? I don't think so, can anyone provide some explanation if
so?
And, even so, then aren't we still back at the same point and doesn't my
same assertion hold? If the perl script merely streams the input from the
browser directly into another process then logically one could subtract the
perl script from the analysis and assert that the fortran program should be
properly decoding the input, using the UI element names AND their data and
processing the input properly based on the data name rather than expecting a
certain order.
In the end I just can't seem to justify how this third party can suggest
that it's not good practice at their end to be handling the input in this
way. And I assert there can be no way in which they MUST do it this way.
Thoughts?
If you want to see an example, you can visit,
my page: <http://www.ascentaviation.net/test_sunmoon.php>
their original: <http://aa.usno.navy.mil/data/docs/RS_OneDay.html#forma>
Many, many thanks in advance.
Jim
I need some feedback on an issue. I use a perl script provided by a third
party that processes an html form. When I recreated the html form on my
end, initially identical to the third party form, things worked perfectly.
But then I set out to rearrange the html form elements in a better order on
the web page and the form broke inconsistently.
In chasing down this problem I discovered the form /never/ broke if the html
form elements were in the original order.
Now this has be terribly confused. I've been writing software for 15 yrs
and this immediately bothered me since the UI layers input elements should
have no effect on any backend processing.
But, allowing that I'm not web/cgi/perl expert, I must be missing something
on the technical end here.
My premise is that since any perl script would decode the input to get
access to the $name,$value pairs that make up the html's UI control names
and data, that it was unconscionable that the perl script ignore the UI
control names and process the data in an expected order. This is just
against all best practices in my experience. After all, in a normal
programming environment we don't tend to have data outside variables to hold
on to them with (variables, references, memory addresses).
I wrote the third party nicely asking for help and explaining what I thought
was the problem and the short answer I received was,
I briefly examined this perl script and determined tthat, in
this case, the order is important because the perl is piping
the input directly into a Fortran program, which is doing the
real work.
Ok so the only way I can see this explanation working is if the perl script
is somehow, literally, a mere conduit for the browser input and passes it on
to this fortran program without ever looking at, considering or touching the
data. This would be like using data without the variables that tell us the
type of that data or what that data is for.
Can this be done? I don't think so, can anyone provide some explanation if
so?
And, even so, then aren't we still back at the same point and doesn't my
same assertion hold? If the perl script merely streams the input from the
browser directly into another process then logically one could subtract the
perl script from the analysis and assert that the fortran program should be
properly decoding the input, using the UI element names AND their data and
processing the input properly based on the data name rather than expecting a
certain order.
In the end I just can't seem to justify how this third party can suggest
that it's not good practice at their end to be handling the input in this
way. And I assert there can be no way in which they MUST do it this way.
Thoughts?
If you want to see an example, you can visit,
my page: <http://www.ascentaviation.net/test_sunmoon.php>
their original: <http://aa.usno.navy.mil/data/docs/RS_OneDay.html#forma>
Many, many thanks in advance.
Jim