[Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --
Peter Karman
peter at peknet.com
Wed May 9 15:26:09 GMT 2007
Dave Rolsky scribbled on 5/9/07 8:57 AM:
> On Wed, 9 May 2007, Peter Karman wrote:
>
>> * subclass subclass subclass
>
I meant that as in 'pound this into my own brain' rather than 'always do this'.
As in, 'remember that if an existing module does 90% of what you want, it is
probably better to subclass and extend/override than re-invent the whole wheel.'
unless of course it isn't. ;)
> My experience tells me that lots of subclassing is a bad smell.
> Delegation is often simpler and less fraught with possibility for name
> conflicts.
What do you mean by delegation?
>
> Perl's inheritance mechanism is particularly egregious, of course. SUPER
> is broken, and without private methods or attributes of any sort, it's
> really easy to step on your parent's internals and break things.
>
>> * a couple levels of indirection can increase re-usability immensely
>
> "All problems in computer science can be solved by another level of
> indirection" (Butler Lampson)
>
> ... except the problem of having too many levels of indirection.
>
exactly. which is why I said 'a couple.' ;) Everything in Moderation.
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the Catalyst
mailing list