> The one positive aspect of FormURL2Attributes is that it prevents 
> you from having to worry about the difference between form and URL 
> vars--and I do like that, but I think we're paying a pretty high 
> price for that.
If that's the ONLY positive, can't you just use request? :)

The problem seems to be that we're talking about two different 
branches of the methodology. XFB, and traditional Fusebox. Since,
XFB doesn't really use custom tags, most of this scope talk is
irrelevant.

However, with all due respect, I don't think you understand the
concept of using circuits as custom tags. (That's okay, because I
don't understand the nesting thing ;-)) The keyword is 
ENCAPSULATION. If a circuit is intended to be called as a custom
tag, it won't know anything about where it will be used. Sure, it
can see form variables, etc., but it shouldn't try to use them,
because doing so would violate encapsulation. 

A circuit either functions as module of a larger application, or
as the application itself. If it's a module, its
interface is the attributes scope. If it's the application 
itself, its interface is HTTP (i.e. FORM & URL variables). 
CF_FormURL2Attributes is intended to map those three different
interfaces into one standard interface -- so that a circuit
can be used interchangeably as an application or a module.

This is a great idea, but they messed up by mapping everything
to ATTRIBUTES. FORM, URL, and ATTRIBUTES are input parameters. 
They carry the information to the circuit, and that's all their 
meant to do. Before you can mess with them, you should copy them 
to the circuit's local scope: VARIABLES. 

Why is this necessary? If you have an application that calls
a module via a custom tag, you don't want the module to get
the input intended for the larger application. You don't want
a circuit being used as a custom tag to read FORM variables, 
because those variables weren't meant for the custom tag.

Patrick


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to