Why are there two classes for proxying classes using reflection? Admittedly CocoProxy uses public accessible attributes and CocoProxyM uses getter/setter property methods but I think it would be better if there was a single transparant persistence proxy class.
CocoProxyM is coupled to CocoProxy anyway via the usePublicFields(boolean) method, which causes the class to attempt to populate the proxied instance through the use of public attributes via an instance of CocoProxy.
I believe version 4 of CocoBase automatically wraps objects that don't implement either CBProp or CBDrop in an instance of CocoProxyM. Couple this with the fact that public attributes are generally considered bad design, I don't think the use of CocoProxy is a good idea. ie. I will always use CocoProxyM.
Will you be deprecating CocoProxy at some point? Personally I think the name CocoProxyM is a bit weird, and CocoProxy should be made backwardly compatible with CocoProxyM and CocoProxyM should be deprecated.
|