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

Robert Lemke robert at typo3.org
Thu May 28 10:33:19 CEST 2009


Hi Sebastian,

On 28.05.2009, at 10:25, Sebastian KurfŸürst wrote:

> Hi Robert,
>
> I feel that the domain object and its connected repository belong
> closely together, so to me it makes sense to have BlogModel and
> BlogRepository in the same directory.
> Same for the validation: As the BlogValidator validates the Blog  
> Domain
> Object, Validation is a property of the Domain Model and should thus
> reside in Model\BlogValidator.

If you want them all in one namespace it would need to be like

\F3\Blog\Domain\BlogModel
\F3\Blog\Domain\BlogRepository
\F3\Blog\Domain\BlogValidator

but we shouldn't put a BlogValidator into a Model namespace - it's not
the model, is it?

> So, I would leave it as it is now, because to me, Blog, BlogRepository
> and BlogValidator are one single thing, and they inherently belong  
> together.

Just for the sake of discussion: We could also group the models by  
aggregates.


F3\
   Blog\
     Domain\
       Blog\
         BlogRepository
         BlogModel
         BlogValidator
         BlogOwnerModel
         BlogOwnerValidator
         BlogService
       Post\
         PostRepository
         PostModel
         CommentModel
         TagModel

Comments?

robert


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