Spike,

I understand your reasons, but we don't use cfeclipse and I don't believe
that a unit testing should pin something that is very legal either. Just
because you can't do it doesn't mean that you should mark it as being bad
practice either.

I have found many reasons to use a variable for components, cfmodule and
cfincludes. All our work rely on this information based on variables, and
when we decide to create a new module for a client that could have the web
application stored anywhere on their hard drive, it makes more sense to use
a variable in the application to make using these things easier and less of
a pain to support when implementing them into the application.

Give you an example, we design intranet systems. We have a set of vars
declared to give us path and url address. Now if I setup a mapping so that I
can find the components at runtime we can then use this in our createobject
as I stated earlier. It makes our job very easy and support even easier to
debug and maintain, but that's our situation. In this case if we were to
adopt what you have suggested we can not support this application or setup
this application any easier. And if the domain name changes then we have no
work to do on the application, if the directory changes we have no work to
do and the application has no down time and would save us hours and hours of
work that we don't have the time for anyway.


Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Spike
Sent: Thursday, 16 June 2005 3:24 AM
To: [email protected]
Subject: Re: [CFCDev] LINT like tools for coldfusion?



Andrew Scott wrote:
> Spike,
> 
> Why should this be a warning?
> 
> * Using variables for the paths to components, cfmodule calls and
cfincludes
> (WARNING)

When it comes to code maintenance it is much easier for maintainers to 
debug and follow code if the paths are hard coded rather than set as 
variables.

It is also possible that the value of the variable may change for one 
reason or another leading to more difficulties when maintaining the 
codebase.

Finally, we plan to provide code assist for CFCs and possibly custom 
tags. Neither of these will be possible if you have used a variable as 
part of the path, while it will be possible if you haven't.

Ultimately, it isn't any more of a problem than leaving some optional 
attributes off the cfargument or cffunction tags which is why all of 
these things would be configurable in the cfeclipse preferences page.

Spike

-- 

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to