What is it?

JsFramework is an object oriented JavaScript library with a programming model similar to the Microsoft .NET Framework.

We created this to help save us some time in developing our own products and didn't feel it was fair to keep this work all to ourselves. Inside you'll find JavaScript implementations for a small subset of the classes provided by the .NET Framework base class libraries.

What it isn't

JsFramework isn't meant to replace jQuery. It's not a UI toolkit. It doesn't do animation and it won't make your DOM objects drag and drop.

It will save you some time if you're already familar with .NET and would like similar functionality in JavaScript.

But wait...

Doesn't Microsoft already have something like this?

Yes, the Microsoft AJAX Library, and you should use it if you want. JsFramework is meant to supplement the Microsoft AJAX Library and jQuery.

Try it out

// Load Twitter's top five trending topics from yesterday
var yesterday = System.DateTime.Now().AddDays(-1);
var uri = new System.Uri(System.String.Format('http://search.twitter.com/trends/daily.json?date={0}&exclude=hashtags&callback=?', yesterday.ToString('s')));
var stopwatch = System.Diagnostics.Stopwatch.StartNew();

$.getJSON(uri.GetAbsoluteUri(), function(data) {
    var timeSpan = new System.TimeSpan(0, 0, 0, 0, stopwatch.GetEllapsedMilliseconds());
    $('#results').html(System.String.Format('<h3>Twitter search took {0} seconds</h3>', timeSpan.GetTotalSeconds()));

    for (var trendHour in data.trends) {
        var trends = data.trends[trendHour];

        for (var i = 0; i < Math.min(5, trends.length); i++) {
            var searchUrl = System.String.Format('<p><a href="http://search.twitter.com/search?q={0}" target="_blank">{0}</a></p>', trends[i].name);

        break; // Only show first hour's worth of trending topics