[Solar-talk] Composite views
Robert Gonzalez
robert at everah.com
Fri Nov 2 23:20:31 CDT 2007
Paul M Jones wrote:
>
> On Nov 2, 2007, at 6:19 PM, Rodrigo Moraes wrote:
>
> I would argue that invoking any sort of business logic from the view
> is probably not a good idea.
I agree with this. Business logic is meant to be handled in the model
(isn't it?) and view logic handled by the view. I would consider the
inclusion/parsing of components at the display level the responsibility
of the view, then it would seem that the actual parsing of the business
logic would best be suited for a model type snippet.
> Instead, I'd say the controller should get the widget output and
> assign it to the view. So in the controller:
>
> $widget = Solar::factory('Vendor_Widget_News');
> $this->latest_news = $widget->latestNews();
>
> And then in the view:
>
> echo $this->latest_news;
>
Yeah, er, like that...
> Hope I'm not missing the point, and that I made sense. :-)
>
>
Nope, I think you got the point I was attempting to get at in my
original question. Thanks guys for the discussion.
More information about the Solar-talk
mailing list