[TYPO3-50-general] Last minute concept fix? Incosistent class naming for domain models ...
Daniel Pötzinger
nospam at nospam.de
Tue Jun 2 10:49:54 CEST 2009
Martin Kutschker schrieb:
> Daniel P?ötzinger schrieb:
>
>> 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:
>>
>> Domain/Model/
>> Customer/
>> Products/
>> Contract/
>> Order/
>> Payment/
>> ...
>
> Wouldn't that be like this?
>
> Domain/
> Customer/
> Customer.php (or CustomerModel.php)
> CustomerService.php
> CustomerRepository.php
>
Why not
The distiguish between Model and Service is from Eric Evans.
Model: all the Domain Model Classes: Entitys, Valueobjects,
Repositories, Manager, Factories...
Service: Serviceobjects that aggregate functionality of the model. In a
good style there are less services required - because most of the
functionality should have a natural root class where it belongs to. I
think that was the case to keep only service objects seperate.
Greetings
Daniel
More information about the TYPO3-project-5_0-general
mailing list