Without the attributes scope you couldn't get the grand finale benefit
which is being able to create a custom tag out of your application using
cfmodule.

The way to pass variables into a cfmodule is through the attributes
scope.  If all your variables were local scope they would require that
you pass the variables in through only URL or FORM variables which means
you couldn't call your index.cfm file through cfmodule and have it work
properly.

Think about this.....

Look at CFFILE, CFMAIL, CFPOP, CFDIRECTORY

They all have an "action" attribute ("Fuseaction" in Fusebox).  Ever
wonder how you could create a custom tag with that "action" attribute? 
If the custom tag was simple enough you just create a file with a switch
statement in it and put your code in each case statement.  That's all
fine and good unless your custom tag is made up of 5000 lines of code,
at that point you want to break it out into multiple files because it's
a pain in the neck to deal with in a single file.  
  
Fusebox is designed to handle this.  By using the attributes scope you
can create custom tags with multiple actions out of your Fusebox
application.

Did that get you to the 100% mark?

Steve


"McCollough, Alan" wrote:
> 
> OOh, about 90%. But, I'm still waiting for the light bulb to turn on over my
> head. What is the benefit of saying "attributes.squid" instead of just plain
> old "squid" ?
> 
> Alan McCollough
> Web Programmer
> Alaska Native Medical Center
> 
> > -----Original Message-----
> > From: Steve Nelson [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, July 17, 2000 7:55 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Re: Need to toggle URL and FORM vars
> >
> > it's simple.
> >
> > by using attributes it allows you to do 3 things.
> >
> > 1) pass variables in from a FORM
> > 2) pass variables in from a URL
> > 3) pass variables in from a CFMODULE
> >
> > The attributes scope allows for a single scoping instead of having to
> > constantly switch back and forth when you want this functionality.
> >
> > The CFMODULE technique is only rarely used, but it's powerful as all
> > hell when you do use it.  Basically it allows you to create a CF tag
> > made up of multiple files.  The beautiful thing is that it works
> > identically to the way you create your normal application.
> >
> > Does that make sense?
> >
> > Steve
> >
> >
> >
> > "McCollough, Alan" wrote:
> > >
> > > OK, I'm now going to ask a question that is so shocking, so inane, that
> > I've
> > > gotta gotta ask it.
> > >
> > > I have never understood fully the benefits of using attributes. scoped
> > > variables instead of form. or url. scoped variables. Could somebody
> > please
> > > enlighten me? I'm sure I got beat up on the CF Developer's test on those
> > > questions...
> > >
> > > Alan McCollough
> > > Web Programmer
> > > Alaska Native Medical Center
> > >
> > > > -----Original Message-----
> > > > From: Fred T. Sanders [SMTP:[EMAIL PROTECTED]]
> > > > Sent: Saturday, July 15, 2000 7:54 AM
> > > > To:   [EMAIL PROTECTED]
> > > > Subject:      Re: Need to toggle URL and FORM vars
> > > >
> > > > well if your using formurl2attributes, then you can code them as
> > > > attributes.
> > > > scoped variables and it won't matter how your getting them.
> > > >
> > > > Fred
> > > >
> > > > ----- Original Message -----
> > > > From: "CM Randall" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Saturday, July 15, 2000 11:22 AM
> > > > Subject: Need to toggle URL and FORM vars
> > > >
> > > >
> > > > > I'm working with a site that is going to send me vars using either
> > URL
> > > > or
> > > > > FORM variables.  I have the code done for accepting URL variables
> > and I
> > > > want
> > > > > to find an easy way to dynamically convert all my URL.vars to be
> > > > FORM.vars
> > > > > in my code.  I can setup a CFIF statement to check and then send the
> > > > script
> > > > > to the correct code (either URL or FORM) but then I would have two
> > code
> > > > sets
> > > > > to manage.
> > > > >
> > > > > Is there a way to modify my current code to accept the other servers
> > > > > variables no matter if they are sending URL or FORM vars?  The code
> > for
> > > > both
> > > > > is 100% identical.
> > > > >
> > > > > Thanks,
> > > > > --RC
> > > > >
> > > > >
> > ________________________________________________________________________
> > > > > Get Your Private, Free E-mail from MSN Hotmail at
> > http://www.hotmail.com
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------------
> > > > ----
> > > > > To Unsubscribe visit
> > > >
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> > > > send a message to [EMAIL PROTECTED] with 'unsubscribe'
> > in
> > > > the body.
> > > > >
> > > >
> > > >
> > --------------------------------------------------------------------------
> > > > ----
> > > > To Unsubscribe visit
> > > >
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> > > > send a message to [EMAIL PROTECTED] with 'unsubscribe'
> > in
> > > > the body.
> > >
> > --------------------------------------------------------------------------
> > ----
> > > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> > the body.
> > --------------------------------------------------------------------------
> > ----
> > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
> > send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> > the body.
> ------------------------------------------------------------------------------
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to