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

Nino Martincevic don at zampano.com
Thu May 28 19:33:11 CEST 2009


Bastian Waidelich schrieb:
> Bastian Waidelich wrote:
> 
>> I am very much in favor of your first suggestion:
> 
> Though.. it depends of the DDD point of view..
> Does a BlogRepository belong to the domain of repository or to the 
> domain of blog?

Domain of what ... repository???
Another abstract layer or concept?
;-)

> For a developer it's probably the former - the code of all repositories 
> is kind of similar, the code of all model classes is similar...
> 

A Repository is the entrance to an Aggregate Root, when used (you don't 
need it for every AR) it should be the ONLY entrance. Therefore it is 
very closely related to the AR/model.

Don't focus too much on the Repository being a retreiving-only entity. 
It does retreive something, yes. But the ideal Repository only has one 
method: find().
All other querying and reading methods could (and should) be separated 
away anyway, either to the AR or a separate reading/reporting-only layer.

The answer to
 > Does a BlogRepository belong to the domain of repository or to the
 > domain of blog?
should be clear then...

Cheers!



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