[TYPO3-mvc] How to design/structure complex find operations?

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Jan 24 15:40:35 CET 2011


Hey,

> let's assume i got a controller action which is supposed to find and
> output a list of records. The find conditions, orderings, query settings
> and limits should vary on lets say:
> - controller::settings (e.g. defined by the pluginsflexform)
> - controller::arguements.
>
...
> I am currently thinking of something like this:
>
> Controller uses findConfigurationFactory to create a findConfiguration
> object from given settings and arguments.
>
> Controller passes findConfiguration to Repostitory::findByFindConfiguration
>
> Repository::findByFindConfiguration creates query, constraints,
> orderings and limits from findConfiguration, executes the query and
> returns the result.
>
> That would enable me to seperatly test:
> - The creation of the findCondition
> - The creation of constraints, limits and orderings.
>
> Though this solution seems more clean to me it still feels a little
> "smelly" and incomplete.
>
> Furthermore i don't like the name "findConfiguration".

have you had a look at the demandObject concept yet which is f.e. used 
by Jochen sjr_offer extension? There should also be some related posts 
already on the list. If you don't find them, just ask again.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list