Cedric, Although I am still fairly new to working with CFCs, (as evidenced by some of my recent posts), I think I understand their purpose. CFCs are the CFMX implementation of Object Oriented Programming (OOP). OOP is a way of tieing data and functions together. For instance, you define a CFC of Vehicle which has data properties of things like RunsOn (water, land, air), self-propelled (boolean), weight, color, MaxSpeed. It might also have functions that work with the data properties such as AdjustMaxSpeed(adjustmentValue) or ChangeColor(newColor). Then you might have a CFC that is Auto which extends Vehicle and adds data properties like NoWheels, NoCylinders, NoPassengers, MaxLoad. It might also have functions such as AdjustMaxLoad(adjustmentValue). It would also be able to call ChangeColor() even though it is not explicitly declared but inherits it from Vehicle. Then you might instantiate the CFC to MyCar = CreateObject(Car). Now MyCar represents a specific case of Car with particular values for the data properties.
If you are just building a few web pages and just need a function that CF doesn't have, then a UDF will probably work fine. But if you are building an integrated application, you might want to consider CFCs. Robert J. Polickoski Senior Programmer, ISRD Inc. (540) 842-6339 [EMAIL PROTECTED] AIM - RobertJFP ---------- Original Message ---------------------------------- From: "Cedric Villat" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Thu, 2 Jan 2003 09:06:38 -0800 >I'm wondering what the difference between a UDF and a CFC really are. Can't >I create UDF's which function just the same as a CFC with maybe a few >differences? Just pass the parameters in the function instead of using the >tag notation. Are there reasons why one would use a UDF instead of a CFC? Or >are CFC's just MX's way of dealing with functions? > >Cedric > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm