Kerry, Ummm ... so far as an object is concerned, i think you are included in "the outside world" just as well as i am. In fact, i think that's the point!
As i move deeper into this stuff, type checking via the arguments in a method has immediately indicated to me via an obvious error in my face, (and i'm the only one working on this app!) that i'm trying to pass something into an object that won't work. In other words, it's prevented me from creating elusive bugs as the app becomes more and more complex. So to me, avoiding it to make things "easy" can make things a lot more difficult at one point down the road. I'm seeing the value of it more and more. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Kerry Sent: Thursday, January 27, 2005 5:12 PM To: [email protected] Subject: RE: [CFCDev] Composition and SQL > What if you grow hire a new developer? You may not want outsiders to > know how to use your app, but there's no reason to confuse a new hire. not a problem in our situation. and i dont think its that muddy, other developers here love it compared with the API of some enterprise products we use. > This could violate encapsulation pretty seriously - if the CFC > doesn't know what args to be passed, the outside world must then know > what it needs to pass. That implies the outside world must have > knowledge of the implementation of the CFC - it should only have > knowledge of the interface, which, in the case of methods, is largely > defined by <cfargument> tags! The outside world doesnt need to know what to pass. init() = Dear GenericDAO, here is an object, please call getConfig() on it to discover what it is create() = here is another object, please put the values you find in it in the database Surely if the arguments are named,typed and/or required, then the outside world needs very in depth knowledge of what to pass? unlike in my scenario? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Joe Rinehart Sent: 27 January 2005 14:57 To: [email protected] Subject: Re: [CFCDev] Composition and SQL On Thu, 27 Jan 2005 14:33:52 -0000, Kerry <[EMAIL PROTECTED]> wrote: > > But why make the rest of us programmers figure out your proprietary > > objArgs technique? > in this particular case, my boss would be very happy if i made the app > incomprehensible to anyone outside the company, but i see your point. What if you grow hire a new developer? You may not want outsiders to know how to use your app, but there's no reason to confuse a new hire. I just wrote a blog post on "brown box" APIs (brown box = muddy, hard to use attempt at a black box API) - http://clearsoftware.net. not a problem in our situation. and i dont think its that muddy. > > How do you make individual arguments required? > CFC is generic, it has no idea what its going to be passed (decides what to > look for depending on what you init it with), so if i used the > argumentCollection technique, there would be no <cfargument> tags in the > functions. (which means im not so sure about your 2nd point in this case) -joe -- For Tabs, Trees, and more, use the jComponents: http://clearsoftware.net/client/jComponents.cfm ---------------------------------------------------------- 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]
