My first instinct is to say yes.  But maybe I'm thinking about this the
wrong way.

The underlying data about the facility is going to be stored in a
database.  I'm working on an data entry/edit area.  I will need to be
able to display all the properties on an HTML form and do INSERT and
UPDATE statements.  I suppose I could use a single getter to return all
the properties as a recordset.  But I had planned on getting each
property with its own getter.

Again, this is a question about Best Practices.  I'm comfortable with
objects, but I'm new to CFCs and creating my own classes.  How would you
all tackle this situation?



------------------------------------------------
Gerry Gurevich,
Lockheed Martin
[EMAIL PROTECTED]
919-572-7818


                                                                                       
                                                
                      Adrian Lynch                                                     
                                                
                      <[EMAIL PROTECTED]        To:       "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                                   
                      bubble.net>              cc:                                     
                                                
                      Sent by:                 Subject:  RE: [CFCDev] Best Practices 
Question:  Getters and Setters                    
                      [EMAIL PROTECTED]                                                
                                                
                      one.org                                                          
                                                
                                                                                       
                                                
                                                                                       
                                                
                      01/07/2004 12:30                                                 
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      cfcdev                                                           
                                                
                                                                                       
                                                
                                                                                       
                                                




Do you need getters and setters for all the properties?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 07 January 2004 17:22
To: [EMAIL PROTECTED]
Subject: [CFCDev] Best Practices Question: Getters and Setters






I have a CFC with 26 properties.  None are inherited.  I find that
having 52 methods for getting and setting to be a bit cumbersome to keep
in my CFC with the "real" methods.  I was thinking of including all my
getters and setters from a CF template.  Let's say that the my code
looks like this:

facility.cfc
<cfcomponent hint="I am a facility">
      <!--- Include the getters and setters --->
      <cfinclude  template= "facilitygetset.cfm">

      <!--- Start the more complicated stuff --->
      <cffunction name="firstrealmethod">
      .
      .
      .
      </cffunction>
.
.
.
.
</cfcomponent>

Any thoughts on this as a good idea, bad idea, unintended consequences?


------------------------------------------------
Gerry Gurevich,
Lockheed Martin
[EMAIL PROTECTED]
919-572-7818

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

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

Reply via email to