Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Scripting .Net classes

I've implented a domain model in C#, which can do CRUD, "business logic" and reporting type stuff.  To test it - really just confirm that it works in arbitrary scenarios -  I made a console application with a very simple interpreter.  The domain model will be used by ASP.net, Winforms and web service applications.

Is there any interpreter that can new up .Net objects and call their methods in an interactive or scripted way?  I'm looking for for something similar to Jython, but any language - Ruby, Lisp, Perl. etc - will do. 

I'm sold on having fast, statically typed domain classes, but being able to script these objects in an interpreted language will give us benefits beyond testing.  We could generate bits of this language and run it to do all types of adminstrative and reporting tasks.     

java refugee
Saturday, June 18, 2005

Since you asked for similar to Jython, have you looked at IronPython yet?

http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742

A python on .NET implementation by the same guy who started the Jython project.

CHris Tavares
Saturday, June 18, 2005

Thanks Chris - I read up on IronPython a bit.  It sounds great - Microsoft got the Jyton guy (Jim Hugunin) to do it - but it is "pre Alpha" and only runs on the 2.0 beta.  I haven't checked it out yet, but the new Visual Studio 2005 beta should be in my mail...

From what I have seen, Python would be fine, assuming Micosoft is behind it. But are thre any other languages that people are working on?   

java refugee
Saturday, June 18, 2005

Why not use a CLR language? Here's an article that shows how to host the vb.net and jscript.net scripting engines:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting06112001.asp

And this company offers a free one:

http://www.alintex.com/products.aspx

The scripts are actually compiled, but they give you full access to the .NET framework and your own classes.

Jeff Mastry
Monday, June 20, 2005

I (and some co-workers) have been strongly considering porting Ruby to the CLR, based on how IronPython was made to work. We're Ruby addicts. ;)

Brad Wilson
Tuesday, June 21, 2005

*  Recent Topics

*  Fog Creek Home