Jørn Wildt | 1 Dec 09:17
Picon
Favicon
Gravatar

Re: Generic repository IRepository<T> or concrete repository?

> I'm wondering, though, what benefit you get from the IRepository. Why 
> not just create ICustomerRepository? 

Yes, sorry, I wasn't clear enough. My response was to this single piece 
(I should have included that):

> But then we also (typically) do the following...
>
> CustomerRepository : Repository<Customer>, ICustomerRepository

Where ICustomerRepository comes from the domain layer and 
Repository<Customer> comes from the data layer. In this way you only 
see ICustomerRepository from the domain, while at the same time you get 
lots of help from the inherited Repository<Customer> when implementing 
CustomerRepository.

The actual instance of ICustomerRepository is created through an IoC 
container, so no one expects anything more than the interface 
definition from it.

> It gives you a marker so that you can recognize your repositories, 
> I suppose. You could use a special comment or an annotation for that.
> Is there some other benefit I haven't thought of?

Having made my statement above I must admit that we in fact also use a 
generic interface. I don't really like that fact, but, as you mention 
yourself, it works more or less as a marker interface.

This interface has the purpose of building generic UI controllers. We 
have a certain web component that can browse through a repository and 
(Continue reading)

Colin Jack | 1 Dec 10:08
Picon
Gravatar

Re: Ubiquity of Language

> My suggestion is this: if Role and Player is the right pattern to use
> then use it. Don't tell the domain experts. It isn't their problem.

Yeah definitely, I should have said "if you want to keep the ubiquity
of language then you have two choices".

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

Rafael Ponte | 1 Dec 13:20
Picon
Gravatar

Re: Re: Generic repository IRepository<T> or concrete repository?

I really think only interesting a generic repository to facilitate the creation of CRUDs, anything beyond this is prejudicial for domain. Because it's not necessary my repositories have methods like delete, insert or anything that shouldn't belong to them.


On Mon, Dec 1, 2008 at 5:17 AM, Jørn Wildt <jw <at> fjeldgruppen.dk> wrote:

> I'm wondering, though, what benefit you get from the IRepository. Why
> not just create ICustomerRepository?

Yes, sorry, I wasn't clear enough. My response was to this single piece
(I should have included that):


> But then we also (typically) do the following...
>
> CustomerRepository : Repository<Customer>, ICustomerRepository

Where ICustomerRepository comes from the domain layer and
Repository<Customer> comes from the data layer. In this way you only
see ICustomerRepository from the domain, while at the same time you get
lots of help from the inherited Repository<Customer> when implementing
CustomerRepository.

The actual instance of ICustomerRepository is created through an IoC
container, so no one expects anything more than the interface
definition from it.


> It gives you a marker so that you can recognize your repositories,
> I suppose. You could use a special comment or an annotation for that.
> Is there some other benefit I haven't thought of?

Having made my statement above I must admit that we in fact also use a
generic interface. I don't really like that fact, but, as you mention
yourself, it works more or less as a marker interface.

This interface has the purpose of building generic UI controllers. We
have a certain web component that can browse through a repository and
let the user add/edit/delete elements in that repository.

That web component relies on a UI controller which can either be custom
made or, and here is my point, use a generic controller. But to make a
truely generic controller we must also have a truely generic
repository - and the only way we could figure out to do that, was to
have the repository implement ICRUDRepository<EntityType>.

I guess your's or someone else' next reponse will be "But, hey, then
your repositories have a direct binding to the UI!". But, no, the
ICRUDRepository<EntityType> interface lives in the domain layer. It is
a bare bones interface we only add on those repositories that actually
implement all the CRUD-functions. In this way the domain/repository
tells the environment "Hey, I am a CRUD repository - it is really
simple to use me!".

Regards, Jørn

(and, BTW, thanks Eric for a nice talk at Oredev :-)




--
Rafael Ponte
http://www.rponte.com.br
__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
carlospeix | 1 Dec 15:38
Picon
Favicon

Re: Ubiquity of Language

--- "Adam Sroka" <adam.sroka@...> wrote:
> 
> My suggestion is this: if Role and Player is the right pattern to use
> then use it. Don't tell the domain experts. It isn't their problem.

Most of the domain experts or users I interact with can understand the
Role/Player pattern. May be I'm lucky.

They understand what a Company is and understand that the Company
exists independently of it being a Publisher or Advertiser for our domain.

They understand that you can "attach" the Publisher role to a company
and remove it later. They understand the can they can make a Company
or a Person (another player) a Publisher or a Advertiser.

I find the Player/Role patterns one of the most congruent with
business concepts.

Hats of for Mr. Coad and Ms. Nicola, I learn this pattern from their
books.

Regards

Carlos Peix

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

Casey Charlton | 1 Dec 09:17
Picon
Gravatar

Re: Ubiquity of Language

Randy originally wrote:
>>>>I wanted to apply some patterns like AccountabilityTemporal Object, and Role and Player, but my supposed "domain expert" was only a domain expert by proxy, in other words a product manager whose department I trained on domain modeling.  Not a developer by background, she was not prepared to appreciate the applicability of those patterns in our system.  So it was difficult-to-impossible to have deep conversations about required behavior using the more intricate language of those patterns.  Her language wanted to be more simple, consisting of obvious nouns in the problem domain, which tended to impose a simplistic model on the software. <<<

My confusion here is that I read this as Randy wanting someone *more* technical, as the "domain expert" here was not technical enough to understand these patterns. (Randy please correct me if I am wrong)

As Randy and yourself pointed out, this person was not really a domain expert, but the implication still seemed to be there that a domain expert should have understood some pretty advanced software patterns to allow Randy to create the advanced model he wanted.


Is it expected in DDD that domain experts are capable of "deep conversations about required behaviour using the more intricate language of those (software) patterns" - this would seem to be the opposite of my reading of DDD, and certainly a very long way from anything I would expect of domain experts. 

In fact - I would prefer domain experts to have no understanding of software at all, to allow the developers to create the correct technical implementation of the experts world, without bias by their (almost certainly limited) technical understanding.



2008/11/30 Eric Evans <eric <at> domainlanguage.com>

I suppose we need to be more specific about "software pattern". I don't
expect a business person to understand Template Method or Flyweight, but
I'd expect them to understand Ubiquitous Language. Some of them will
understand Aggregate in varying degrees. Just where that line is depends
on the individuals. I do think there are situations in which a Customer
needs to understand the consequences of some quite technical decisions,
but we can't expect them to understand all the technical intricacy. This
is a communications challenge, and related to DDD, but I don't think I
have whole lot to say on that topic, except that when people create
technical frameworks should keep in mind that the consequences of
decisions have to be explained to non-technical people.

But in Randy's original comment, in which he described the creation of
brittle software based on a naive model, he was speaking of a customer
who was not a true domain expert. This is a really important issue for
DDD practitioners.

Eric



