Question

I tried looking for a similar question, but couldn't find one.

I have a ASPNET1.1 web application that is business-oriented. And there are many rules which are hardcoded in the application.

I want to start using Boo as an scripting language which developers can use to write some logic there (not final users).

Whenever a change in the BL is done, I would just update the "script file", deploy to server and that's it. No need for compilation. This is important.

So I have two questions:

  1. It seems only CS-Script and Boo support NET1.1 and I don't like CSScript because it requires an exe or a compiled dll for each script. Is Boo the right choice? I wanted to use JINT (NET2.0+) or LUA (couldn't find a way to import to C#).
  2. How fast is to execute Boo? I don't want to compile it (I know this is fast since it will be a static language). I want to only use the Boo interpreter Eval function.

By the way, the business logic I want to execute is simple. It should only be something like:

function(a, b)
{
return a["Type"] == b["Type"];
}

where a and b are simply Hashtables or DataRow. So I actually don't really need the System imports and all that.

Thanks in advance

Was it helpful?

Solution

I'm discarding Boo because even though I wanted to only use the Eval method, Boo automatically compiles the expression and loads that Assembly generated into the AppDomain.

Since I'm running in ASPNET1.1 and a big web application (thousands of users) that will not be efficient nor fast.

Even if I create an internal AppDomain and run the script in there so the memory is restored.

If I run in the same AppDomain, the memory would be eaten and eaten because those new assemblies will be loaded and never unloaded.

So I guess from Ricardo's response on some forums, that was never the intention of Boo language being designed as CLR language, but it beats the whole "scripting" halo put around Boo.

This is a big boo for Boo :(

I just tested LuaInterface 1.3.0 (the last one that supports NET1.1) and it has footprint zero. No assemblies are created and is just plain better in general (more javascript-like, no footprint, etc).

I just hope 1.3.0 version will be stable enough. There is no way I can upgrade my app to NET2.0 in the near future.

IMPORTANT UPDATE: LuaInterface and luanet had a lot of memory leaks!!!! Instead I linked directly to the lua52.dll by using DllImport and using as a basis the following file: https://simpleot.googlecode.com/svn-history/r32/SimpleOT/trunk/SimpleOT/Scripting/Lua.cs

I used lua52 because it had support for VC++2003.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top