views:

66

answers:

1

Hi,

I use the ASP.Net ScriptManager to load the scripts needed for calling WCF services via HTTP/JSON. I am optimizing the total size of my pages (including scripts) and I see that Microsoft's AJAX library is the biggest file that I have at 96KB. Is there anyway that I can get a version of this file with just the features I need loaded?

Or since I already have jquery, should I use that to call my WCF JSON service instead?

Cheers, Jon

A: 

WCF JSON services degrade gracefully down to working as a standard webservice, so you should have no problems using jQuery to post and retrieve data from them. You may lose some of the integration bells and whistles, but as someone who has taken the path you're suggesting, I can say that I don't miss it at all.

The only problem might be if you're using advanced WCF feature like 2 way connections, or guaranteed connections.

Evildonald
If you're not sure about it, create a prototype web project that calls your existing WCF services to test data flowing in and out.
Evildonald
Great stuff Evildonald! I think I'm leaning towards that path. So far the WCF / ASP.net ajax stack has been super fast and easy, but page size is finally becoming a concern to me. No need to load two libraries if I don't need to.
Jon Kragh
I went with jQuery for Ajax - all is good!
Jon Kragh
That is great news. jQuery has made me finally love javascript... not bad after coding in it for 8 years now!
Evildonald