> 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

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to