From: Deyan P. <de...@ho...> - 2004-11-12 17:53:10
|
Hi hammett, Sorry for the late response, but I was so busy that couldn't find time to look at the interesting stuff you've implemented :( About the mixins - I looked at the new mixin testcases you've included and I am afraid I don't understand how they can solve my problem .. If I create a MaterializeMixin with Materialize(int id) method, then I mix that one with the Country class, and in the interceptor call ((IMaterializable)invocation.Proxy).Materialize(_id); then how does this Materialize method fill the properties of the Country class (I am not good with aspect terminology, but I assume that "mixin" means that the methods of the classes are merged together, right?)? I can't write in the MaterializeMixin something like: ((Country)this)._population = 1234455; //for example, if we have private int _population; in the Country class because it doesn't compile.. Please correct me if I am wrong, but in fact the proxy (by definition) shouldn't populate itself, it should just materialize a inner (Country) object, and then delegate all method invocations to the inner object, without using reflection of course ... A simple delegation costs nothing that's why the DynamicProxyAvalonTest should deliver comparable results if the counter of the inner loop is increased ... Br, Deyan ----- Original Message ----- From: "hammett" <ha...@uo...> To: <asp...@li...> Sent: Friday, October 29, 2004 10:59 PM Subject: Re: [Aspectsharp-users] IInvocation.Proxy and IInvocation.InvocationTarget > I was just watching Simpsons (third season) and thinking about this problem > when I realised that we both were using the wrong approach :-) > > How a mixin would solve this problem: > > 1. Create a proxy for Contry, for example, and mix a Materialize mixin > 2. In your Interceptor, if not loaded, you can cast the proxy to the mixin > interface and execute the Materialize > 3. The Materialize will populate the proxy fields. No second country > object... > 4. Done! > > What you think about it, Deyan? > > The problem: only Aspect# today is capable of dealing with mixins, and we > need to refactor it to use the new dynamic proxy interfaces and strategies. > On the other hand I think nothing stop us of provide mixin capabilities > directly in DynamicProxy, and we can make the Aspect# code simpler. I think > I can do it in about one hour, more or less... > > Henry, do you have anything against that? After all, you are the author of > the original mixin code... > > -- > Cheers, > hammett > http://www.digitalcraftsmen.com.br/~hammett > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Aspectsharp-users mailing list > Asp...@li... > https://lists.sourceforge.net/lists/listinfo/aspectsharp-users > |