Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Refining the CGI process through structure and templates

by Corion (Pope)
on Apr 16, 2001 at 20:14 UTC ( #72855=note: print w/replies, xml ) Need Help??

in reply to Refining the CGI process through structure and templates

I have sought similar and similarly found no all-in-one solution for my stuff. What I did come up with is HTML::FormValidator, which does some HTML form validation, but the validation isn't fully to my taste because I want synchronous JavaScript and Perl validation, or rather, JavaScript regular expression validation to save some round trips, which is fed from the Perl code / a database.

The one thing I've come up with which I like better than your approach is dividing the single pages into unlinked single pages and having an external structure that defines the order of my pages, like so :

my @pageorder = qw(welcome address notify done); my %pages = { "welcome" => \&page_welcome; "address" => \&page_address; "notify" => \&page_notify; "done" => \&page_done; }; my %validators = { "welcome" => \&validate_welcome; "address" => \&validate_address; "notify" => \&validate_notify; "done" => \&validate_done; };

but as you see, my layout is still mostly linear. Having some tree-like paths would be interesting and with my approach, the navigation component can be abstracted, but I haven't found a nice and good way to implement the chosen path (calling all possible validators isn't an option in a non-linear graph anymore :-) ).

Replies are listed 'Best First'.
Re: Re: Refining the CGI process through structure and templates
by markjugg (Curate) on Jun 03, 2001 at 19:27 UTC
    I like HTML::FormValidator, too. There is a review of it available.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72855]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2016-10-23 14:24 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.