[Catalyst-dev] Advent 2007

Zbigniew Lukasiak zzbbyy at gmail.com
Fri Nov 9 14:54:11 GMT 2007


On 11/9/07, Peter Karman <peter at peknet.com> wrote:
>
>
> On 11/09/2007 04:08 AM, Zbigniew Lukasiak wrote:
>
> > It assumes that $params contain validated and filtered parameters.
> >
>
> Interesting that you post this. I was working on something similar (a DBIC
> query-creator-from-params method) last night for CatalystX::CRUD::Model::DBIC.
> My problem is that I am not DBIC person (I use RDBO) and so am unfamiliar with
> best-practice-idioms.
>
> Care to comment on this?

I should perhaps wait for the more seasoned hackers here - but one
thing that I've started to realize recently is that you frequently
need the same filters and validation for search parameters as you have
for forms that create/update things.  For example - if the create form
lowercases the email - then in the search you should lowercase it as
well.  Of course there will be some differences - but it should be
generally easier to start with the create profile and then derive a
search profile   from it then to start from scratch.

And for the parameter validation/filtering I would use some kind of
form parameter processor - as I've described at:
http://www.perlfoundation.org/perl5/index.cgi?form_processing


-- 
Zbigniew Lukasiak
http://perlalchemy.blogspot.com/



More information about the Catalyst-dev mailing list