>> practice to code this relationship in an CFC.  How would the car code
send
>> and receive messages to the engine code?

>Objects talk to each other by invoking their instance methods.

And how would this look in the code of a CFC?

>I think you might be trying real hard to apply inheritance above (Car -
>Engine),
>to me this is more of abstraction - divide and conquer... not really
>inheritance.

Exactly, I have a pretty good idea of how to code and use inheritance
(designing them is another story).  My example was supposed to be an example
of relationship that WAS NOT inheritance, and how would one code cfc's for
this relationship?

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Joe Eugene [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 8:01 AM
To: CF-Talk
Subject: Re: CFC/Object Best Practice


> practice to code this relationship in an CFC.  How would the car code send
> and receive messages to the engine code?

Objects talk to each other by invoking their instance methods.

> themselves).  Anyway, using the ever present car object example.  You have
a
> car class/object that contains an engine class/object

I think you might be trying real hard to apply inheritance above(Car -
Engine),
to me this is more of abstraction - divide and conquer... not really
inheritance.

An example of Inheritance would be some like

Dog
 - Hunting dog
 - Pet dog

Both Hunting dog and Pet dog inherit the properties of DOG...(ie all Dogs
have 4 legs, 2 eyes, nose etc)
while Hunting dog itself has the extensive properties/features of a Hunting
Dog(vigilant ...)

Joe Eugene

----- Original Message ----- 
From: "Ian Skinner" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 10:42 AM
Subject: CFC/Object Best Practice


> Ok, I think I have a pretty good handle on how to code inheritance with
> CFC's, but I'm not so sure how you do aggregation and/or composition
(still
> learning the concepts of Object orientated programming as well as cfc's
> themselves).  Anyway, using the ever present car object example.  You have
a
> car class/object that contains an engine class/object.  What is the best
> practice to code this relationship in an CFC.  How would the car code send
> and receive messages to the engine code?
>
> Thanks
>
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> Sacramento, CA
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to