Re: [Maypole] Multiple controllers

From: Dave Howorth (dhoworth at mrc-lmb.cam.ac.uk)
Date: Thu Jan 13 2005 - 15:20:54 GMT


Perrin Harkins wrote:
> Vsevolod (Simon) Ilyushchenko wrote:
>> I may choose to show date as one text field, or as three numerical
>> fields. Depending on this, I will initialize my date checker objects
>> differently to use different validation rules. So the object
>> initializing the date checkers should know something about the
>> presentation, and I decided to let controllers rather then models to
>> initialize (and store) the checkers.
>
> It sounds like what you are currently doing is more along the lines of
> the compromise I mentioned -- using something like Data::FormValidator
> in the controller, even though it kind of breaks MVC, because it's so
> much easier. I do this too, but would like to have better separation.

I'm interested in this area and haven't ever seen any complete
solutions. Data::FormValidator looks interesting but I haven't had time
to try it yet. Simon, is there any chance of you posting [some of] your
code so we can get a better idea of the advantages and drawbacks that
you have found?

I don't hold MVC as an ideal, so I'm not too worried about breaking it.
I do have a soft spot for Martin Fowler's facades.

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT