Executing Javascript in .NET code
-
So I've done a bit of searching this morning looking for a way to execute Javascript inside C# code, and I found Jint[^] and Javascript.net[^]. I'm looking at these two frameworks going "what's the freakin' difference, really?" The syntax looks almost identical, I don't really care about performance (unless it's particularly poor). I looked at the latest updates and they're both reasonably recent. So does anybody know? Anybody used them? I'm going to start playing with them but does anyone know before I head too far down a certain path if one is the road to the dark side? Also, I've never really used open source stuff like this before, so is it a good idea to look at how unkempt the code itself is given it might fall into disrepair?
Typical n-tiered architecture: DB <-> Junk(0) <-> ... <-> Junk(n-1) <-> Pretty
-
So I've done a bit of searching this morning looking for a way to execute Javascript inside C# code, and I found Jint[^] and Javascript.net[^]. I'm looking at these two frameworks going "what's the freakin' difference, really?" The syntax looks almost identical, I don't really care about performance (unless it's particularly poor). I looked at the latest updates and they're both reasonably recent. So does anybody know? Anybody used them? I'm going to start playing with them but does anyone know before I head too far down a certain path if one is the road to the dark side? Also, I've never really used open source stuff like this before, so is it a good idea to look at how unkempt the code itself is given it might fall into disrepair?
Typical n-tiered architecture: DB <-> Junk(0) <-> ... <-> Junk(n-1) <-> Pretty
Haven't tried my hands on it yet, but both surely look syntactically same. The difference is: Javascript.Net uses Google's V8 Javascript engine (which is integrated in it). & Jint is itself a script engine. Jint embeds it's own parsing logic, and really interprets the scripts. Jint uses the ANTLR library for this purpose. Jint was reported to be too buggy and introduced too many .Net semantics into Javascript. >> JavaScript.NET used V8 and less bug-prone >> Jint has better support for integrating between C# and JavaScript Please share your experience with us. :)
♫ 99 little bugs in the code, 99 bugs in the code We fix a bug, compile it again 101 little bugs in the code ♫
-
So I've done a bit of searching this morning looking for a way to execute Javascript inside C# code, and I found Jint[^] and Javascript.net[^]. I'm looking at these two frameworks going "what's the freakin' difference, really?" The syntax looks almost identical, I don't really care about performance (unless it's particularly poor). I looked at the latest updates and they're both reasonably recent. So does anybody know? Anybody used them? I'm going to start playing with them but does anyone know before I head too far down a certain path if one is the road to the dark side? Also, I've never really used open source stuff like this before, so is it a good idea to look at how unkempt the code itself is given it might fall into disrepair?
Typical n-tiered architecture: DB <-> Junk(0) <-> ... <-> Junk(n-1) <-> Pretty
Depending on your needs, my tip/trick may or may not be of use to you: Call a C# Method From JavaScript Hosted in a WebBrowser.
[
S<T>::f(U) // Out of line.
](http://msdn.microsoft.com/en-us/library/8yk3t00s(v=vs.71).aspx)