SyntaxHighlighter

Tuesday, April 8, 2008

Civil Engineering or Virtual Bridge Builder

In my continued experience I've been challenged time and time again to interop, integrate, or simply bridge to and from the .NET Framework. Whether its Web Services in Java/systinet or Managed code(C#) to Native code(C++) through C++/CLI... the fact still remains that the .NET Framework is so powerful in so many ways. Which is why... dear reader... I present to you my third and probably most difficult challenge to date. C# on Unix/Linux platforms.






That's right dear reader... Another challenge that I will once again rise to. There is a .net application that makes network calls to a database that resides on a Linux box. It's an old
application since it's written in .NET 1.1 and is problematic due to strange code and network issues. The Linux box is from what I hear... an 8 proc box. That's right... 8 processors. I'm thinking right away that I can use .NET 3.5 parallel libraries to make use of those 8 processors.
I just need to get it working first. :-)

So... there are a couple of ways to accomplish this, and they are as follows:

1) Install an Add-In to VS2005/VS2008 which will allow the C# compiler to adjust for Mono.
2) Use the IDE above and leverage the mono compiler that way.

Either way I look at it... I have to compile down to Mono so that the Mono Runtime can execute the application. That's basically how it works... so as a comparison... Windows loads mscorlib along with the .NET framework and it's corresponding version during application launch.
However, in a Linux/Unix environment... Mono loads and launches the .NET application.
So first things first, I have to install the Mono runtime just like I'd have to install .NET on windows. My first attempt is on a Unix platform since I have a powerful Mac machine at my disposal. :-) The runtime installs smoothly... so far so good. Now the development environment above... install worked great, but when I went to run it I got a mono runtime error. It gave me a mozilla error... something about MOZILLA_FIVE_HOME path not set to mozilla install directory. After searching around I found two things... one...that mozilla is a direct dependency on the IDE above and must be installed in order to do development. two... the environment variable must be set which I could not figure it out in the 20min of playing around with it while my five year old daughter kept harassing me to get off and let her play games. Ahhhhhh!!! Well, needless to say it has begun and I will ultimately rise to the challenge... even if that means falling back to VS to do development. :-)

-Develop with Passion
Jean Paul S. Boodhoo

2 comments: