Results 1 to 6 of 6
  1. #1
    t7ancients's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New York
    Posts
    381
    Reputation
    28
    Thanks
    68
    My Mood
    Twisted

    Embedding JavaScript in C#

    So, using Jint or Jurassic, it's really simple to run javascript in C#. JavaScript syntax is similar to C#, and with Jint you can access .NET classes and libraries directly in your js code as if you were writing C#. Jint is more complete than Jurassic, so I'd probably use that, but would anyone make use of functions to write windows apps in javascript code? Would that be useful to anyone, or does someone know a simpler way to do that, or know another easily embedded scripting language for C#/.NET? Or would it be worthwhile to use C# as a scripting language inside of a C# application using Microsoft.CSharp to compile code into Assemblies in memory and run them there with certain libraries restricted? If anyone knows anything on the subject, please enlighten me.

  2. #2
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    I use that in many of my applications, though I use Google's V8 with .NET bindings for it. It makes scripting and modifications really easy, and I don't need to recompile shit - develop on the fly and allow users to modify behaviour to their liking.

  3. #3
    t7ancients's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New York
    Posts
    381
    Reputation
    28
    Thanks
    68
    My Mood
    Twisted
    Do you know if JScript is any good, or is V8 better? JScript has an implemented CodeDomProvider so it's quite simple to use.

  4. #4
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by t7ancients View Post
    Do you know if JScript is any good, or is V8 better? JScript has an implemented CodeDomProvider so it's quite simple to use.
    It doesn't really matter, unless you're trying to run some high-performance game with Javascript.

    If you're talking about JScript.NET, then, well, it's fine I guess. There's nothing wrong with it. It's just not as fast as V8

  5. #5
    t7ancients's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New York
    Posts
    381
    Reputation
    28
    Thanks
    68
    My Mood
    Twisted
    Quote Originally Posted by freedompeace View Post


    It doesn't really matter, unless you're trying to run some high-performance game with Javascript.

    If you're talking about JScript.NET, then, well, it's fine I guess. There's nothing wrong with it. It's just not as fast as V8
    Yeah, JScript.NET. Pretty awesome that you can compile javascript. Good for web devs to get into programming perhaps? And is V8 the fastest javascript engine out there?

  6. #6
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Quote Originally Posted by t7ancients View Post
    Yeah, JScript.NET. Pretty awesome that you can compile javascript. Good for web devs to get into programming perhaps? And is V8 the fastest javascript engine out there?
    It's generally accepted as so. Node.js runs on it. Apple/WebKit team are making Nitro though, but I haven't seen any benchmarks yet.

Similar Threads

  1. Replies: 12
    Last Post: 05-29-2010, 05:50 AM
  2. fun with javascript
    By Hyak in forum Java
    Replies: 12
    Last Post: 08-20-2009, 07:43 PM
  3. Basic JavaScript tutorial
    By tednugent in forum Programming Tutorials
    Replies: 4
    Last Post: 04-04-2009, 01:18 PM
  4. Replies: 0
    Last Post: 02-06-2008, 02:30 AM
  5. Javascript exploits please :D (tests)
    By Kyojiro in forum General
    Replies: 15
    Last Post: 05-31-2006, 07:12 PM