The Microsoft AJAX Library Preview 6 and jQuery provide several ways to make the sorts of calls I need:
- Sys.Net.WebRequest (ASP.NET Ajax)
- Sys.Net.WebServiceProxy (ASP.NET Ajax)
- $.ajax (jQuery)
Sys.Net.WebRequest offers a way to specify the verb ("GET", "POST", "PUT", and "DELETE"), but no built-in callback for a failed request (they all seem to use the same callback, success or fail).
Sys.Net.WebServiceProxy seems to only do "GET"/"POST" (via the "useGet" parameter on the invoke method). There are callbacks for both success and failure.
$.ajax offers a way to specify the verb, has both success/failure callbacks, and can specify timeout length (among other things).
From the standpoints of maintainability, reliability, and usability, which of these would be the best method to standardize on when making AJAX calls to a WCF service (which returns JSON results)?
jQuery seems to do everything I want, but I could be missing something with the MicrosoftAjax library (as it's so big...). If I'm missing anything, or don't have my facts right, let me know!
Thanks!