You're right.  In "Patricia World", you can define any set of rules you
like, and you're entirely correct in setting your own set of priorities.
Hopefully you extend the same courtesy to others to make their own choices
in their own world

But when multiple people interact some sort of common ground for interaction
must be found. Traditionally, Fusebox made use of CFMODULE calls to
implement certain functionality and to handle recursion of the fusebox
itself. Although the use of CFMODULE is no longer required with Fusebox 4,
before the advent of CF's "request" scope one way to commonly agree on
handling the "is called as module" question, without writing a bunch of
conditionals in your code, was to make use of copying form and url variables
to the attributes scope.  In the end, it's not much different than ASP's
request scope.

Fusebox is definitely not for everyone. But to those large number of
developers who do find it of benefit, one of the benefits is knowing certain
things will be a certain way. Even Fuseboxers who don't like using
attributes scope that way are still free to use FORM and URL since FB has a
standardized way for documenting that (XML-based Fusedocs).

Back to your assertion: with multiple ways for a particular incoming
variable to be passed in, your method couples what a template is supposed to
do with how it is to get its data. That means that if the action template of
some login functionality is written to operate only with FORM variables then
it will not operate with, say, URL variables, without your changing the
template. If your app business rules require FORM (and only FORM) source
variables then your tighter coupling makes absolute sense. But  you've now
created an action template that has to be modified to be re-used by another
form or by another app, and that other app now MUST have the same business
rule. Otherwise you're going to have to reach into that template and make
modifications, which is the surest way any programmer knows to introduce
bugs. Using a common scope as a source for incoming variables allows the
template to be more encapsulated from other templates, which means a higher
degree of code re-use. And then when business rules require a stricter
filter on incoming variables that can be applied on a case-by-case
documented basis, leaving the developer with a lot more flexibility on a
wider range of project types.

----- Original Message ----- 
From: "Patricia G. L. Hall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 11:05 AM
Subject: Re: Called as module or include?


> Not in my book.
>
> On Thursday, June 19, 2003, at 10:50  PM, John Quarto-vonTivadar wrote:
>
> > it also means you've created a tighter coupling between templates.
> >
> > ----- Original Message -----
> > From: "Patricia G. L. Hall" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, June 19, 2003 9:39 PM
> > Subject: Re: Called as module or include?
> >
> >
> >>   I hate trying to figure out whether an action is being caused
> >> because
> >> of a variable
> >> that could have been paramed, created by a query or sent in from a
> >> form
> >> or a url.  Especially when I have to pick up an existing FB app,
> >> scoping everything in the attributes scope has usually made more work
> >> for me, not less.
> >>
> >> On Thursday, June 19, 2003, at 04:15  PM, Bryan Love wrote:
> >>
> >>> For one, it adds definition to the code.  It's easier to see what's
> >>> going on
> >>> when the FORM or URL scope is explicity used.
> >>>
> >>> For two, there are a few times when you'll have a page that could
> >>> accept a
> >>> variabl via form or url.  In this case you MAY choose to leave the
> >>> variable
> >>> name unscoped so that either one will be picked up by the code, but
> >>> further
> >>> down in the same code you may need to distinguish between FORM or URL
> >>> to
> >>> determine a course of action.
> >>>
> >>> There are plenty more reasons hiding out there, but these are two I
> >>> can
> >>> think of right now...  I'm sure someone will berate me for even
> >>> mentioning
> >>> the second one, and to them I say "there is a time and place for
> >>> everything"
> >>> ;)
> >>
> >>
> >>
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to