Don't feel bad, Patrick. Every so often, I run the idea around that we
should collapse all variables into a single scope. People generally think
I've lost my mind, so I slink back into the woodwork for a few more
months...
What do you do when you get queries with multiple rows?
-----Original Message-----
From: Patrick McElhaney [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 12:59 PM
To: Fusebox
Subject: Re: fusedoc query: unused vars?
John Quarto-vonTivadar wrote:
> I like your nomenclature better (although I don't disagree with the
original
> +++ idea since the ensuing fuse *will* be dependent on your query file
> anyway),
No it won't. It's dependant on the attributes that are passed out of the
query file and into some other fuse(s).
> but I do wonder what the renaming to Attributes scope point is.
We consolidate all of our input from the front-end (URL, Form, Attributes)
into one scope. Why not do the same for data that comes from the back end?
By copying query data to the attributes scope, I can work with that data
in other fuses without having to worry about the query that it came from.
> What does it do that isn't done with everyone else's query files (where
the
> variable remains available in the QUERY scope)?
That's just it. It may be available, but WHERE it's available? That answer
could be different for each fuseaction the fuse is used in (unless you do
it my way, which is to always put the same data in the same place).
> how is your choice of RDBMS
> in any way affected by your translating the query results into attribute
> vars?
It's not the choice of RDBMS. It's the fact that the structure of the
database may change, or I may throw in a middle tier, or maybe I'll move
from RDBMS to LDAP, etc.
> and are there any implications for Neo where it's expected that the
> dot notation will always imply (and create-on-the-fly) a structure?
No.
> Wouldn't you have been as well served by something akin to a
> CF_FORMURLQUERY2ATTRIBUTES tag ? (or just CF_Query2Attributes so you don't
> have to reproduce all that typing each time (after all one of the points
of
> the original post was 'do you really use Fusedocs for all your query
files?'
> so certainly a custom tag makes some sense).
I'd thought about a <CF_Query2Attributes> tag that would be called within
the qry_ file, but I've found the extra typing is worth the clarity and
flexibility that copying each field by hand provides. For example, there
have
been times when the database provided first, middle and last name, but my
app only needed name. So what I did is
<cfset attributes.name = myQuery.firstname & " " & myQuery.lastname>.
I actually consider this technique fundamental to the value of fusebox but
whenever I share it with others they think I'm weird. Everyone seems to
equate rapid development with minimal typing.
Patrick
----------------------------------
Patrick McElhaney <><
Intranet / Web Site Developer
American City Business Journals
704-973-1019 704-236-8351 (cell)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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