[TYPO3-mvc] Extbase Domain-Service

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Wed Dec 23 00:31:21 CET 2009


Thanks Jochen,

is there already some sort of sample extension
or sample code I could have a look at? Or a manual,
tutorial, howto? Whatever! ;o)

Thanks,
Thomas


Jochen Rau schrieb:
> Hi.
> 
> schrieb Thomas "Thasmo" Deinhamer:
>> Regarding DDD I read that processes that don't belong to
>> the domain of a model or a repository, could or should
>> be handled by services - which are also available in Extbase.
>>
>> I'd like to calculate the current stock amount of a product,
>> based on several circumstances, like a number of products
>> which are not available or another number of products which
>> are on reapair etc.
>>
>> Furthermore I need to predict the available stock amount
>> also based on a given, specific date.
>>
>> The predicted stock amount for a specific date should then
>> be displayed in the frontend.
>>
>> How can this be done? Do I need a service for this, or can
>> this be handled inside the product model or the controller?
> 
> A Tx_..._Domain_Service_StockCalculatorService seems to be a good choice 
> to me.
> 
> The product model is not aware of how many other products are in stock.
> 
> The controller has no clue about the domain logic of the business case. 
> It should be as 'thin' as possible.
> 
> Regards
> Jochen
> 
> 


More information about the TYPO3-project-typo3v4mvc mailing list