Understood and I agree.

I also do a validate() and save() as separate calls.

Thanks for clarifying.

Alan


On Jan 15, 4:57 pm, "Adam Haskell" <[EMAIL PROTECTED]> wrote:
> You can refer back to Sean's earlier statement: "Right, but that can still
> be in the domain object rather than the
> service." So can it be in the domain object? Yes, and I probably should
> clarify my above story some now that I look back at it.
>
> "but it really is the spouse's lawyer's duty to *inform *the spouse that the
> documents are valid" I see it as the lawyers job to say yes this is valid
> and give it to the spouse. That does not mean the service is Intelligent
> enough to know whats valid, the model (probably through the same domain
> object[package]) would generally provide the rules for valid/good. The
> service is just intelligent enough to know where to go to get the answers.
>
> I'm much more comfortable with doing 2 calls in my service, model.validate();
> model.save(), instead of Model.save() and have the save do the validation.
> Doing model.save makes my service not much more a facade which isn't what I
> want. Additionally in our environment we have multiple validaters, some of
> which should not, in my opinion, be part of the domain's concern. An example
> of this would be Enterprise vs domain specific validation. Something like
> name is 35 characters and does not have cross sit scripting is Enterprise
> concerns and part of the validation across all applications irregardless of
> domain. Where as address must be in the US is domain specific to Contest
> entries. The converse is true too though if you put too much in the service
> layer your domain model becomes anemic.
>
> Adam Haskell
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to