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), but I do wonder what the renaming to Attributes scope point is.
What does it do that isn't done with everyone else's query files (where the
variable remains available in the QUERY scope)? how is your choice of RDBMS
in any way affected by your translating the query results into attribute
vars? 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?

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).


----- Original Message -----
From: "Patrick McElhaney" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 9:28 AM
Subject: RE: fusedoc query: unused vars?


>
> > Patrick,
> >
> > That's interesting. Do you do it within the query file or with a
> > custom tag or somewhere else?
>
> Here's an example of one of my qry_ files. It seems tedious, but
> it's really worthwhile. It accomplishes two things:
>
> 1) Allows me to reuse files that expect those attributes a lot
> more easily. For example, I can use the same form for data entry,
> display/updates, and errors.
>
> 2) Decouples the database from the fusebox. If my database
> changes, or if I move to a completely different backend (such
> as servlets, LDAP, WDDX, etc.) I only have to change one file,
> and the fusedoc doesn't even have to change.
>
> BTW, this is a big part of why I include qry_ files in the
> index.cfm.
>
>
>
> Patrick
>
>
> <!---
>   ||BEGIN FUSEDOC||
>
>   || Properties ||
>   Author: Patrick McElhaney ([EMAIL PROTECTED])
>   Created: 2001.03.29
>
>   || Responsibilities ||
>   I get the profile for the specified user.
>
>   || History ||
>
>   || Attributes ||
>   ==> username : STRING
>   <== fistname : STRING
>   <== lastname : STRING
>   <== email : EMAIL
>   <== phone : STRING
>   <== address : STRING
>   <== spousename : STRING
>   <== comments : STRING
>   ||END FUSEDOC||
> --->
>
>
> <cfquery datasource="#request.dsn#" name="temp">
>   SELECT * FROM users
>   WHERE username = '#attributes.username#'
> </cfquery>
>
> <cfscript>
> attributes.firstname = temp.firstname;
> attributes.lastname = temp.lastname;
> attributes.email = temp.email;
> attributes.phone = temp.phone;
> attributes.address = temp.address;
> attributes.spousename = temp.spousename;
> attributes.comments = temp.comments;
> </cfscript>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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