[Catalyst] Form validation in insert() and update()?

Matt S Trout dbix-class at trout.me.uk
Thu May 17 23:43:31 GMT 2007


On Thu, May 17, 2007 at 02:36:54PM -0700, mla wrote:
> Matt S Trout wrote:
> >On Wed, May 16, 2007 at 06:46:57PM -0700, mla wrote:
> >>I'm thinking Catalyst::Model should provide some sort of interface for
> >>this.
> >
> >This doesn't belong at the Catalyst core level since Catalyst is expressly
> >-not- opinionated about how your model is written.
> >
> >>If there was a consistent interface to the model that provided those
> >>functions then a lot of the standard data validation and CRUD stuff
> >>becomes dead single.
> >
> >Which we've done with great success with Reaction and the
> >Reaction::InterfaceModel system.
> > 
> >>Any generic model that wanted to be pluggable into Catalyst could
> >>provide that "attribute" interface (other models would still work,
> >>just not with anything that assumed the attribute interface was
> >>present), either directly or as a wrapper class.
> >
> >What myself and the other Reaction hackers are working towards is
> >
> >(a) a generalised collection interface
> >(b) a reflection system that's powerful enough to provide typed mutations
> >(c) an abstract representation of transactional mutations
> >
> >But it's a -bloody- hard job, and getting the design right is proving an
> >exercise in repeated iteration.
> >
> >What I'm hoping is we can get it all figured out in Reaction and then
> >abstract out what works into some sort of standard API - which I don't
> >think will need to depend on anything at all except for the Moose 
> >metaprotocol
> >interface (which would handle the 'attribute interface' part of what you're
> >describing). Once we have that, a Catalyst::Model::${whatever_we_call_it} 
> >can
> >be written to tie any collection of classes that implements this API into
> >a Catalyst app.
> 
> Yes, that sounds good. I see there's nothing on CPAN yet. Where can
> I find more on Reaction?

http://code2.0beta.co.uk/reaction/svn

We're holding off on a CPAN release on the grounds it's still relatively
experimental and at this stage we only want users who're willing to roll with
the fact if a piece of design turns out to be completely useless it'll get
obsoleted and replaced with something that isn't.

Discussion is happening on irc.perl.org#reaction primarily.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list