RE: Why do I need getters/setters?

2008-06-24 Thread Dave Watts
> But I was lookin at Joe's legacy samples ... I wouldn't read too much into samples. I haven't looked at the sample in question, but it may not be a complete application. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized

Re: Why do I need getters/setters?

2008-06-24 Thread Will Tomlinson
>Well, the example I created was pulled right out of my ... imagination. But >if you create different object instances for each user, and store those in >each user's session, the fact that you have the same structure for each of >those instances doesn't matter at all. > But I was lookin at Joe's le

RE: Why do I need getters/setters?

2008-06-23 Thread Dave Watts
> One thing that's messin' up my head is, these cfc's are > usually stored in application scope. This information looks > more like personalized info, which is usually stored in > session scope. > > I'm not understanding how info doesn't get crossed up between > users. lol! Well, the example

Re: Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
> > > > > > > > > > Thanks dave! Oops Dave (ahemm) One thing that's messin' up my head is, these cfc's are usually stored in application scope. This information looks more like personalized info, which is usually stored in session scope. I'm not understa

RE: Why do I need getters/setters?

2008-06-23 Thread Dave Watts
> I'm just not understanding why I'd need a getter and a setter > in my cfc. > > ... > > What is the value of keeping each value in its own variables > scoped variable? Where does it come in handy? Where are you > supposed to use it? As many people have mentioned, you don't need getters and s

Re: Why do I need getters/setters?

2008-06-23 Thread s. isaac dealey
> Just to be difficult, You mean like this: -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 617.365.5732 http://onTap.riaforge.org/blog ~| Adob

Re: Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
Thank you all for the info. It's most helpful! Will ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://

Re: Why do I need getters/setters?

2008-06-23 Thread Brian Kotek
As others have pointed out, getters and setters are there for encapsulation. For example, if you have a getPrice() method on a Product, right now it might return just a price instance variable. But later you may need to add in much more complex logic such as tiered pricing for certain customers, sa

Re: Why do I need getters/setters?

2008-06-23 Thread Rich Kroll
Will, Many of the ideas within OO are to promote encapsulation, easy reuse, and increased maintainabilty. In your example, it may be much easier to submit a form to a page that takes those values and adds them to the database. But for example lets say you are storing a "customer", and that you mu

Re: Why do I need getters/setters?

2008-06-23 Thread Alan Rother
Just to be difficult, >>> You cannot set or get the variables scope directly, so you need the getter and setter to do this. >>> Actually, in Coldfusion you can. Of course, you have to reference them somewhere else in you CFC if you want to access them from outside your CFC, but it doesnt HAVE to

Re: Why do I need getters/setters?

2008-06-23 Thread Josh Nathanson
nal Message - From: "Will Tomlinson" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Monday, June 23, 2008 9:46 AM Subject: Why do I need getters/setters? > I'm just not understanding why I'd need a getter and a setter in my cfc. > > My app works just fine

RE: Why do I need getters/setters?

2008-06-23 Thread Brad Wood
will not work otherwise. They exist to accommodate and encourage good coding practices. YMMV. ~Brad -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2008 11:46 AM To: CF-Talk Subject: Why do I need getters/setters? I'm just not understanding

RE: Why do I need getters/setters?

2008-06-23 Thread Andy Matthews
as I don't see much value in it, but then I'm self taught and OO isn't really a big concern for me ATM. I can easily see this changing over time though. -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2008 11:46 AM To: CF-Talk Subje

Re: Why do I need getters/setters?

2008-06-23 Thread Alan Rother
Short answer... You don't You CAN build CFCs pretty much anyway you want to. Frankly, in CF if it works, and you like how it works, then it's perfect. Using getters and setters is really more of an OO habit than anything else in CF. -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Devel

Why do I need getters/setters?

2008-06-23 Thread Will Tomlinson
I'm just not understanding why I'd need a getter and a setter in my cfc. My app works just fine without setting anything in the variables scope of my cfcs. You submit a form, it adds the values to my db. You run a query and get all the values back out. What is the value of keeping each value