Casey Charlton wrote:
>
> Randy seemed to be annoyed that domain experts did not recognize or
> understand some pretty advanced software patterns.
>
> I have never met a domain expert, let a alone customer or user, who
> understood or cared for even very simple software patterns.
>
> Is it the DDD view that software patterrns (which I consider to be
> implementation details) should me exposed or discussed with domain
> experts, and that they should enter the UL? My reading of DDD was not.
>
> Casey Charlton
>
> On 30 Nov 2008, at 19:26, Eric Evans <eric <at> domainlanguage.com
> <mailto:eric%40domainlanguage.com>> wrote:
>
> > I think it is important to distinguish the various roles that a
> > business
> > person can play in a software project.
> > There are three that are particularly important:
> >
> > *Customer/Stake* holder (ok, these are not exactly the same)
> > These are people who have responsibilities for defining scope,
> > choosing
> > the features to be developed, etc. This is connected to paying for the
> > development.
> >
> > *User*
> > This is a person who actually uses the software on a regular basis.
> > This
> > role is essential for usability of the UI. This person is usually
> > not a
> > Customer. This person may or may not be a domain expert.
> >
> > *Domain Expert*
> > This person may or may not be a Customer. May or may not be a User.
> > What
> > this person must be is someone who works in the field, and has done so
> > for quite a while, in a capacity that gives him/her some breadth of
> > understanding. So a clerk who has worked in a business for many years
> > might be a good User, but not a good Domain Expert. A Domain Expert
> > can
> > answer questions not only about how the business works, but WHY the
> > business works that way. A Domain Expert is almost never a technical
> > person (including software analysts).
> >
> > The lack of these distinctions leads to the kind of confusion we see
> > in
> > this thread. What Randy was saying is that he had a Customer who was
> > not
> > a Domain Expert. This is fairly common, because Customer is more of a
> > decision-making role, either management or delegated by management.
> > These people may or may not have deep experience in the field. In
> > such a
> > case, you can have Domain Experts who are not decision makers.
> >
> > Most interactions with Domain Experts are exploratory, not
> > decision-making. Often people are afraid to have these meetings
> > because
> > this is not clear. The idea of some programmer brainstorming with some
> > random business expert worries them because they feel they need
> > control
> > of scope. Yes, they do. So it has to be clear who the Customer is --
> > who
> > makes the decisions. Exploration produces possibilities. When
> > promising
> > possibilities emerge, the Customer needs to be involved to make
> > choices.
> >
> > When there is no Domain Expert, exploration doesn't work. Really
> > valuable options never emerge. The Customer chooses something naive
> > and
> > the resulting software is mediocre. It might be "simplistic,
> > brittle ...
> > kludgy, hackish".
> >
> > Don't assume all non-technical people are Domain Experts. You need a
> > Customer, but you need to be sure you have Domain Experts as well. If
> > you are lucky, they are in the same person, but that is not always the
> > case. And often it is useful to have multiple Domain Experts anyway,
> > to
> > provide fresh perspectives and to improve availability.
> >
> > Eric
> >
> >
> > Randy Stafford wrote:
> >>
> >> Adam Sroka wrote:
> >>
> >>> Domain experts shouldn't need
> >>
> >>> to read Fowler. They should keep themselves firmly in the domain.
> >>
> >> If they are able to recognize patterns in the domain, then they are
> >> more expert than otherwise. If not, ubiquitous language breaks down
> >> when the development team sees the applicability of patterns that the
> >> "domain expert" doesn't, and speaks the language of those
> >> patterns.
> >>
> >>> I still can't picture how the customer's understanding of the domain
> >>
> >>> can lead to bad technical designs. Perhaps a naive understanding of
> >>
> >>> the domain leads to a naive implementation, but your description
> >>> of a
> >>
> >>> "simplistic, brittle ... kludgy, hackish" system doesn't seem like
> >>
> >>> something that a domain expert should have the power to create. No
> >>
> >>> offense, but this sounds like a failure of imagination to me.
> >>
> >> No offense, but that sounds like a failure of humility to me. You
> >> weren't there, so you can't speak with any authority about the
> >> situation. When the "customer" / domain "expert" in question
> >> is the
> >> head of product management of an ISV, responsible for specifying
> >> requirements for the company's product, and has no expertise in
> >> requirements analysis and specification including domain modeling,
> >> she
> >> absolutely does have the power to create a system that is overly
> >> simplistic, and not able to implement the behavior required of it,
> >> and
> >> less fitting and useful to the users than it otherwise might be, in
> >> my
> >> considered opinion. "Before you criticize someone, walk a mile in
> >> his
> >> shoes" –Sarah Jackson
> >>
> >> Regards,
> >>
> >> Randy
> >>
> >>
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>


