This may be obvious but I'm a bit confued about what you're asking.

I think it's important to note that CFCs are not merely "method
libraries" as you might create with UDFs. 

They are best used when you create a CFC that represents a real-world
class of objects (e.g. contacts), and you instantiate it to represent an
individual object belonging to this class (e.g. "Michel"). 

The methods are then things like getFirstName(), setEmail(),
serialise(), delete() -- i.e. they are actions you perform on the
object.

I would generally create a contact cfc for working with just one
contact, and a contacts cfc for working with aggregate contacts --
browsing, searching, etc. The contacts cfc would generally simply return
a query record set. 


-----Original Message-----
From: Michel Deloux [mailto:[EMAIL PROTECTED] 
Sent: Friday, 21 October 2005 7:16 a.m.
To: CF-Talk
Subject: Re: CFC - separate or all in one?

Thanx Barney.

In resume: separate for concerned tasks is the best approach? This is
THE OO approach, right?

Cheers

MD

2005/10/20, Barney Boisvert <[EMAIL PROTECTED]>:
> Depends on the component(s).  Are the method closely related so as to 
> comprise the behaviour of a single "thing", or are they varied in 
> nature?  In general, you want each object to be concerned with a 
> single specific task.  How big that task is can vary greatly, of 
> course.
>
> cheers,
> barneyb
>
> On 10/20/05, Michel Deloux <[EMAIL PROTECTED]> wrote:
> > Hi all
> >
> > what's the best: separate functions/methods in several components or

> > include all methods in a same component?
> >
> > Cheers
> >
> > MD
> > =
>
>
> --
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
>
> Got Gmail? I have 100 invites.
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221738
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to