Boy did that last paragraph seem to have a explicit contradiction.  What I
meant to say was:

carts are complex when considered with the operations that use them, so it
might need a lot of methods.  But at the same time, some of those methods
might be better served as members of a utility class that you pass the cart
to, rather than being actual memebers of the cart.  It depends on exactly
what role the cart CFC is designed to fulfull within the entire object
model.

Must be a friday afternoon.  ; )

barneyb

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Barney Boisvert
> Sent: Friday, October 03, 2003 2:42 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Length of a CFC
>
>
> With CFMX 6.1, you can put the function bodies (excepting CFARGUMENT and
> CFRETURN tags) in an include file and refernces with CFINCLUDE.
> However, I
> don't really like that, since it makes it harder to find stuff.
>
> "too long" is usually a matter of circumstance.  Is you object doing one
> discrete job and/or representing one discrete thing?  If so, then I'd say
> it's the right size.  If not, then you should be able to split it up.
>
> Knowing nothing about your app, I'd say 29 methods is pretty sizable, and
> definitely large if that's just public methods.  However, a
> shopping cart is
> a fairly complex item, so it might need that many.  At the same time, a
> shopping cart is probably nothing more than a collection of products, and
> some simple methods that loop over the collection and return summary stats
> (size, total items, total price, etc), so I'd definitely examing whether
> your cart is doing more than a cart should, and therefore needs
> to be broken
> into a couple CFCs that work together.
>
> barneyb
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Dave Cordes
> > Sent: Friday, October 03, 2003 2:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: [CFCDev] Length of a CFC
> >
> >
> > Some of my CFCs are getting pretty lengthy with all the actions
> > and queries
> > inside of them.
> >
> > One of my CFCs, "cart.cfc" in particular is almost 800 lines long
> > and has 29
> > individual methods.
> >
> > How long is too long and what do you do to shorten them?
> >
> > Thanks,
> >
> >
> > Dave Cordes
> > Macromedia Certified Professional
> > 636-265-0094 (Office)
> > 636-578-4235 (Mobile)
> >
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email
> > to [EMAIL PROTECTED] with the word '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
> www.mail-archive.com/[EMAIL PROTECTED]
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word '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
> www.mail-archive.com/[EMAIL PROTECTED]
>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word '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 www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to