Re: Domain Model and Service Layer
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 19:13:08 GMT
Responding to Mikeon...
Hello!
I'm working on a domain model (accorting to DDD) where I represent a user as an entity.
Creation of a user is handled by a factory i.e.:
UserFactory uf = GetFactory();
User user = uf.CreateUser("name", "login", "email");
There are lots of possible solutions. Here's one...
[Client]
| *
|
| R1
|
| invokes
| 1 1 R3 invokes
[UserFactory] ------------------- [Notification]
| 1 + sendEmail(...)
|
| R2
|
| creates
| 1
[User]
Here the factory invokes Notification::sendEmail with the appropriate [User] data when a User is created. The Notification formats the eMail message sends it off the someone else (perhaps in a network service subsystem) who handles the grunt work of dumping it on the 'net.
The main point is that the Factory has to notify somebody who understands eMail messages when it creates a User object. Whether that "somebody" delegates the details of internet message protocols or not depends on what sort of implementation environment one has.
*************
There is nothing wrong with me that could
not be cured by a capful of Drano.
H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
"Model-Based Translation: The Next Step in Agile Development". Email
info@xxxxxxxxxxxxxxxxx for your copy.
Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php.
(888)OOA-PATH
.
- References:
- Domain Model and Service Layer
- From: mikeon
- Domain Model and Service Layer
- Prev by Date: Re: Client/Service relationships & Flow of Requirements.
- Next by Date: Re: Hot to implement a Scheduler following the requirements...
- Previous by thread: Domain Model and Service Layer
- Next by thread: Re: Domain Model and Service Layer
- Index(es):