They're the solution to the same thing they're the solution for in
every other language; they allow sharing of a type hierarchy without
an inheritance hierarchy.  Mostly useful in API/framework code where
you're building something for other developers to hook into, but there
is some of that code in every application of decent size.

Does the average developer that dabbles in CFCs really need them?
Nope, and they can completely ignore their existence without downside.
Do people that prefer the dynamic typing that CF half-uses need them?
Nope, and they probably don't use explicit typing anywhere except the
'extends' attribute to CFCOMPONENT anyway.  Do people that prefer the
strong typing that CF half-uses need them?  Absolutely.

Here's a specific example.  I was working on an application a couple
years ago with a fairly shallow (three, maybe four levels) inheritance
hierarchy.  Requirements changed, and I needed to interface several
classes from that hierarchy with a separate module in a separate app.
The "right" solution would have been to subclasses those "special"
classes and implement the interface to make them work with the other
module.  Instead, I got to import some of the "client" app into the
main app and then create a combined inheritance hierarchy (adding a
couple new levels to a whole pile of classes that didn't need them,
plus the few that did), and basically bind the two separate chunks of
code together in a really ugly way.  That's why interfaces are
awesome.

It's worth mentioning that this fits the "API for other developers to
plug into" model I mentioned above.  I happened to be both developers
in this case, but that's just a coincidence.

cheers,
barneyb

On 5/21/07, Barry Beattie <[EMAIL PROTECTED]> wrote:
why "thank god"?

what pain have you come across where they're a practical solution?



On 5/22/07, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> CF8 has them, thank god.  Not much to debate anymore.  ;)
>
> On 5/21/07, Barry Beattie <[EMAIL PROTECTED]> wrote:
> > anyone wanna start a debate about CF and interfaces? that'll fill up
> > the chat logs...
> >
>
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> http://www.barneyb.com/
>
> Got Gmail? I have 100 invites.
>
>
> You are subscribed to cfcdev. To unsubscribe, please follow the instructions 
at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org
>
>


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org




--
Barney Boisvert
[EMAIL PROTECTED]
http://www.barneyb.com/

Got Gmail? I have 100 invites.


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org

Reply via email to