[Catalyst] Data::FormValidator Plugin

John Napiorkowski jjn1056 at yahoo.com
Sat Mar 24 16:30:10 GMT 2007



----- Original Message ----
From: John Napiorkowski <jjn1056 at yahoo.com>
To: The elegant MVC web framework <catalyst at lists.rawmode.org>
Sent: Saturday, March 24, 2007 12:12:29 PM
Subject: Re: [Catalyst] Data::FormValidator Plugin



----- Original Message ----
From: Tomohiro Teranishi <tomohiro.teranishi at gmail.com>
To: catalyst at lists.rawmode.org
Sent: Saturday, March 24, 2007 10:33:13 AM
Subject: [Catalyst] Data::FormValidator Plugin

Hi,

I am a big fun of catalyst freamwork  and I made a plugin for
Data::FormValidator called 'C::P::FormValidator::Lazy' . I am
wonderling if this plugin should stay in my local or  publish to CPAN.
 Can I have any suggestion??

I attach source code and also below is  subversion repo url.

http://tomyhero-perl-module.googlecode.com/svn/trunk/Catalyst-Plugin-FormValidator-Lazy/

thanks,

[code snipped]


Hi,

To be honest I think this is the kind of thing that we'd prefer to see done as a actionclass or controller/actionclass rather than as a plugin.  The reasoning is that a plugin becomes global and too many plugins polute the global namespace.  

The best practices that we'd like to promulgate is that a plugin should be something that extends or enhances the catalyst global system, adds functionality to the existing hooks, etc.

Anyway, I think that this was explained better in a draft update to the documentation, I'll peek in the archives and try to point you to it.   But you can look at the way the formbuilder actionclass and controller was made.  This started life as a plugin but was migrated to support the new best practices and now it's probably the most popular form system for catalyst.

--john

The best practices doc I was talking about is being worked on at:

http://474.at/lab/ExtendingCatalyst.pod

and there's quite a discussion for it on the developer's mailing list at:

http://lists.scsys.co.uk/pipermail/catalyst-dev/2007-March/000608.html

It's a good place to start and also contribute what's lacking.

BTW, I hope my post is not discouraging to you in any way.  I know that there has been a lot of pain around the best way to extend catalyst, and there was an early plugin manual that encouraged people to use this method exclusively.  Also it's so easy :)  Let me know if you have questions or want to bounce items off --john





 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

_______________________________________________
List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/





 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 



More information about the Catalyst mailing list