views:

11

answers:

1

A new requirement has come down from the top: implement 'proprietary business tech' with the awesome, resilient Elixir database I have set up. I've tried a lot of different things, such as creating an implib from the provided interop DLL (which apparently doesn't work like COM dlls) which didn't work at all. CPython doesn't like the MFC stuff either, so all attempts to create a Python lib have failed (using C anyway, not sure you can create a python library from .NET directly).

The only saving grace is the developer saw fit to provide VBA, .NET and MFC Interop C++ hooks into his library, so there are "some" choices, though they all ultimately lead back to the same framework. What would be the best method to:

A) Keep my model definitions in one place, in one language (Python/Elixir/SQLAlchemy)

B) Have this new .NET access the models without resorting to brittle, hard-coded SQL.

Any and all suggestions are welcome.

A: 

After a day or so of deliberation, I'm attempting to load the new business module in IronPython. Although I don't really want to introduce to python interpreters into my environment, I think that this will be the glue I need to get this done efficiently.

trevman
IronPython doesn't contain any DBABI 2.0 compliant drivers that will allow Elixir/SQLAlchemy 0.5 to layer effectively on top of my Postgres database. I was really wary of what I finally settled on as a final solution: [Python for .NET](http://pythonnet.sourceforge.net). Though the project seems immature, with about 10 minutes of effort I had my new .NET business module sitting inside a CPYthon session. Elixir and SQLAlchemy of course worked without any effort. And now I'm happily coding my solution.
trevman