Coming in late to this one ;o) I saw my name, so I figured I would chime in
as well.

Well, I happen to really like the convenience of automatic getters and
> setters so I have added a bunch of code to
> WEB-INF/cftags/component.cfc to handle this automatically:
>
>
> http://org-corfield-cfmx.googlecode.com/svn/trunk/wwwroot/org/corfield/component.cfc


Honestly, I'm still not a huge fan of them... and I couldn't say why.

Honestly, what I would really like - is if the auto getter and setter was
based off of  a <cfproperty> declaration in the CFC, then you have something
that is document able, while still giving you the power to have getters and
setters that you don't have to write.  If the <cfproperty> doesn't exist,
the auto get/set would throw an error.  Then you could add extra meta data
like '_privategetter="true"' to make getters or setters private, rather than
public (or something to that effect).


A couple of caveats:
> 1. The magic="true" attributes on the <cffunction> tags are there so
> my local version of Transfer can spot methods from component.cfc and
> not try to add/remove them when handling pooled objects. Yes, I run a
> locally modified version of Transfer. Mark Mandel knows. We've talked
> about a way for Transfer to handle this automatically somehow but it's
> low priority.


Sean and I have this conversation a lot ;o)  I don't know if I'm a huge fan
of editing the base component... but I can see the rational behind it.


> 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.
>
> Probably. I really don't like the "generic get/set" approach but of
> course onMissingMethod() provides syntactic sugar for essentially the
> same thing...


I'll definatley agree with Sean on this one.. but I still prefer a meta data
driven approach as above.  I guess I just have yet to let go of my generated
documentation.


> > Also, what other design issues are people using onMissingMethod() to
> > address?


Here is a link explaining my JavaProxy implementation using
onMissingMethod()
http://www.compoundtheory.com/?action=displayPost&ID=250


> Mostly I use it for proxies (lightweight AOP stuff) and I believe
> ColdSpring 2.0 will use that to implement AOP (and therefore be
> CF8-specific). Maybe Mark Mandel will end up using it for Transfer as
> well (he's already using duplicate() if you're on CF8).


I did look at it for Transfer, to provide some performance improvements on
creating Decorators - that being said, there was minimal difference between
createObject() and duplicate() performance wise, and the overhead of
resolving unnamed parameters to named parameters for method proxying was
just way too high, so I ended up not going for it.

Mark

-- 
E: [EMAIL PROTECTED]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
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