It seems that WCF data service will create a great extensibilty in web applications. I'm testing and working with it as shown in here.
I know that I can use the result of WCF data service in the other .NET based applications (Silverlight, WebForm,...).
Is there any framework to work with in HTML directly (using JQuery,...)?
For example, if I want to submit a form (Create, Update, Delete), I should write lots of JS code. But it seems that it could be easier to define everything.
In this sample I should write the block below:
$("#btnAdd").click(function () {
// Convert the form into an object
var data = { Title: $("#title").val(), Director: $("#director").val() };
// JSONify the data
var data = JSON.stringify(data);
// Post it
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "MovieService.svc/Movies",
data: data,
dataType: "json",
success: insertCallback
});
});
function insertCallback(result) {
// unwrap result
var newMovie = result["d"];
// Show primary key
alert("Movie added with primary key " + newMovie.Id);
}
And the other thing is querying data: WCF data service support ODATA querying signature and it's great, but is there any JQuery based grid which can support ODATA based paging, sorting, filtering, ...?
All the grids supports JSON remote data, but I want to execute pagination and sorting with WCF Data Service directly. I mean that the grid create the URL based on user action and send it to the WCF Data Service.