Hello

I'm been trying to use CFC's in a more OO way using a sort of MVC
methodology.  I'm getting my head round most of the concepts but I'm
kinda stumped at one question in my head,  Could anybody provide any
pointers?   When considering user input data from the View layer, should
data validation happen in the Controller or in the Model layer?

My own initial thinking was that the Model should just ensure basic
validation and throw an error if it encounters a value that is incorrect
(i.e. as long as it's numerical, then that's okay, if it's a string,
then throw an error, not interested in whether it's a number within a
certain range).  The controller has the main data validation and calls
the object only after all data has been validated.

I'm now seeing a lot of problems in my head with using this technique
and was hoping some of the OO crowd could give me some pointers in this
note.

TIA

--
dc
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to