__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
Peter Morris | 1 Dec 18:15
Picon
Gravatar

Re: Ubiquity of Language

>>
As Randy and yourself pointed out, this person was not really a domain
expert, but the implication still seemed to be there that a domain expert
should have understood some pretty advanced software patterns to allow Randy
to create the advanced model he wanted.
<<

There seems to be a blurring of lines here.  The shared language is to 
define the requirements, what exists, what happens and when, etc.  How you 
implement it in code is of no concern to the person explaining the 
requirements.

As I always say to my boss
"Tell me what you want me to do, not how to do it!"

Vice vera, if the only way you can communicate the model to the domain 
expert is to illustrate coding practises then you are not talking in the 
ubiquitous language, you are only listening in it.

Pete
====
http://mrpmorris.blogspot.com
http://www.capableobjects.com 

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

Colin Jack | 1 Dec 18:27
Picon
Gravatar

Re: Ubiquity of Language

> There seems to be a blurring of lines here. The shared language is to
> define the requirements, what exists, what happens and when, etc. How 
> you implement it in code is of no concern to the person explaining the
> requirements.
> 
> As I always say to my boss
> "Tell me what you want me to do, not how to do it!"
> 
> Vice vera, if the only way you can communicate the model to the domain
> expert is to illustrate coding practises then you are not talking in 
> the ubiquitous language, you are only listening in it.

Are you saying that you would allow the language you use in
discussions with the domain expert to be very different to the
language you use in your code?

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

Casey Charlton | 1 Dec 19:04
Picon
Gravatar

Re: Re: Ubiquity of Language

Wouldn't that be the other way around... Technical language shouldn't enter the UL? My reading was that the UL is driven by the domain experts.

Casey Charlton


On 1 Dec 2008, at 17:27, "Colin Jack" <colinjack <at> hotmail.com> wrote:

> There seems to be a blurring of lines here. The shared language is to
> define the requirements, what exists, what happens and when, etc. How
> you implement it in code is of no concern to the person explaining the
> requirements.
>
> As I always say to my boss
> "Tell me what you want me to do, not how to do it!"
>
> Vice vera, if the only way you can communicate the model to the domain
> expert is to illustrate coding practises then you are not talking in
> the ubiquitous language, you are only listening in it.

Are you saying that you would allow the language you use in
discussions with the domain expert to be very different to the
language you use in your code?

__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
Geoffrey Wiseman | 1 Dec 19:36
Picon
Gravatar

Re: Re: Ubiquity of Language

On Sun, Nov 30, 2008 at 3:58 PM, Colin Jack <colinjack <at> hotmail.com> wrote:
I think that even if you have domain expert(s) they may struggle with
some of the temporal patterns

Perhaps, in that language, but if they recognize the need for such patterns and their implications when describing the domain, it's all the same.  You don't necessarily need your domain expert to understand "Temporal Patterns", but you might need them to distinguish whether or not it's important for an invoice line-item to retain the price at the time of purchase vs. always reflect the current known price of an item.

That's the kind of knowledge I expect a domain expert to carry, and if they can't recognize the business implications of those kinds of domain patterns, then you're going to have a harder time keeping the lines of communication clear, IMO.
 
  - Geoffrey
--
Geoffrey Wiseman
http://www.geoffreywiseman.ca/
__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
Adam Sroka | 1 Dec 19:46
Picon
Gravatar

Re: Re: Ubiquity of Language

On Mon, Dec 1, 2008 at 1:08 AM, Colin Jack <colinjack <at> hotmail.com> wrote:
>> My suggestion is this: if Role and Player is the right pattern to use
>> then use it. Don't tell the domain experts. It isn't their problem.
>
> Yeah definitely, I should have said "if you want to keep the ubiquity
> of language then you have two choices".
>

No. What I mean is that the ubiquitous language is a pidgin. There are
terms on either side that aren't relevant to the shared discussion and
sharing them only confuses the issue.

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


Gmane