in reply to Encapsulating web client side code in Perl modules?
we tend to use a Perl/CGI program to draw up the form (context 1) and when the user submits the form data some parameter gets checked to see what context we are in, and we accept the form data via the same program (context 2). The first lines of code in the program center around finding out what context it is supposed to be in. Furthermore the program has to have multiple sections of code, each dealing with actions related to a particular context
Hmmm ... that must be the royal we. I sure don't do that. I tend to break my applications into different *namespaces*. This not only gives cleaner code (and less to mentally chew on) but allows me to play apache tricks (no access control on display and/or results but access control on updates).
As for Ajax, you can have the same big ball of mud as you do with *normal* cgi - its just cleared the picture for you. The picture was cleared for me when the access control became a biz requirement and became crystal clear when I started using CGI::Application.
|
|---|