Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Executing Javascript in .NET code

Executing Javascript in .NET code

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpjavascriptdatabasecomalgorithms
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GlobX
    wrote on last edited by
    #1

    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

    R A 2 Replies Last reply
    0
    • G GlobX

      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

      R Offline
      R Offline
      Ravi Sant
      wrote on last edited by
      #2

      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 ♫

      1 Reply Last reply
      0
      • G GlobX

        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

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        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)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups