ore nearly useless Blog, in case
anyone wants to argue the point there:
http://jr-holmes.coldfusionjournal.com/
-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, 31 March 2005 2:19
To: CF-Talk
Subject: Re: this scope
On Thu, 31 Mar 2005 10:15:29 +0800, Ja
On Thu, 31 Mar 2005 10:15:29 +0800, James Holmes
<[EMAIL PROTECTED]> wrote:
> Actually, I tried this and the VARIABLES scope worked just as well in
> Application.cfc.
Really? Oooo, that's good to know...
--
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? --
Actually, I tried this and the VARIABLES scope worked just as well in
Application.cfc.
Try it yourself - please correct me if I'm wrong.
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, 31 March 2005 5:53
To: CF-Talk
Subject: Re: this scope
&
> I've been avoiding the "this" scope in my CFCs after
> reading several blogs and posts on the topic. Is that
> still the best practice in CFMX 7? I ask because all
> the examples I see of application.cfc set and
> refer to this.name, this.applicationTimeout, etc.
I haven't been able to work w
ED]> wrote:
> Thanks for the clarification, guys. (And I'll never spell applicAtion.cfc
> with a lowercase A again.) :)
>
> -Original Message-
> From: Sean Corfield [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 30, 2005 1:51 PM
> To: CF-Talk
> Subject:
Thanks for the clarification, guys. (And I'll never spell applicAtion.cfc
with a lowercase A again.) :)
-Original Message-
From: Sean Corfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 1:51 PM
To: CF-Talk
Subject: Re: this scope
On Wed, 30 Mar 2005 13:28:43 -0700,
On Wed, 30 Mar 2005 13:28:43 -0700, Paul <[EMAIL PROTECTED]> wrote:
> I've been avoiding the "this" scope in my CFCs after reading several blogs
> and posts on the topic. Is that still the best practice in CFMX 7? I ask
> because all the examples I see of application.cfc set and refer to
> this.
> I've been avoiding the "this" scope in my CFCs after reading
> several blogs and posts on the topic. Is that still the best
> practice in CFMX 7? I ask because all the examples I see of
> application.cfc set and refer to this.name,
> this.applicationTimeout, etc.
Yes, avoidance of unnecessar
Most of what I have been reading contradicts best practices when it
comes to application.cfc. For instance, how many times on this have
you been told not to access external scopes within a CFC. It seems
like application.cfc should be the only exception to these rules.
-Adam
On Wed, 30 Mar 2005 1
Actually those are not the only examples that refer to it from MACR.
I was reading through some of the docs a couple weeks back in regards
to CFCs and it was used quite a bit in there.
On Wed, 30 Mar 2005 13:28:43 -0700, Paul <[EMAIL PROTECTED]> wrote:
> I've been avoiding the "this" scope in my
THIS scope
LOL - there's a book I'll have to look out for and follow it religiously ;-)
-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, 25 February 2005 9:21
To: CF-Talk
Subject: RE: THIS scope
Someone's been reading The Pragmatic Programmer! Are
LOL - there's a book I'll have to look out for and follow it religiously ;-)
-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, 25 February 2005 9:21
To: CF-Talk
Subject: RE: THIS scope
Someone's been reading The Pragmatic Programmer! Are you
e-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, 25 February 2005 9:07
To: CF-Talk
Subject: RE: THIS scope
I agree with your thoughts, I'm glad you put into words what I think about
OO and CF.
An all or nothing approach seems to put many people off and no one seems to
advo
Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, 25 February 2005 9:07
To: CF-Talk
Subject: RE: THIS scope
I agree with your thoughts, I'm glad you put into words what I think about
OO and CF.
An all or nothing approach seems to put many people off and no one seems to
advocate a slow move int
pplied to everything
we do.
Ade
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: 25 February 2005 01:00
To: CF-Talk
Subject: Re: THIS scope
I'm an advocate of OOP but not a zealot. There are times when I see
someone create a class lik
> Well, yeah. That's a way to do it.
> Is anyone else conflicted as to how many workaround we
> should make to
> enable OOP in CF when we're already able to develop some
> pretty nice
> applications?
> -Joe
I'm an advocate of OOP but not a zealot. There are times when I see
someone create a cla
> In retrospect I believe the cfinvoke tag will allow you to
> execute a method of a CFC without invoking the CFC ...
It's worth pointing out that this will in fact create an instance of the CFC
itself. However, because you're not storing a reference to that instance
anywhere, you won't have any
>> That doesn't really cover "static," though - what makes a
>> static
>> member static is that it belongs to the type instead of
>> one instance
>> of a type. I.e.:
>>
>> InstanceOne.StaticVar = 1
>> InstanceTwo.StaticVar = 2
>>
>>
>> #InstanceOne.StaticVar#
>
>Application.cfc
>- onapplicationst
I still fail to understand why it's considered messy / nasty.
> If you let the 'final' part of 'public static final' weigh
> in
> slightly, then Isaac's proposal kind of gives you static.
> Because
> it's a method not a variable, there is only one instance
> (so it's a
> class "thing"), you can't
> Mostly because if you're looking for a field,
> you're not going to look in the methods section
> of the class docs, even if the "field" is
> actually a method, as you proposed. Just a
> differentiation between
> state and behaviour that you'd sacrifice.
If I knew the data was in that class (or
If you let the 'final' part of 'public static final' weigh in
slightly, then Isaac's proposal kind of gives you static. Because
it's a method not a variable, there is only one instance (so it's a
class "thing"), you can't change it like a non-final variable. It's
messy and nasty, which is why I p
Mostly because if you're looking for a field, you're not going to look
in the methods section of the class docs, even if the "field" is
actually a method, as you proposed. Just a differentiation between
state and behaviour that you'd sacrifice.
cheers,
barneyb
On Wed, 23 Feb 2005 18:37:09 -0500,
Thanks all for the very interesting info.
BTW, who doesn't have 50 Gmail invites and no friends ;-)
-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Thursday, 24 February 2005 8:24
To: CF-Talk
Subject: Re: THIS scope
Amen to that, brother Joe!
On Wed, 2
Amen to that, brother Joe!
On Wed, 23 Feb 2005 19:17:23 -0500, Joe Rinehart <[EMAIL PROTECTED]> wrote:
> Well, yeah. That's a way to do it.
>
> Is anyone else conflicted as to how many workaround we should make to
> enable OOP in CF when we're already able to develop some pretty nice
> applicati
Well, yeah. That's a way to do it.
Is anyone else conflicted as to how many workaround we should make to
enable OOP in CF when we're already able to develop some pretty nice
applications?
-Joe
On Wed, 23 Feb 2005 18:37:07 -0500, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> Application.cfc
>
I'm not sure why having it listed as a function in the documentation
would be terribly bad... especially if it is a function and not a
variable... I'd use a hint attribute to indicate the purpose of the
function. I could see some developers thinking it was an odd practice,
but I'd be hard pressed t
Application.cfc
- onapplicationstart
then reference the information as
server.myStaticClass.getStaticVar();
there ya go. It's not _technically_ a static class, but it's as close
as CF offers.
> That doesn't really cover "static," though - what makes a
> static
> member static is that it belo
Yeah, but then you've got a method, not a field. Those extra parens
aren't a huge deal to type every time, but having the psuedo-field
listed with the other methods rather than as a field in generated
documentation is a pain, as is the inability to use CFPROPERTY to
document the field.
cheers,
ba
That doesn't really cover "static," though - what makes a static
member static is that it belongs to the type instead of one instance
of a type. I.e.:
InstanceOne.StaticVar = 1
InstanceTwo.StaticVar = 2
#InstanceOne.StaticVar#
On Wed, 23 Feb 2005 16:52:52 -0500, S. Isaac Dealey <[EMAIL PROTEC
> I use the 'this' scope for what would be public static
> final variable
> in Java. That is, values that are of use both inside and
> outside a
> class, but never change. CF doesn't give you the ability
> to actually
> make them read-only (or make them class fields, rather
> than instance
> fiel
I use the 'this' scope for what would be public static final variable
in Java. That is, values that are of use both inside and outside a
class, but never change. CF doesn't give you the ability to actually
make them read-only (or make them class fields, rather than instance
fields), but that's an
On Wednesday 23 Feb 2005 09:03 am, James Holmes wrote:
> Does anyone use the THIS scope any more? Having just converted some nasty
I put public attributes and simple things that aren't worth writing a get and
set for in it.
--
Tom Chiverton
Advanced ColdFusion Programmer
~
> Does anyone use the THIS scope any more? Having just
> converted some nasty
> old (CF 6.0) CFCs using THIS in external code and all
> sorts of other bad
> things to really nice, new, VARIABLES scope code using
> getters and setters,
> I can't see a use for THIS, except for the return in an
> init
> Does anyone use the THIS scope any more? Having just
> converted some nasty
> old (CF 6.0) CFCs using THIS in external code and all
> sorts of other bad
> things to really nice, new, VARIABLES scope code using
> getters and setters,
> I can't see a use for THIS, except for the return in an
> init
James,
I use the "THIS" scope for creating complex types to be sent over Web
Services. I think that's about the only time I use it anymore.
-Joe
On Wed, 23 Feb 2005 17:03:43 +0800, James Holmes
<[EMAIL PROTECTED]> wrote:
> Does anyone use the THIS scope any more? Having just converted some nas
Sorry - I should have mentioned I cut that from an earlier post from
Sean to one of my questions.
Duncan
On Wed, 23 Feb 2005 01:35:58 -0800, Sean Corfield
<[EMAIL PROTECTED]> wrote:
> Strange... that's my response to another thread here on cf-talk...???
>
> On Wed, 23 Feb 2005 20:11:42 +1100, Du
-Talk
Subject: Re: THIS scope
Application.cfc effectively replaces the tag. This tag:
becomes the following code in the pseudo-constructor area of Application.cfc
(i.e., immediately after the opening
tag):
See the following documentation:
Reference Manual:
http://livedocs.macromedi
Strange... that's my response to another thread here on cf-talk...???
On Wed, 23 Feb 2005 20:11:42 +1100, Duncan <[EMAIL PROTECTED]> wrote:
> Application.cfc effectively replaces the tag. This tag:
>
>
>
> becomes the following code in the pseudo-constructor area of
> Application.cfc (i.e., im
Application.cfc effectively replaces the tag. This tag:
becomes the following code in the pseudo-constructor area of
Application.cfc (i.e., immediately after the opening
tag):
See the following documentation:
Reference Manual:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/069
39 matches
Mail list logo