Re: Hibernate
Re: Hibernate
- Subject: Re: Hibernate
- From: Ramon Havermans <email@hidden>
- Date: Thu, 26 Feb 2009 08:46:59 +0100
I think in a ideal world the database should be the most restrictive
(if performance will not be lacking) and have all validation as it can
be used for more than one application and can be edited directly, but
the validation that can be done earlier should be done earlier, not
putting any complex checking of more than field validation on the view.
That would mean that you have validation on more than one level and
duplicated. As developers are lazy there should be a tool in which you
could define all your validation and that this validation goes to the
view, model and database where appropriate and should hide the
complexity of the validation that takes place at every level.
Met vriendelijke groet,
On Feb 26, 2009, at 7:15 AM, Anjo Krank wrote:
Am 26.02.2009 um 02:50 schrieb Chuck Hill:
Not sure for Anjo ... but one reason I can think of where
validation defined in the model is that this means that differing
applications using the same model (where the requirements may be
slightly different) are restricted to the same rules. Sometimes
good though.
That is a good point. Validations seem like something that
properly ought to be in the model. Maybe in cases like these, code
validations are the way to go? You could always alter the model at
load time, though that always seems like obscure hackery to me.
But then again, validation should keep you from - guess what -
invalid data out of your DB. So I kinda have a hard time imagining
the same model with different requirements. If it has, it's not the
same model anymore?
Cheers, Anjo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden