[Catalyst] Re: Shoot out -- Catalyst / RoR / Other MVC apps --
Adam Clarke
adam.clarke at strategicdata.com.au
Thu May 10 01:36:50 GMT 2007
On 10/05/2007, at 1:51 AM, Dave Rolsky wrote:
> On Wed, 9 May 2007, A. Pagaltzis wrote:
>
>> Delegation means that the caller communicates only with the
>> object that delegates and doesn’t know which object does the
>> actual work. That’s not what’s happening in your example.
>>
>> Something like this would be delegation:
>>
>> sub trail_length {
>> my $self = shift;
>> $self->breadcrumbs->trail_length;
>> }
>>
>> Here the caller talks only to VegGuide::Response and doesn’t even
>> know that there’s a VegGuide::Breadcrumbs object behind the scene.
>
> I think there's a name for tha pattern I'm using, but I can't
> remember it or find a good reference online.
Would that be the factory method pattern?
http://en.wikipedia.org/wiki/Factory_method_pattern
--
Adam Clarke
www.strategicdata.com.au
More information about the Catalyst
mailing list