Re: Problem with webobject attributes in WOBuilder
Re: Problem with webobject attributes in WOBuilder
- Subject: Re: Problem with webobject attributes in WOBuilder
- From: Paul Lynch <email@hidden>
- Date: Tue, 20 Jun 2006 10:47:09 +0100
On 19 Jun 2006, at 12:43, John Stewart wrote:
On 6/18/06, Guido Neitzer <email@hidden> wrote:
Misunderstanding. My fault. I don't do validation in the controller.
I do validation in the model. But I catch the validation errors in an
"EditPage" class and inherit from this class to build my concrete
edit pages.
What do you define by validation? If it's simply 'shape' of data,
then of course that can exist in the Model. But surely the
'significance' of the data can depend on Controller state, hence
should be validated at Controller level?
Exactly, although I wouldn't quite phrase it like that. In some
processes, validation depends on the controller state, or the
navigation status of the site; in others, it can depend on the model
status. This can be represented as a workflow, where a model object
has to move through different states, each with a different validation.
The view layer should not be 'aware' of validation; the controller
may well set up different view objects according to the validation,
but this isn't the same as having the view involved in validation.
BTW, I don't describe site navigation as 'workflow'; navigation is
entirely controlled by the controller layer (although it may interact
with model objects to do so). Workflow, in my terminology, is to do
with state changes in model objects. Sorry for the confusion.
Paul
_______________________________________________
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