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

Daniel P?ötzinger nospam at nospam.de
Mon Jun 1 20:35:01 CEST 2009

Robert Lemke schrieb:
> Hi folks,
> (please answer in typo3-project-5_0-general)
> while writing a little app based on FLOW3 I once more realized that our 
> conventions for the naming of the model and repository classes are not 
> consistent. Our names currently look like these:
> \F3\Blog\Domain\Model\Blog
> \F3\Blog\Domain\Model\BlogRepository
> \F3\Blog\Domain\Service\BlubbService
> \F3\Blog\Domain\Model\BlogValidator
> you see?
> The consistent alternative would be something like:
> \F3\Blog\Domain\Model\BlogModel
> \F3\Blog\Domain\Repository\BlogRepository
> \F3\Blog\Domain\Service\BlubbService
> \F3\Blog\Domain\Validation\BlogValidator

That might look good on the first place - but normally thats not how you 
want to group your Domain Model.
If the application grows you rather want to group them in packages (with 
high coupling - low cohesion) like:


In each package I expect classes that belongs into that package - and 
that can be Repositories Factories or Validators (as long as they belong 
to the domain layer)

And you can use refactoring to further group your classes if things 
begang to become too big...
Thats far more complex if I have this (to the domain meaningless) 

To keep the Service folder separate does not really fit - but follows 
the idea that a service is a rarly thing that might need more than only 

my 2 cents


Daniel Pötzinger

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