Similar position to Dan, but I have only just started using CGI:App (and OO
Perl) and now becoming a little overwhelmed with all of the additional
modules about.  Until recently I have been using Perl CGI.pm HTML::Template
and Mysql encapsulated in Perl modules, and a Mydefault.pm for config data.
So I had got much of the way to a CGI:App architecture.

I liked the simplicity of the examples in the documentation and the wiki and
have now gone into helper module scope creep.

1.  Class:DBI is great.  And if you need some clever joins then you can code
your own sql in their db modules (like I used to before).

2.  Up until now I have been doing form validation mainly in client
Javascript to pick mandatory fields etc.  However Validate
RM/Data::Form::Validator looks like a way forward since "you can't trust the
client".  I can't seem to find any documentation on the Plugin::architecture
and how it works.  Specifically I want to clarify the role of Exporter since
I never really understood it from my non-OO perl modules other than it let
you break the scope rules (I came from Pascal).   And I usually exported too
much.

3.  Has anyone developed a generic class based on Class::DBI that supports
"codes tables".  Up until adopting DBI.pm, I always rely on a generic codes
table to store fairly static application decodes that really don't need
their own table.  Some of the codes are keyed on language (error message
decode) and also have an effective date (e.g. new menu option). Primary key
is type/code/lang/effective date.

Here are a few rows from one which is probably a better illustration.
+----------+------+----------+------------+------------+
| type     | code | language | edate      | decode     |
+----------+------+----------+------------+------------+
| sex      | M    | EN       | 2001-09-01 | Male       |
| sex      | F    | EN       | 2001-09-01 | Female     |
| entity   | M    | EN       | 2001-09-01 | Member     |
| entity   | O    | EN       | 2001-09-01 | Opposition |
| entity   | V    | EN       | 2001-09-01 | Venue      |
| contact  | th   | EN       | 2001-09-01 | Home       |
| contact  | tw   | EN       | 2001-09-01 | Work       |
| contact  | tm   | EN       | 2001-09-01 | Mobile     |
| contact  | fh   | EN       | 2001-09-01 | Home Fax   |
| contact  | fw   | EN       | 2001-09-01 | Work Fax   |
| contact  | em   | EN       | 2001-09-01 | Email      |
| contact  | ct   | EN       | 2001-09-01 | Club Tel   |
| contact  | cf   | EN       | 2001-09-01 | Club Fax   |
| language | en   | EN       | 2001-09-01 | English    |
| language | nl   | EN       | 2003-09-01 | Dutch      |
+----------+------+----------+------------+------------+

My aim would be to be able to access the "decode" directly from the
HTML::Template by declaring a relationship solely in the Class::DBI.  E.g.
error decode message in from ValidateRM and labels for fields in the
original forms themselves.

Or am I barking (mad) up the wrong tree?

O.

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Mark Stosberg
Sent: 04 October 2004 20:35
To: [EMAIL PROTECTED]
Subject: [cgiapp] Re: Form validation

On 2004-10-04, Dan Horne <[EMAIL PROTECTED]> wrote:
> ------=_NextPart_000_000C_01C4AAAC.B0595D80
> Content-Type: text/plain;
>       charset="US-ASCII"
> Content-Transfer-Encoding: quoted-printable
>
> Hi all
>=20
> I've been using CGI::App for a while now, and I really like it - makes 
>=  me  wonder how I got by without its functioanlity before =20  
>However, I am really tired of writing my own data validation routines, 
>=  so  it's time to use one of the Data::FormValidator derivatives. 
>Should I =  assume  that CGI::Application::Plugin::ValidateRM is now 
>the preferred =  alternative  to CGI::Application::ValidateRM?

They both provide exactly the same functionality. However, Yes, using the
version in the "Plugin" name-space is preferred. 

At some point I will update the docs of the other version to clarify this.

        Mark

--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   [EMAIL PROTECTED]     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to