[Mono-vb] VsaEngine implementation.

Anony Mous Anon21h@yahoo.co.uk
Thu, 18 Dec 2003 00:43:42 +0000


César López Natarén wrote:
> On Tue, 2003-12-16 at 15:30, Anony Mous wrote:
> 
>>Hi César,
> 
>  
> Hi!
> 
> 
>>What exactly is a VsaEngine? I have looked around the net and it seems 
>>to point to something in the Longhorn SDK, which is currently incomplete 
>>and has little info on the subject. Can you expand on this a little
>>please?
> 
> 
> The VsaEngine, which comes from "Visual Studio for Applications",
> is the mechanism that offer scripting capabilities to .Net (although it existed before .Net too).

Oh, I was familiar with VBA (Visual Basic for Applications) I had no 
idea there was a VSA too! So what exactly makes up VSA? I know that MS 
Office apps for example, all embed VBA but I would hardly call the IDE 
they provide (which is mainly made up of just the editor and code 
browser) a "Visual Studio", especially since they all lack a forms 
engine. So is VSA just a set of  libraries, an IDE or both?

> They way VSA works is:
> 
> 1) We have a host, our application. The host implements a interface, IVsaSite.
> 2) We have scriting execution machine (the VsaEngine), which implements the interface IVsaEngine.  
> 
> and communication is passed through the methods implementations from those interfaces.
> 
> And basically what the VsaEngine does is, take a source file or an assembly and compiles/execute it.

This sounds like the Active Scripting architecture used in things like 
WSH (Windows Scripting Host) and Internet Explorer. Is VSA the next 
evolution of this for .NET, allowing you to embed the CLR say like the 
way IIS does in order to provide ASP.NET functionality?

>>From what I've been able to see that the JScript VsaEngine does is: taking care of the 
> runtime supprt for assemblies generated by jsc. Basically, takes care of the global 
> environment (types, functions, prototypes which are available) and the differents environments created 
> on the course of the program execution. 
> 
> The code used for IVsaSite and IVsaEngine, is not difficult, I already have some 
> chunks written at mcs/class/Microsoft.JScript/Microsoft.JScript/Vsa*.cs
> but the one for environments, is a little strange, also I have not found docs.
> 
> I think lot's of code can be shared in this one, and also some discussion will help us understand
> this thing.

Indeed. It all seems pretty secretive stuff at the moment which is 
worrying because either it is a new technology and we should be careful 
about trying to implement it before specifications for it mature, or MS 
wants to keep it proprietary which will mean that there will be no
publicised specs at all hence making implementation difficult or impossible.
All in all, keep pursuing the issue since I imagine that once we have it
figured out for JScript (or is it called J# nowadays?) we can reuse it 
to make a VBScript.Net based on the current mbas code.

> César

Thanks for the info César,
Eric.