Open jjn1056 opened 8 years ago
the thing that makes me think about this is that in Catalyst we have chaining which is great but since we bust up the pipeline over several actions we end up using stash or similar to maintain state and then we have to send the full state all at once to the view. Part of me would like to build up the view in steps across each action in the chain. That way we can avoid being forced to maintain state just for the reason of giving it all to the view at once and we can also call methods on the view rather than passing data (which I think is a win since I think its preferable when doing object oriented programming to deal in methods not data...)
One thing that comes up is that I'd like to build up transforms to a template over several calls to a render like method. That way if you have a transform pipeline you can avoid the need to maintain a state object.
Perhaps we could have a type of result intermediate class:
...
and then
my $html = $result->render;