[Solar-talk] Partials/Tiles/Elements/Components/Something
Andreas Ravnestad
andreas.ravnestad at gmail.com
Sun Nov 5 09:16:02 PST 2006
Paul M Jones wrote:
> On Nov 5, 2006, at 10:12 AM, Rodrigo Moraes wrote:
>
>
>> On 11/5/06, Andreas Ravnestad wrote:
>>
>>> Excellent, this is pretty much exactly what I want :) What I did
>>> further
>>> was to add your hack to the class Solar_View:
>>>
>> [...]
>>
>>> Pretty and perfect! Any chance something like this could
>>> officially be
>>> added to Solar?
>>>
>> I've hacked your hack:
>>
>> class Vendor_View_Helper_Component extends Solar_View_Helper {
>>
>> public function component($action)
>> {
>> $front = Solar::factory('Solar_Controller_Front');
>> return $front->fetch($action);
>> }
>> }
>>
>> :-)
>>
>
> Rodrigo, this is exactly what I was going to suggest. Well done.
>
> Having said that, I'm not a fan of the component idea; as others in
> this thread have noted, even the Rails guys have determined that
> components are not that great. But if it does what you want, then it
> does what you want. :-)
>
Yes, from what I have been able to tell, the common opinion is that
"fat" components are bad, and I completely agree with that. However, for
lightweight bits and pieces I use often and at several places, it's
perfect :-)
And thanks to Rodrigo for his hack, good stuff :)
-Andreas
More information about the solar-talk
mailing list