On Sun, 21 Nov 2004 14:27:13 +0100, Magnus Wege <[EMAIL PROTECTED]> wrote:
> What do you think of a "global" CFC which has several standard methods for
> inhertited CFCs? But I don't know if it is a good idea to inheret all CFCs
> from one "application CFC"??

It isn't. Inheritance for reuse is bad. Inheritance should be reserved
for "is-a" relationships and using it to facilitate code reuse like
this can get you into a mess. It would prevent you using inheritance
for real "is-a" relationships between these objects because you can
only extend one CFC.

There are exceptions of course but you should start from the premise
that it's a bad idea and really examine your classes and their
relationships. If you really do have a series of 'flat' CFCs (i.e.,
where no future additional CFC would ever extend anything outside this
series) and they all share methods that are absolutely identical in
every member of that series, then it might be a worthwhile refactoring
to create a base CFC and move those methods into it.

Mach II did this for the 1.0.10 release, refactoring some common code
out of Listener, EventFilter and Plugin up into a new BaseComponent
(terrible name).
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 1 invite

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
[EMAIL PROTECTED]

Reply via email to