I'll second most of what Peter said. The drawback is that the API to your
object is less clear. However, if you can live with that, onMissingMethod is
pretty powerful. Though one other downside is that the code in
onMissingMethod (or its dependent methods) can get rather complex if it is
handling a lot of different duties since it has to act as one big bucket. I
wouldn't use it for anything "just because you can", but if you have a
specific need, then by all means, use away.


On 9/27/07, Alan <[EMAIL PROTECTED]> wrote:
>
>
> I'm just realising how handy onMissingMethod() in CF8 can be.
>
> I read some of Sean Corfield's blog on this and looked at Brian
> Kotek's ColdMock which uses it too.
>
> My question is on getters and setters.
>
> Some of my business object / bean CFC's have many getters and setters
> (most of them simple). I use the Illudium Code Generator for these
> CFC's (and also looking at the Stub Generator) so it saves me lots of
> typing but wondered if I should just use onMissingMethod() to handle
> this instead and keep the CFC's smaller.
>
> I understand that this is just one simple use of onMissingMethod() but
> wondered what others think of this approach.
>
> I've read stuff on the debate between whats best - getFirstname() or
> get("firstname") and it seems there are 2 camps that can't agree. I
> wonder if onMissingMethod() will produce the same polarised opinions.
>
> Also, what other design issues are people using onMissingMethod() to
> address?
>
>
> Alan
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to