views:

32

answers:

1

is it possible to use WCF classes with attributes (like [DataMember....) then you wouldnt need to do seralization on the client side (jquery) ?

+1  A: 

The requirement to use jQuery on the client side when using WCF isn't a real requirement.

When using WCF, you have the option of determining the format on the wire. One of the formats when working with the web bindings is to use JSON notation.

It just so happens that jQuery (and JavaScript in general) works very well with JSON, and jQuery specifically abstracts out the cross-browser differences for a number of operations, including that of posting to a URL.

So yes, you would use classes that use the DataContractSerializer (which requires DataContract, DataMember), how you process it on the client side is up to you, it's just that jQuery makes it easier for you.

You could check out other frameworks, as most have some sort of functionality like this (to post data in JSON notation).

casperOne
do you have any sample to look using wcf/jquery
Abu Hamzah