Re: CFINVOKE - Component Location
On Thu, May 3, 2012 at 7:38 PM, Rick Faircloth wrote: > Why would CF begin to use dot notation for cfc's instead of sticking > with the familiar "../", etc, syntax? Because it represents the package and the component instead of the directory and the file, i.e. it represents a logical hierarchy instead of a physical one. One might even say that you are not supposed to know something as mundane as a filesystem location (an implementation, let CF figure out where it is), and should just work with the exposed functionality (the interface). Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350988 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
In all my work with CF, I have always housed my CFCs in a dedicated root directory (typically named CFC), and I just set up the path alias in CF Admin, so that all I ever have to use in the component attribute of the tag is the actual name of the component: CF knows where to find them. I only use dot notation when I have developed a full-on component "package" (which I have done a lot of). For example, we have a package here called RevCore, which is a component tree contained within a mapped directory (as above), where the leaf nodes are up to 5 levels deep, and everything extends a parent component, all the way up to the root RevCore component. The individual components are then addressed as such: -Christopher >Why would CF begin to use dot notation for cfc's instead of sticking >with the familiar "../", etc, syntax? > >The dot notation has been a pain in my rear on more than one occasion. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350987 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
Continuing on that thought (hit [send] too soon)... On the other hand, *.cfm "templates" match up with a standard file, and therefore use the traditional web separator, the slash (/). On Thu, May 3, 2012 at 12:52 PM, Matt Quackenbush wrote: > CFCs have used dot notation since Day 1 of their existence. The reason is > because CFCs (loosely) represent classes, which are grouped in packages. In > other languages, like Java - which CF runs on top of, those packages are > always denoted in dot notation. For example: > > java.util.List > java.net.InetAddress > java.io.File > > HTH > > > > On Thu, May 3, 2012 at 12:38 PM, Rick Faircloth > wrote: > >> >> Just for clarification... >> >> Why would CF begin to use dot notation for cfc's instead of sticking >> with the familiar "../", etc, syntax? >> >> The dot notation has been a pain in my rear on more than one occasion. >> >> Rick >> >> -Original Message----- >> From: Raymond Camden [mailto:raymondcam...@gmail.com] >> Sent: Thursday, May 03, 2012 1:01 PM >> To: cf-talk >> Subject: Re: CFINVOKE - Component Location >> >> >> On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear >> wrote: >> > >> > Then I tried running the cfinvoke as follows, but it appears I have some >> > syntax wrong. >> > >> > >> >> No, you use "dot" notation for CFCs. >> >> Try >> >> >> >> -ray >> >> >> >> ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350986 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
CFCs have used dot notation since Day 1 of their existence. The reason is because CFCs (loosely) represent classes, which are grouped in packages. In other languages, like Java - which CF runs on top of, those packages are always denoted in dot notation. For example: java.util.List java.net.InetAddress java.io.File HTH On Thu, May 3, 2012 at 12:38 PM, Rick Faircloth wrote: > > Just for clarification... > > Why would CF begin to use dot notation for cfc's instead of sticking > with the familiar "../", etc, syntax? > > The dot notation has been a pain in my rear on more than one occasion. > > Rick > > -Original Message- > From: Raymond Camden [mailto:raymondcam...@gmail.com] > Sent: Thursday, May 03, 2012 1:01 PM > To: cf-talk > Subject: Re: CFINVOKE - Component Location > > > On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear > wrote: > > > > Then I tried running the cfinvoke as follows, but it appears I have some > > syntax wrong. > > > > > > No, you use "dot" notation for CFCs. > > Try > > > > -ray > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350985 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFINVOKE - Component Location
Just for clarification... Why would CF begin to use dot notation for cfc's instead of sticking with the familiar "../", etc, syntax? The dot notation has been a pain in my rear on more than one occasion. Rick -Original Message- From: Raymond Camden [mailto:raymondcam...@gmail.com] Sent: Thursday, May 03, 2012 1:01 PM To: cf-talk Subject: Re: CFINVOKE - Component Location On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear wrote: > > Then I tried running the cfinvoke as follows, but it appears I have some > syntax wrong. > > No, you use "dot" notation for CFCs. Try -ray ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350984 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear wrote: > > Then I tried running the cfinvoke as follows, but it appears I have some > syntax wrong. > > No, you use "dot" notation for CFCs. Try -ray ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350982 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFINVOKE - Component Location
Thanks Matt. >>-Original Message- >>From: Matt Quackenbush [mailto:quackfu...@gmail.com] >>Sent: 03 May 2012 17:36 >>To: cf-talk >>Subject: Re: CFINVOKE - Component Location >> >> >>You'll want to use dot notation. So, using your example of >>/gallerycomponents/functions.cfc, you'd do the following: >> >> >> >>HTH >> >> >>On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear < >>jenn...@fasttrackonline.co.uk> wrote: >> >>> >>> Hi Ray, >>> >>> Thanks for your reply. >>> >>> Yes I could use a cfmapping, however >>> >>> I'm a bit confused as I thought the cfmappings were for accessing >>> files outside the web root or its sub-directories. >>> >>> I read "By default, ColdFusion MX defines a mapping for the web root (/). >>> You can define additional mappings to allow access to pages outside of >>> the web root." So I don't understand why I can't use this default >>> mapping- I realise I can't bit I also realise I need to understand why. >>> >>> I created a cfmapping pointing to a directory inside the webroot of >>> the application called /gallerycomponents. >>> >>> Then I tried running the cfinvoke as follows, but it appears I have >>> some syntax wrong. >>> >>> >> method="getTags"> >>> >>> I read up in your book, CF 7 Construction Kit, that a mapping can be >>> used when invoking the component, but there wasn't a syntax example >>> using a mapping. >>> >>> Thanks, >>> >>> Jenny >>> >>> >>-Original Message- >>> >>From: Raymond Camden [mailto:raymondcam...@gmail.com] >>> >>Sent: 03 May 2012 16:51 >>> >>To: cf-talk >>> >>Subject: Re: CFINVOKE - Component Location >>> >> >>> >> >>> >>Can you use a cfmapping? >>> >> >>> >>On Thu, May 3, 2012 at 10:43 AM, Jenny Gavin-Wear >>> >> wrote: >>> >>> >>> >>> Hi all, >>> >>> >>> >>> I'm trying to work out how to point to the file location of a >>> >>> component using cfinvoke. >>> >>> >>> >>> I am storing all of the component files for my application in one >>> >>> directory which is one step off the web root. >>> >>> >>> >>> Many thanks in advance, >>> >>> >>> >>> Jenny >>> >>> >>> >>> -- >>> >>> I am using the free version of SPAMfighter. >>> >>> We are a community of 7 million users fighting spam. >>> >>> SPAMfighter has removed 29195 of my spam emails to date. >>> >>> Get the free SPAMfighter here: http://www.spamfighter.com/len >>> >>> >>> >>> The Professional version does not have this message >>> >>> >>> >>> >>> >>> >>> >>> >>> >> >>> >>>> >>~~ >>> >>~~~| >>> >>Order the Adobe Coldfusion Anthology now! >>> >>http://www.amazon.com/Adobe-Coldfusion- >>> >>Anthology/dp/1430272155/?tag=houseoffusion >>> >>Archive: http://www.houseoffusion.com/groups/cf- >>> >>talk/message.cfm/messageid:350974 >>> >>Subscription: >>> >>http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm >>> >>Unsubscribe: http://www.houseoffusion.com/groups/cf- >>> >>talk/unsubscribe.cfm >>> >>> -- >>> I am using the free version of SPAMfighter. >>> We are a community of 7 million users fighting spam. >>> SPAMfighter has removed 29195 of my spam emails to date. >>> Get the free SPAMfighter here: http://www.spamfighter.com/len >>> >>> The Professional version does not have this message >>> >>> >>> >>> >> >>~~ >>~~~| >>Order the Adobe Coldfusion Anthology now! >>http://www.amazon.com/Adobe-Coldfusion- >>Anthology/dp/1430272155/?tag=houseoffusion >>Archive: http://www.houseoffusion.com/groups/cf- >>talk/message.cfm/messageid:350977 >>Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm >>Unsubscribe: http://www.houseoffusion.com/groups/cf- >>talk/unsubscribe.cfm -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 29200 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350981 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFINVOKE - Component Location
Thanks Bobby, sorted. >>-Original Message- >>From: Bobby [mailto:bo...@acoderslife.com] >>Sent: 03 May 2012 17:41 >>To: cf-talk >>Subject: Re: CFINVOKE - Component Location >> >> >>Try component="gallerycomponents.functions" >> >> >> >> >>~~ >>~~~| >>Order the Adobe Coldfusion Anthology now! >>http://www.amazon.com/Adobe-Coldfusion- >>Anthology/dp/1430272155/?tag=houseoffusion >>Archive: http://www.houseoffusion.com/groups/cf- >>talk/message.cfm/messageid:350979 >>Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm >>Unsubscribe: http://www.houseoffusion.com/groups/cf- >>talk/unsubscribe.cfm -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 29200 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
Try component="gallerycomponents.functions" ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
You'll want to use dot notation. So, using your example of /gallerycomponents/functions.cfc, you'd do the following: HTH On Thu, May 3, 2012 at 11:29 AM, Jenny Gavin-Wear < jenn...@fasttrackonline.co.uk> wrote: > > Hi Ray, > > Thanks for your reply. > > Yes I could use a cfmapping, however > > I'm a bit confused as I thought the cfmappings were for accessing files > outside the web root or its sub-directories. > > I read "By default, ColdFusion MX defines a mapping for the web root (/). > You can define additional mappings to allow access to pages outside of the > web root." So I don't understand why I can't use this default mapping- I > realise I can't bit I also realise I need to understand why. > > I created a cfmapping pointing to a directory inside the webroot of the > application called /gallerycomponents. > > Then I tried running the cfinvoke as follows, but it appears I have some > syntax wrong. > > > > I read up in your book, CF 7 Construction Kit, that a mapping can be used > when invoking the component, but there wasn't a syntax example using a > mapping. > > Thanks, > > Jenny > > >>-----Original Message- > >>From: Raymond Camden [mailto:raymondcam...@gmail.com] > >>Sent: 03 May 2012 16:51 > >>To: cf-talk > >>Subject: Re: CFINVOKE - Component Location > >> > >> > >>Can you use a cfmapping? > >> > >>On Thu, May 3, 2012 at 10:43 AM, Jenny Gavin-Wear > >> wrote: > >>> > >>> Hi all, > >>> > >>> I'm trying to work out how to point to the file location of a > >>> component using cfinvoke. > >>> > >>> I am storing all of the component files for my application in one > >>> directory which is one step off the web root. > >>> > >>> Many thanks in advance, > >>> > >>> Jenny > >>> > >>> -- > >>> I am using the free version of SPAMfighter. > >>> We are a community of 7 million users fighting spam. > >>> SPAMfighter has removed 29195 of my spam emails to date. > >>> Get the free SPAMfighter here: http://www.spamfighter.com/len > >>> > >>> The Professional version does not have this message > >>> > >>> > >>> > >>> > >> > >>~~ > >>~~~| > >>Order the Adobe Coldfusion Anthology now! > >>http://www.amazon.com/Adobe-Coldfusion- > >>Anthology/dp/1430272155/?tag=houseoffusion > >>Archive: http://www.houseoffusion.com/groups/cf- > >>talk/message.cfm/messageid:350974 > >>Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm > >>Unsubscribe: http://www.houseoffusion.com/groups/cf- > >>talk/unsubscribe.cfm > > -- > I am using the free version of SPAMfighter. > We are a community of 7 million users fighting spam. > SPAMfighter has removed 29195 of my spam emails to date. > Get the free SPAMfighter here: http://www.spamfighter.com/len > > The Professional version does not have this message > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350977 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFINVOKE - Component Location
Hi Ray, Thanks for your reply. Yes I could use a cfmapping, however I'm a bit confused as I thought the cfmappings were for accessing files outside the web root or its sub-directories. I read "By default, ColdFusion MX defines a mapping for the web root (/). You can define additional mappings to allow access to pages outside of the web root." So I don't understand why I can't use this default mapping- I realise I can't bit I also realise I need to understand why. I created a cfmapping pointing to a directory inside the webroot of the application called /gallerycomponents. Then I tried running the cfinvoke as follows, but it appears I have some syntax wrong. I read up in your book, CF 7 Construction Kit, that a mapping can be used when invoking the component, but there wasn't a syntax example using a mapping. Thanks, Jenny >>-Original Message- >>From: Raymond Camden [mailto:raymondcam...@gmail.com] >>Sent: 03 May 2012 16:51 >>To: cf-talk >>Subject: Re: CFINVOKE - Component Location >> >> >>Can you use a cfmapping? >> >>On Thu, May 3, 2012 at 10:43 AM, Jenny Gavin-Wear >> wrote: >>> >>> Hi all, >>> >>> I'm trying to work out how to point to the file location of a >>> component using cfinvoke. >>> >>> I am storing all of the component files for my application in one >>> directory which is one step off the web root. >>> >>> Many thanks in advance, >>> >>> Jenny >>> >>> -- >>> I am using the free version of SPAMfighter. >>> We are a community of 7 million users fighting spam. >>> SPAMfighter has removed 29195 of my spam emails to date. >>> Get the free SPAMfighter here: http://www.spamfighter.com/len >>> >>> The Professional version does not have this message >>> >>> >>> >>> >> >>~~ >>~~~| >>Order the Adobe Coldfusion Anthology now! >>http://www.amazon.com/Adobe-Coldfusion- >>Anthology/dp/1430272155/?tag=houseoffusion >>Archive: http://www.houseoffusion.com/groups/cf- >>talk/message.cfm/messageid:350974 >>Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm >>Unsubscribe: http://www.houseoffusion.com/groups/cf- >>talk/unsubscribe.cfm -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 29195 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFINVOKE - Component Location
Can you use a cfmapping? On Thu, May 3, 2012 at 10:43 AM, Jenny Gavin-Wear wrote: > > Hi all, > > I'm trying to work out how to point to the file location of a component > using cfinvoke. > > I am storing all of the component files for my application in one directory > which is one step off the web root. > > Many thanks in advance, > > Jenny > > -- > I am using the free version of SPAMfighter. > We are a community of 7 million users fighting spam. > SPAMfighter has removed 29195 of my spam emails to date. > Get the free SPAMfighter here: http://www.spamfighter.com/len > > The Professional version does not have this message > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFINVOKE - Component Location
Hi all, I'm trying to work out how to point to the file location of a component using cfinvoke. I am storing all of the component files for my application in one directory which is one step off the web root. Many thanks in advance, Jenny -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 29195 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350972 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm