It all boils down to how much you value encapsulation.  I think it's
worth it, but that's just me.  I hate testing code, so the more
isolated each bit of code is the better.  I also work on
constant-development apps, so it's not a "build it and let it run"
type thing, I'm constantly making changes.  Consequently, I
encapsulate everything I can, and I can tell you it makes things MUCH
easier.

Your description of CFC use is rather like a CFINCLUDE, from what it
sounds like (correct me if I'm wrong).  Nothing wrong with that at
all, because the two are quite similar, and methods bring the added
advantage of scope isolation (one gripe with CFINCLUDE).  I prefer to
leave that stuff in CFINCLUDEs though, and save the CFCs for tasks
that really need them.  Again, that's totally personal preference, and
undoubtedly heavily biased my use of Fusebox.

For example, I have val_XXXX.cfm templates that take care of
validating a form.  They assume the FORM scope (actually 'attributes',
but whatever) exists, and blindly use it.  I'd never bother wrapping
that in a CFC, because the benefits are almost nil for the extra work.

cheers,
barneyb

On Mon, 17 Jan 2005 18:30:25 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> I guess I have to see more CFCs. The ones I've seen 'assume' that server,
> application, session, and client exist and do not have to be passed in. I
> usually even see request.DSN 'assumed' into the form. In your example (I see
> what your saying about the form processing CFC) this would fail as no
> request from a web service.
> This brings up the question if the overhead of writing and passing all of
> this data in order to encapsulate is worth it or just being dogmatic? It
> feels very much like dogma over use to me, but that's me.
> 


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 8 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190872
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to