Monday, October 20, 2008

Using ActiveScript in Managed Code

I recently was involved in porting a legacy COM application to a .NET version of the application. The application made heavy use of VBScript through the ActiveScript interfaces for customization. The customers current user base was large enough that one of the requirements was to continue to support existing scripts in the field. So interfacing with ActiveScript via .NET was a must. I set out to find a library that already did this, but all I really found were pieces here and there on how to kind of implement it. I played around for a while and finally came up with a good implementation. It even supports adding your own .NET objects to the script. I was able to get rid of all the COM objects and port the entire object model to .NET. The only COM in the new application is the ActiveScript stuff. There are some advantages to using ActiveScript still. For one it doesn’t compile an in memory assembly that you can’t get rid of. If you want to get rid of your compiled in memory assemblies in .NET you have to put them in a separate application domain and unload it, which can be tricky depending on the complexity of your application.


I’m posting the entire ActiveScript libaray including source code on CodePlex for anyone to use free of charge. There is a basic sample included with it that demonstrates how to use the library. It’s actually pretty simple. In future blog entries I will write more on how to use it. For now I wanted to get it out there for others to use. Hopefully it will save some of you some time and hassle. If you find the code useful and decide to use it drop me a line.


The source code (written in C#) can be found here on CodePlex.

4 comments:

sandeep saxena said...

Thank you for your so cool post,it is useful,i love it very much.please share with us more good articles.
QTP Training in Chennai
UFT Training in Chennai
Automation testing training in chennai
QTP Training in Velachery
LoadRunner Training in Chennai
Loadrunner course in Chennai
javascript training in chennai
core java training in chennai

Mithun said...

The Sites are Filled with Insightful Contents. It's Really used for Now and My Feature reference...Thanks for all your Valuable Works
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

Hi Every One said...

The Crack at this point in the software turns a page that shows user potential way all time. It provides very powerful results and is one of the most popular software of it’s kind in the world. Cash Register Express Download

The Blogger Worlds said...

Quotes to assist You Cope once Losing a husband those we tend to care regarding ne’er absolutely abandon U.S.A.. Lost Husband Quotes