Create Platform Independent Apps

Use Bridge.NET to build platform independent applications for mobile, web and desktop.
Run on iOS, Windows, Mac, Linux and billions of other devices with JavaScript support.

Write C#.
Run JavaScript.
C#Write your C#
public class Product
{
    public int Id { get; set; }
 
    public string Name { get; set; }
 
    public void Purchase()
    {
        Console.WriteLine(“Purchased!”);
    }
}
 
public class Program
{
    public static void Main()
    {
        // Create a Product
        var product = new Demo.Product();
 
        // Set some properties
        product.Id = 99;
        product.Name = “Book”;
 
        // Call a method
        product.Purchase();
    }
} 
JSRun in a browser
Bridge.define(“Demo.Product”, {
    props: {
        Id: 0,
        Name: null
    },
    methods: {
        Purchase: function () {
            System.Console.WriteLine(“Purchased!”);
        }
    }
});

Bridge.define(“Demo.Program”, {
    main: function Main () {
        // Create a Product
        var product = new Demo.Product();

        // Set some properties
        product.Id = 99;
        product.Name = “Book”;

        // Call a method
        product.Purchase();
    }
});
 
  

Supports Popular Frameworks

With official and community built libraries for popular frameworks, developing powerful JavaScript apps is easier than ever.

More framework support is currently in development!

3D Graphics With WebGL

Just incredible what is possible to get pictured right into the browser with WebGL. It might be even a 3D game!

Use Bridge’s WebGL C# API and all the Bridge’s power to make great 3D stuff.

Please use A, S, D, W keys to spin the cube and Q / E to zoom out/in.

HTML5

Build web applications using cutting-edge HTML5 technology with the aid of Intellisense, statement completion, static typing, and all the advantages a compiled language environment can provide to increase productivity.

public static void Main()
{
    var msg = “Welcome to Bridge.NET”;

    var div = new HTMLDivElement
    {
        InnerHTML = msg,
        ClassName = “alert alert-info”
    };

    Document.Body.AppendChild(div);

    Window.Alert(“Success!”);
} 

Add jQuery To Your App

Full support for jQuery allows unleashing dynamic applications coupled with the power of code reusability in a strongly typed programming environment, guaranteeing smooth running applications.

public static void Main()
{
    var body = Document.Body;

    new jQuery(“<div>”)
        .Attr(“id”, “div1”)
        .Html(“Hello World!”)
        .AppendTo(body);

    new jQuery(“<button>”)
        .Html(“Hide”)
        .On(“click”, () => {
            jQuery.Select(“#div1”).FadeOut();
        })
        .AppendTo(body);
} 

Bootstrap

Websites can benefit from the advanced styling options and flexible components brought by Bootstrap. Written on a friendly and robust environment to allow beautiful and responsive applications.

public static void Main()
{
    var button = new HTMLButtonElement();

    button.ClassList.Add(“btn”);
    button.ClassList.Add(“btn-sm”);
    button.ClassList.Add(“btn-info”);
    button.InnerHTML = “Bootstrap”;
} 

Test Your Code with QUnit

It is always good to be 100% sure about your code. And it is always great to have the tools just ready at hand to do that.

Writing unit tests for your projects with Bridge.QUnit Framework is very easy.

Write C# using the QUnit API and run JavaScript unit tests. Bridge.NET is tested by the Bridge.QUnit and tests are available online at QUnit API

public static void RunTests()
{
    QUnit.Module(“PersonService”);

    QUnit.Test(“Method GetPerson()”, (assert) =>
    {
        var service = Test.GetService();
        var person = service.GetPerson(55);

        assert.Expect(3);

        assert.Ok(person != null, “Person created”);
        assert.DeepEqual(Id, 55, “Id = 55”);
        assert.DeepEqual(Name, “Frank”, “Name = ‘Frank'”);
    });
} 

Json.NET support in Bridge.NET

Share JSON code across projects using Newtonsoft.Json.

Write C#.
Run JavaScript.
C#
var product = new Product();

product.Name = “Apple”;
product.ExpiryDate = new DateTime(2018, 12, 28);
product.Price = 3.99;

JsonConvert.SerializeObject(product); 
JS
var product = { };

product.Name = “Apple”;
product.ExpiryDate = new System.DateTime(2018, 12, 28);
product.Price = 3.99;

JsonConvert.SerializeObject(product); 

Try Bridge.NET Live in Deck.NET

Deck.NET is an online C# to JavaScript compiler powered by Bridge.NET. You can try Bridge.NET right away in your browser without installing anything!

Deck.NET

What People Say About Us

Here is why our community loves us

“It’s the first time I feel comfortable to write externs, and have a strong typed system to use over JavaScript. More over the output is very clean, and can even be used using JavaScript for testing or simple prototyping. Thanks for your great work guys :)”

“I was impressed by the professionalism of the project and especially the willingness to help developers who are hitting edge cases of the technology stack.”

“I raised a Feature Request about this, explained what I’d like in an ideal world and five days later there was a branch on GitHub where I could preview changes that did precisely what I wanted!”

“You really did a great job! I was first a bit skeptic but now it feels really that C# is the source code.”

“Overall I have been impressed with the project. I was able to use Bridge.Net to implement a proof of concept where I was able to drive a robot using the HTML5 gamepad support, which is pretty neat.”

“Hi, the first impressions is… one of more interesting ideas of the decade. Really a good job. This opens a completly new approach to web and mobile developement.”