Sounds good to me ... truce. -- Jeff
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Rawlinson Sent: Thursday, March 10, 2005 2:20 PM To: [email protected] Subject: Re: Method Question (was RE: [CFCDev] OO Security?) Your logic makes perfect sense and I think it is a perfectly acceptable way of doing things in regards to your objects. However, my expectation when I tell a person to do something is they will tell me when they are done doing it. Likewise, I like to be told when a objects method is complete as well - even if it is a response I ignore (such as a true in this instance). as you said, i doubt there is a single "right" answer because I think both of our ways of looking at it are valid. A wrong answer would be to always return void and never raise any exceptions - no matter what. So anything that doesn't do it wrong is right to me. In the end we are dealing with a very, very minor point of difference and I figure whichever makes the coder(s) comfortable is the way they should go. Bill On Thu, 10 Mar 2005 14:01:35 -0600, Jeff Chastain <[EMAIL PROTECTED]> wrote: > > But why would you want to handle a true/false return from the function > as well as an exception being thrown? Why not just set an expectation - i.e. > the build is secure, and then just handle an exception to that expectation? > > This is probably another one of those questions with no 'right' answer. > > If I ask an object a question (isSecure?, getKeys?), it should give me > a response. On the other hand, if I tell an object to do something, > I do not see it coming back and saying okay, I did it. Just tell me > (i.e. throw an > exception) if it failed. > > Thanks > -- Jeff > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Bill Rawlinson > Sent: Thursday, March 10, 2005 1:44 PM > To: [email protected] > Subject: Re: Method Question (was RE: [CFCDev] OO Security?) > > I would expect the security guard to respond and tell me the security > to the building is intact with an affirmative or "true" > > granted, that would really be in the method isSecure as opposed to > checkSecurity which is really a helper method to isSecure (in my mind) > since the guard may have to check more than just the building security > is intact to tell me if everything isSecure. > > but either way I would expect checkSecurity to return true if security > is OK and false if it is not (or raise an exception) depending on how > you want to handle the negative. > > Bill > > On Thu, 10 Mar 2005 13:27:21 -0600, Jeff Chastain > <[EMAIL PROTECTED]> > wrote: > > > > If you think about it, this is really what you would expect. Take > > the following example ... > > > > You have a security guard 'object' > > If you tell him to 'getKeys', he should return to you a set of keys > > If you tell him to 'checkSecurity', he should return nothing - i.e. void > > the fact that the building is secure is expected > > if something is wrong, he should throw an exception as it is an > > exception to the 'norm' > > > > I don't know if there is anything magic to this reasoning, it was > > just the way it was explained to me at one point and it made sense. > > > > -- Jeff > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > > Behalf Of Dawson, Michael > > Sent: Thursday, March 10, 2005 11:33 AM > > To: [email protected] > > Subject: Method Question (was RE: [CFCDev] OO Security?) > > > > Roland, this is a bit off-topic, but in your checkUserPubAccess() > > and > > checkUserRights() methods, you set them to return VOID. > > > > When you call these methods, do you assume that if they don't throw > > an error that everything is OK and you can proceed? I guess you > > would have > to. > > > > BTW, this is a great document! I appreciate you sharing it with us. > > > > Thanks > > M!ke > > > > ---------------------------------------------------------- > > 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). > > > > 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). > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > > > > -- > [EMAIL PROTECTED] > http://blog.rawlinson.us > > I have 47! gmail invites,want one? > > ---------------------------------------------------------- > 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). > > 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). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > > -- [EMAIL PROTECTED] http://blog.rawlinson.us I have 47! gmail invites,want one? ---------------------------------------------------------- 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). 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). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
