Sure is good to see the fusebox list getting back to being a
good list again. This is a GREAT thread, lots of good stuff
to pick through and learn in this one.
Bill
> -----Original Message-----
> From: Nat Papovich [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 15, 2000 2:01 PM
> To: Fusebox
> Subject: RE: the dot notation
>
>
> Right, Jeff, but the question lies in "What is an
> application?"
>
> In your example, there is one (capital "A")
> Application, which has many
> other circuits that it controls. But in the
> proposed style, every circuit
> runs by itself, without any controlling
> Application. There is no app_locals
> (relative to each circuit) or app_globals
> (relative to the Application).
> There is only "globals.cfm" or, as Halbert calls
> it "myGlobals".
> Some implications included the necessity for a
> cfapplication tag in EVERY
> "circuit" (although we can longer think of them
> as circuits and instead as
> discreet applications):
> <cfif not IsDefined("application.applicationname")>
> <cfapplication name="Search" ... >
> </cfif>
> which will set up the application if there is not
> one already called, and
> will defer to the calling application's
> cfapplication tag if one has already
> been called during this request.
>
> So the trick arises when you have these
> "main-Application-wide queries" that
> very well should be shared across multiple
> applications. This is where
> Fusedocs come in. By declaring a certain
> application or request scoped query
> available to a given fusebox, you can share
> stored information across
> applications. Usually, there is no need to create
> a Fusedoc for an
> index.cfm. Fusedocs tend to be reserved for Fuses
> (individual files). But
> when the time comes to cfinclude an index.cfm,
> you're treating it like a
> fuse! So this concept of encapsulation and
> non-dependance with explilcityly
> stating relationships applies to every portion of
> the application, from the
> cfincluded index files, down to the Fuses.
>
> Hopefully, Jeff Peters' follow-up post will be
> here by now, and this will
> just be a summation of his example. If not, "Get
> your arse in gear Jeff, and
> show us an example of Fusedoc-ing an
> Application-wide query to multiple
> indexes!"
>
> Oh, this is great stuff.
>
> Nat Papovich
> Webthugs Consulting
> ICQ 32676414
> "If it was hard to write,"
> says the Real Programmer,
> "it should be hard to understand." (particularly
> relevant to the topic at
> hand, eh?)
>
>
> > -----Original Message-----
> > From: Marsh, Jeffrey B [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 15, 2000 9:17 AM
> > To: Fusebox
> > Subject: RE: the dot notation
> >
> >
> > You should scope one query to the application
> scope and use
> > it where needed.
> > Each circuit is not really dependent upon
> anything from any
> > other circuit.
> > Each circuit is using information available to
> any template in the
> > application.
> >
> > Hey notice I'm spelling "circuit" correctly now? :-)
> >
> > ---
> > Jeffrey B. Marsh
> > professionals built the Titanic
> > amateurs built the Ark
> >
> > -----Original Message-----
> > From: Nat Papovich [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 14, 2000 5:54 PM
> > To: Fusebox
> > Subject: RE: the dot notation
> >
> > It must have been all that work on the book -
> the book that
> > Craig and Hal
> > claimed all the credit for. Yeah, that's it. If
> Hal and Jeff
> > P are coming up
> > with such good ideas, they must not be working hard!
> >
> > I second the notion that FB should steer in the
> direction of
> > cfinluding
> > indexes. There are a few more questions I have
> though, like
> > sharing code
> > amongst circuits. What happens if I have an
> application-wide
> > query like:
> > SELECT * FROM STATES
> > and I want to scope the query to
> application.stateslist and
> > then scope that
> > to request.stateslist. Does every single
> circuit app need
> > this thing? What
> > if Jeff calls his circuit's query
> "request.listStates" and
> > Hal calls his
> > "request.StatesList", and then Noam makes a
> stored procedure
> > that really
> > speeds up that query and names his
> "request.StatesQuery".
> > Now, you have 3
> > separate piles of memory taken up, when only
> one would do. What's the
> > convention for sharing stuff across circuits?
> Each circuit is
> > not supposed
> > to rely on anything else from any "wrapper"
> circuits, but in the case
> > mentioned above, you really should break the
> rules for a massive
> > time-savings.
> >
> > NAT
> >
> > > -----Original Message-----
> > > From: Steve Nelson [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, December 14, 2000 3:58 PM
> > > To: Fusebox
> > > Subject: Re: the dot notation
> > >
> > >
> > > JEBUS save me!
> > >
> > > Nat.... why are we such lunkheads?!
> > >
> > > btw, for anyone that cares.... I just
> finished a pretty
> > slick tool for
> > > importing data from my backend database into
> Microsoft Money
> > > (accounting
> > > package). I'm pretty sure the same thing
> could work with
> > > Quicken and/or
> > > Quickbooks.
> > >
> > > Steve Nelson
> > > http://www.SecretAgents.com
> > > Tools for Fusebox Developers
> > > (804) 825-6093
> > >
> > > Hal Helms wrote:
> > > >
> > > > Ah, yes, I've got it now! Just a little
> slow on the upbeat...
> > > >
> > > > Anyway, if you place this in your
> myGloblals.cfm file, then
> > > #images# will
> > > > point to a directory called images below
> the nested fusebox:
> > > >
> > > > <cfset images = "#GetDirectoryFromPath(
> > > GetCurrentTemplatePath() )#images\">
> > > >
> > > > Hal Helms
> > > > == See www.ColdFusionTraining.com
> > > <http://www.ColdFusionTraining.com> for
> > > > info on "Best Practices with ColdFusion & Fusebox"
> > > training, Jan 22-25 ==
> > > >
> > > > -----Original Message-----
> > > > From: Steve Nelson [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, December 14, 2000 1:30 PM
> > > > To: Fusebox
> > > > Subject: Re: the dot notation
> > > >
> > > > Hal,
> > > >
> > > > the problem Nat is having is if all
> requests go through the root
> > > > index.cfm file, then calling an image in a
> local circuit app with:
> > > >
> > > > <img src = "images/localImage.jpg">
> > > >
> > > > would always point to the /images directory
> under the root
> > > directory,
> > > > not a /images under the circuit directory.
> > > >
> > > > make sense?
> > > >
> > > > Steve
> > > >
> > > > Hal Helms wrote:
> > > > >
> > > > > Nat,
> > > > >
> > > > > It seems to me you have two situations:
> one where the images are
> > > > > application-wide and the other where they
> are specific to
> > > a circuit app.
> > > > The
> > > > > application-wide one I do with a
> request.images variable
> > > set to a specific
> > > > > directory. The "local" images are just in
> a directory
> > > beneath the circuit
> > > > > app, so calling them is like this:
> > > > >
> > > > > <img src = "images/localImage.jpg">
> > > > >
> > > > > I'm not sure what the problem is, or am I
> missing something?
> > > > >
> > > > > Hal Helms
> > > > > == See www.ColdFusionTraining.com for
> info on "Best
> > Practices with
> > > > > ColdFusion & Fusebox" training, Jan 22-25 ==
> > > > >
> > > > > -----Original Message-----
> > > > > From: Nat Papovich [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Thursday, December 14, 2000 11:52 AM
> > > > > To: Fusebox
> > > > > Subject: RE: the dot notation
> > > > >
> > > > > I got no question with using directory
> names instead of
> > > dots, but my real
> > > > > questions lie in the situation where
> someone uses purely
> > > cfinclude to call
> > > > > circuit apps. Is there anyone out there
> that does that?
> > If you use
> > > > > cflocation to direct to circuit apps, or
> even cfmodule, I
> > > don't wanna hear
> > > > > about it - only cfincludes.
> > > > >
> > > > > As for the request.images_dir - it's a
> great plan because
> > > it will work
> > > > > whether you have images in the circuit,
> or in the root
> > > images dir, or even
> > > > > on a different server like you mention, Alan.
> > > > >
> > > > > Namaste,
> > > > >
> > > > > Nat Papovich
> > > > > Webthugs Consulting
> > > > > ICQ 32676414
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: McCollough, Alan
> [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Thursday, December 14, 2000 7:47 AM
> > > > > > To: Fusebox
> > > > > > Subject: RE: the dot notation
> > > > > >
> > > > > >
> > > > > > I've got my images stored on a separate
> box, and use an
> > > > > > #request.images_dir#
> > > > > > to refer to the actual location of
> these guys. Its worked
> > > > > > like a champ. Fer
> > > > > > example, once upon a time the box with
> the images had to go
> > > > > > down for a day,
> > > > > > so I just copied the images to a
> different webserver, and
> > > > > > edited the value
> > > > > > of request.images_dir in
> app_globals.cfm. Worked slick and I
> > > > > > didn't even
> > > > > > have to restart CF or nuthin'.
> > > > > >
> > > > > > As for the dot notation and what not, I
> tend to avoid it. I
> > > > > > normally mark up
> > > > > > any calls for page elements as
> "#request.website_dir#/{the
> > > > > > subfolder}/whatever.cfm". I've found
> it keeps things easier
> > > > > > to manage when
> > > > > > I'm looking for what came from where...
> > > > > >
> > > > > > Alan McCollough
> > > > > > Web Programmer
> > > > > > Allaire Certified ColdFusion Developer
> > > > > > Alaska Native Medical Center
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Nat Papovich
> [SMTP:[EMAIL PROTECTED]]
> > > > > > > Sent: Wednesday, December 13,
> 2000 10:25 PM
> > > > > > > To: Fusebox
> > > > > > > Subject: RE: the dot notation
> > > > > > >
> > > > > > > Well well well.
> > > > > > >
> > > > > > > > <cfset
> request.imagesroot="http://images.funkynat.com">
> > > > > > > > <cfoutput>
> > > > > > > > <img
> src="#request.imagesroot#/products/156.gif">
> > > > > > > > </cfoutput>
> > > > > > >
> > > > > > > If I'm building the products app as a
> standalone, I don't
> > > > > > think that I'm
> > > > > > > at
> > > > > > > http://images.funkynat.com/products.
> I think I'm a
> > > > > > images.funkynat.com.
> > > > > > > Requiring any given app to know where
> it lives in the
> > > > > > "rest" of the app I
> > > > > > > believe defeats the purpose of the
> dot notation and
> > > > > > cfincluding indexes.
> > > > > > > To
> > > > > > > allow an index to be cfincluded
> willy-nilly, it cannot rely
> > > > > > on anything
> > > > > > > outside it's own relative self. Am I
> right here? Can
> > > > > > someone who's built
> > > > > > > one
> > > > > > > of deez suckers step up and explain?
> > > > > > >
> > > > > > > Namaste,
> > > > > > >
> > > > > > > Nat Papovich
> > > > > > > Webthugs Consulting
> > > > > > > ICQ 32676414
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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