Re: Repositories, package dependencies, and domain-flavoured exceptions
- From: Jason Che-han Yip <jcyip@xxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 19:07:09 +1000
Nick Malik [Microsoft] wrote:
I think I understand what you are trying to say.
Here's how I read your problem:
You are restricting the use of your "domain" classes in an attempt to get strict adherance to seperating concerns (Kudos). However, you have a situation where the strict rules of dependency are reversed, in that the exception type itself has to be used by the "domain" class to generate an error that the "action" classes can understand... without running afoul of your enforcement mechanism.
(please correct me if I didn't get that right).
That's pretty much it.
I can see a couple of practical alternatives:
a) Always return a customer. By that, I mean that a search that would normally return "no customer found" would return a "null customer" that the other classes can understand.
I like this the best and considered it, but for pragmatic reasons, didn't go this route. Too late in the game...
.
- References:
- Repositories, package dependencies, and domain-flavoured exceptions
- From: Jason Che-han Yip
- Re: Repositories, package dependencies, and domain-flavoured exceptions
- From: Nick Malik [Microsoft]
- Repositories, package dependencies, and domain-flavoured exceptions
- Prev by Date: Re: Repositories, package dependencies, and domain-flavoured exceptions
- Next by Date: Re: Repositories, package dependencies, and domain-flavoured exceptions
- Previous by thread: Re: Repositories, package dependencies, and domain-flavoured exceptions
- Next by thread: Re: Repositories, package dependencies, and domain-flavoured exceptions
- Index(es):