[FLOW3-general] Handling of CLI requests
Bastian Waidelich
bastian at typo3.org
Fri Jul 15 13:25:36 CEST 2011
Dennis Ahrens wrote:
Hi Dennis,
> I can imagine many cases where i'd like to call the same piece of logic
> (action or command) from both, web and CLI, which seems not possible
> without redundancy.
That was also my first oppinion on this and if you look at
http://forge.typo3.org/issues/4469 the (my) original plan was, to make
already existing actions available through the CLI.
It turned out, that in reality you can't really use the exact same code
in most of the cases.
Besides controllers should be as "thin" as possible in the first place,
so you usually put complex computations into other layers (service,
domain, ...) anyways.
If you look at the existing commands, the redundant code is negligibly
little.
The CommandController implementation still uses all of the MVC concepts
by the way (RequestHandlerResolver, RequestBuilder, ...).
Best
Bastian
More information about the FLOW3-general
mailing list