So, one of the products I’m building needs several points of extensibility that can be dropped in. For a certain type of extension, we’re using MEF. I’ve been using MEF on my current client project for a while and have worked out many of its quirks. But, MEF still puts the author of extended logic in Visual Studio.
On the other side, we’ve got a templating/snippet system that stores chunks of “views” for rendering pages, emails, etc. that provide a mechanism so that the entire look and feel of the application is stored in chunks in a database. They’re editable via a web app by people other than web developers. I’ve built similar for several projects and it works out really nicely.
I want something closer to that templating solution for simple business logic and rules. There’s still a definite place in my architecture for MEF plugins. C# does heavy lifting well. However, I have long been intrigued by IronRuby as an embedded scripting engine. So, this morning, I did a quick prototype to determine how much effort it was going to be to use it in the way I want.
Turns out, it’s pretty damned easy. When I mentioned that I was doing this prototype, someone asked if I was going to blog it. It’s often easier to just record a quick explanation/walkthrough, so that’s what I did. The video is below.
IronRuby Scripting in .NET from J Wynia on Vimeo.