I’ve been using AjaxPro for a few years now, and I must say that I have been very happy with it. It was even integrated with ProMesh.NET, meaning you just had to call RegisterTypeForAjaxPro() and the method stubs were being generated in the HTML output.
I was in the process of checking out some JavaScript frameworks, when I came across jQuery. Pretty cool stuff, although not that much different from Mootools, which I have been using for a few months. The Ajax stuff in jQuery is pretty easy to use and started playing around with it until… Hmm, I am moving away from the point of this article.
Anyway, not that all of this matters, but I started thinking about how hard it would be to offer the same functionality that AjaxPro offered, all integrated in the ProMesh.NET framework.
Calling the server methods was a no-brainer, because the framework already supports calling specific methods on Controller objects. The “hard” part was returning objects to the client as JSON strings. I didn’t feel like writing my own JSON generator, so I started checking out some open-source stuff.
I found the following products:
- AjaxPro JSON Parser (custom license)
- Jayrock (LGPL License)
- Newtonsoft JSON.NET (Creative Commons Attribution License)
- LitJSON (Public Domain)
- JSONSharp (GPL License)
All of these did exactly what I needed, so it was hard to choose. What was very unusual, is that one of these products, LitJSON, had a public domain license (i.e. no license at all). Not that the licensing for the other offerings was too restrictive to be included in ProMesh.NET, the thought of not having to worry at all about licensing made me decide to take a better look at LitJSON. The product seems to be very solid and well written, so I added it to the source tree of ProMesh.NET. I will include it with the 1.1.0 release of ProMesh.NET, but with a notice in the release notes that the JSON stuff hasn’t been tested as thoroughly as it should have been.
So, to make a long story short: ProMesh.NET now supports native Ajax method calls using jQuery or another JavaScript framework. Currently, only the jQuery JavaScript provider has been included in the latest build, but you can plug in any provider you like (using the IAjaxProvider interface).
This weblog is sponsored by The Vici Project.








