[TYPO3-50-general] Last minute concept fix? Incosistent class naming for domain models ...

Nino Martincevic don at zampano.com
Thu May 28 21:59:30 CEST 2009


Hi Bastian,

Bastian Waidelich wrote:
>  >> Does a BlogRepository belong to the domain of repository
> 
>  > Domain of what ... repository???
>  > Another abstract layer or concept?
>  > ;-)
> 
> Ok, maybe not the best wording ;)
> What I meant: A developer would probably feel a stronger separation 
> between Blog model and Blog repository than between Blog model and Post 
> model.

Uhm. "Feel" a separation? Well, a repository is always connected to some 
part of the model, i.e. always to an AR. Indeed it is only there for 
being the entry-point to an AR, it has no other responsibilities.

As being a concept of DDD, an in-memory simulation of "living" objects, 
a repository is not really a part of the "business domain" as a logical 
unit, but a part of the domain for ensuring consistency of the AR.

>> Don't focus too much on the Repository being a retreiving-only entity.
> 
> I don't. But the semantics of a repository are still different from 
> those of a model object IMO.

Sure they are. Nobody contradicts that, does one?
"Model object" is not focused enough term in DDD, is model an AR, an 
entity, a VO?
Again: Models don't have repositories, AR's have.

>> The answer to
>>  > Does a BlogRepository belong to the domain of repository or to the
>>  > domain of blog?
>> should be clear then...
> 
> uhm, nope.. what is your answer to Roberts question? ;)

At first it was an answer to your above question.

And as second it was to Robert's: organize your model parts (AR's 
repositories and all other domain objects) into "logical" modules, i.e. 
for complex domains into Context Boundaries.

But in general IMHO it is not that important, it's more important to 
have a clear context and consistency boundary in your domain objects 
instead of a clear directory structure.

In most cases you have an domain that changes frequently the deeper you 
get into the ubiquitous language and discover concepts that have to be 
refined.

Cheers!








More information about the TYPO3-project-5_0-general mailing list