[Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --

Christopher H. Laco claco at chrislaco.com
Wed May 9 15:29:17 GMT 2007


Dave Rolsky wrote:
> On Wed, 9 May 2007, Peter Karman wrote:
> =

>> * subclass subclass subclass
> =

> My experience tells me that lots of subclassing is a bad smell.
> Delegation is often simpler and less fraught with possibility for name
> conflicts.
> =

> 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.
> =

> =

> Which no doubt you've all heard before, but it's worth remembering.
> =

> =

> -dave

I've done both. Subclassing seems best when it's just mild Adapter-ism
and common code for multiple related adaptors
(Mango::Provider->Catalyst::Model in this case).

Handel is interesting that way. It started life in CDBI world, which is
all about subclassing, and being CDBI objects. When 1.0 got reworked, I
went to delegation to a storage layer so I could do DBIC, RDBO, XML, and
anyhting else I felt brave enough to do. And of course, new storage is
all about subclassing, and delegation is about using the storage.

In the end, to each their own. All software sucks. :-)

-=3DChris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070509/0d74=
84d2/signature.pgp


More information about the Catalyst mailing list