On Feb 8, 2008 1:33 PM, Sharon Rosner <[EMAIL PROTECTED]> wrote:
>
> I've had a private exchange with Florian regarding model validations
> and the validated plugin, and I'd like to ask other people to join in
> on the discussion. As it is, this plugin completely replaces the
> validation functionality offered by sequel_model + assistance, and
> adds functionality missing in the original implementation, such as
> raising a validation error, validation hooks etc.
>

If it provides a better "model" of validations, like Florian early
mentioned and what you comment, is a welcome replacement of
assistance.

> Florian maintains that the validation functionality should be separate
> from sequel_model in order to keep sequel_model small and nimble. But
> anyway, sequel_model uses validation functionality provided by the
> assistance gem. I moved the validations code out of sequel_model and
> into assistance with the intention that it would be useful to share
> this kind of functionality with other libraries, such as DataMapper
> (Sam Smoot is indeed interested!)

Separate form sequel_model doesn't meant "to be optional" from it's behavior?

I agree that adding that code inside sequel_model adds complexity, but
making a optinal plugin prove not be a good alternative.

Also, if the set of new validations could replace the assistance one
(on which gem we currently depend on), I'll look forward for it,
instead of annoying 'is :validated' all over the place.

> IMO it would be better to take Florian's code and integrate it into
> the assistance gem, instead of making it available as a plugin. For
> me, putting this kind of core functionality into a plugin creates
> confusion, and adds another step that people have to make (to load the
> plugin) before they can use validations.

I agree, If we are modeling our objects, validations should be part of
them, by default, not optionally.

Also, if we currently depends on assistance implementation, both
validations schemes will not be compatible.

-- 
Luis Lavena
Multimedia systems
-
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to sequel-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to