Using JavaScript with C # For Browserless Operations

I recently had a quick look at the Adobe InDesign server. In this environment, you write your interactions with the libs servers via JavaSscript.

This got me thinking how can I use Javascript in a C # application so that I can expose many bits of my API / framework's functionality and allow others to write small plugins using JavaScript.

Since JS is quite a popular language, so I would have thought that I would not have to write my own impressor or whatever, but I could be wrong. Any ideas where I would start with something like this?

Hi Chris.

0


source to share


3 answers


Check this question:

Link to V8 engine from .NET application



This article might be interesting:

Evaluating JavaScript code from C # (using MS JScript engine)

+2


source


It will be much easier when Microsoft releases Managed JScript ( http://blogs.msdn.com/deepak/archive/2007/05/02/managed-jscript-is-availaible.aspx )

If you are not a Javascript user right now, I would take a look at IronPython ( http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython ) - the hosting API is identical to what Microsoft will release for JS and about the same easy as it could be, and switching between the three DLR languages ​​(IPy, IronRuby and Managed JS) is trivial.



Edit: Oops, apparently it's available now as part of ASP.NET Futures - I thought it was only in Silverlight; go to him!

+1


source


Try Javascript.NET:

http://javascriptdotnet.codeplex.com/

It implements Google V8. You can compile and run Javascript directly from .NET code with it and provide CLI objects for the Javascript code to use. And V8 is probably the best engine ever built in terms of performance, it generates native code from Javascript.

0


source







All Articles