A good read, a very good read.

To balance it out, get Hackers & Painters by Paul Graham also. The two
combined make for a great read, a very great read :OD

Ade

-----Original Message-----
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: 25 February 2005 01:25
To: CF-Talk
Subject: RE: 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 you allowed to call
yourself pragmatic, isn't it like being cool, if you say you're cool, you're
not! :OD

Ade

-----Original Message-----
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: 25 February 2005 01:12
To: CF-Talk
Subject: RE: THIS scope


This is one of the reasons for my original question. I'm pragmatic - if the
Rules OF OOP Which Must Be Obeyed At All Costs don't work for me, then screw
them, especially in a language that isn't actually OO.

However, I'm always trying to pick up new good habits and best-practices.
The new version of my code is far superior to the old one; the getters and
setters let me validate the input, check if the user should even be able to
read or set the value (which was previously in the THIS scope for any
muggins to mess with) etc.

-----Original Message-----
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
advocate a slow move into OO with the use of good functions and site/app
architecture. Instead we get told to go down the CFC route and ask no
questions(ok, maybe not that harsh). After all, a good abstraction is a good
abstraction whether it's in a CFC or a function outside of one.

Of course there is the 'learning bad habits' excuse, but a well thought out
function is a very good thing and that excuse can be applied 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 like this that I want to cry:

<cfcomponent name="filereader">
  <cffunction name="readfile">
    <cfargument name="file" type="string" required="true">
    <cfset var filedata = "">

    <cffile action="read" file="#file#" variable="filedata">

    <cfreturn filedata>
  </cffunction>
</cfcomponent>

It's usually a little more involved than that, but I have seen an entire
component not much more complex than this from someone who is considered an
advanced resource... Which essentially meant that they were unhappy with
simply having a function and so they tacked on the extra overhead and
syntactical complexity of instantiating an object and carrying around two
extra scopes, etc. all so they could read a file...

Obviously I don't jive with the "it's an object or it's crap" camp...
I've heard Simon Horwith say that a function should never be written outside
of a CFC -- I've actually exchanged email about it with him, and I still
disagree... If a function is highly cohesive and is not _logically_ part of
a greater conceptual structure that would merit a CFC, I don't buy creating
a "miscellaneous functions" CFC just so that all your functions are in
CFC's. None of the ColdFusion native functions are grouped into CFC's, even
when there is a logical association (XML functions or Regular Expression
functions for
instance) and I have no problems using them either.

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196458
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to