RE: Aggregates with dependencies

Mauro Servienti <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <0D71C042265E7B4D871B59569C7774D73BFABF81@AMXPRD0310MB390.eurprd03.prod.outlook.com>
Well, I see security as a business concern, at least in our scenario, we have business people expression security related statements that drives our model and every single time they speak about something done (an event) they say "something done by someone" so in our model the "issuer" of an event is part of the domain event.

We have everything, from commands to queries driven and trimmed by security, and adding this as a metadata (something that can be easily done due to our infrastructure) only complicates things under the hood.

.m

From: [email protected] [mailto:[email protected]] On Behalf Of Greg Young
Sent: venerdì 15 febbraio 2013 10.01
To: [email protected]
Subject: Re: [domaindrivendesign] Aggregates with dependencies



""Treat it as meta-data" means that your domain-model classes, commands and events do not explicitly have properties and methods that relate to this data."

Yes. Unless for say a Transaction Object in the domain model you might end up with it as its a domain concern.

Beyond that its not generally stored in the event. You can imagine that every event has arbitrary metadata stored with it.

On Fri, Feb 15, 2013 at 10:58 AM, Willem van Gool <[email protected]<mailto:[email protected]>> wrote:


"Treat it as meta-data" means that your domain-model classes, commands and events do not explicitly have properties and methods that relate to this data. You typically access meta-data from a 'context' like Thread.CurrentPrincipal and use that for authorization/logging purposes; when sending off a command or event, the serialized stream typically also contains some kind of header which may contain this meta-data.

On Fri, Feb 15, 2013 at 9:46 AM, Christopher Cornacchia <[email protected]<mailto:[email protected]>> wrote:
What does that mean: "treat it like meta-data"?  How are you supposed to treat meta-data?
Sent via BlackBerry by AT&T

-----Original Message-----
From: Willem van Gool <[email protected]<mailto:[email protected]>>
Date: Fri, 15 Feb 2013 08:43:28
To: <[email protected]<mailto:[email protected]>>
Subject: Re: [domaindrivendesign] Aggregates with dependencies





Greg, Dan, I'm with you on this. It sounds like a typical security/principal case where the security context is constructed by querying some authorization service. Other than that, once you have the necessary info, treat it is meta-data...

On Fri, Feb 15, 2013 at 9:29 AM, Dan Haywood <[email protected]<mailto:[email protected]> <mailto:[email protected]<mailto:[email protected]>> > wrote:





+1



On 15 February 2013 08:22, Greg Young <[email protected]<mailto:[email protected]> <mailto:[email protected]<mailto:[email protected]>> > wrote:



 I would add the user not as part of the event but as metadata describing the event. It is very common to include context information in metadata (such as security context or machine that did it etc).


Greg







------------------------------------

Yahoo! Groups Links






--
Le doute n'est pas une condition agréable, mais la certitude est absurde.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.