Remotion Mixins facility

1 view
Skip to first unread message

Lee Henson

unread,
Jan 21, 2009, 7:47:53 AM1/21/09
to Castle Project Development List
Hi

I've just got a very basic facility working for using re-motion mixins
(www.re-motion.org) with Windsor.

http://github.com/leemhenson/re-motion/tree/c98d2439d8e78a31cc866ecc47a772b5a74ec34f/RemotionFacility

Sample usage is the specs in the project, but sample (notepad) code
would be:

<wherever you are creating your container>

var remotionFacility = new RemotionFacility
(assemblyContainingMyMixins);
container.AddFacility("remotion.facility", remotionFacility);

<register components>

...

<later on>

var component = container.Resolve<ComponentWithAvailableMixins>();
((MyMixin) component).SomeMethod();

Interested to hear of any potential applications. I was wondering
whether you could do something along the lines of RoR's "Acts As <x>"
stuff.

L

Krzysztof Kozmic

unread,
Jan 21, 2009, 8:21:03 AM1/21/09
to castle-pro...@googlegroups.com
Don't we have mixins already in DP2 ?


CONFIDENTIALITY NOTICE
This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged, confidential or otherwise legally exempt from disclosure. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please delete all copies of this message and notify the sender immediately by return mail or fax ATSI S.A.(+4812) 285 36 04.
Any email attachment may contain software viruses which could damage your own computer system. Whilst reasonable precaution has been taken to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should therefore carry out your own virus checks before opening any attachments.

Jonathon Rossi

unread,
Jan 21, 2009, 8:27:34 AM1/21/09
to castle-pro...@googlegroups.com
It seems remotion uses DP2 for IL generation, but doesn't use its proxying or mixins:
http://www.re-motion.org/blogs/team/archive/2008/02/20/introducing-mixins-finally.aspx
--
Jono

Fabian Schmied

unread,
Jan 21, 2009, 8:34:29 AM1/21/09
to castle-pro...@googlegroups.com
>> Don't we have mixins already in DP2 ?
>
> It seems remotion uses DP2 for IL generation, but doesn't use its proxying
> or mixins:
> http://www.re-motion.org/blogs/team/archive/2008/02/20/introducing-mixins-finally.aspx

Right, re-motion mixins can do a lot more than DP2 mixins can. Among
other things, they are much higher-level, with declarative
configuration and a friendlier API. It's for the end-user rather than
being infrastructure.

(We do use proxying, btw, but we create our own proxies using DP2's
emitters and AST because we have different requirements.)

I've blogged about our features here:
<http://www.re-motion.org/blogs/mix/archive/2009/01/14/what-can-we-do-for-you-features-of-re-motion-mixins.aspx>
And about the facility here:
<http://www.re-motion.org/blogs/mix/archive/2009/01/21/we-have-a-facility.aspx>

Regards,
Fabian

Reply all
Reply to author
Forward
0 new messages