> You don't know what you are giving your object for?
Well, firstly if I use a Repository pattern, no. I would want to write
public interface ICustomerRepository
{
Customer GetByID(int id);
}
and obviously wouldn't want
public interface ICustomerRepository
{
Customer GetByIDForReasonX(int id);
Customer GetByIDForReasonY(int id);
Customer GetByIDForReasonZ(int id);
}
But let's say my app layer doesn't use a repository at all and has the fetch
code in it (which I wouldn't want to do). If the app layer instructs some
domain service to perform a task on the Customer why should the app layer
know which parts of the customer's state come into play? What if later I
need more state to be considered?
So,
Yes I know for what reason my object is being used (at the app layer)
No I don't know why in the repository
In neither case will I know what state is used within the service, that
kind of knowledge is too intimate
Pete
====
http://mrpmorris.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---