Do you think developing a ASP.Net site, with pure jQuery, AJAX and JSON web service calls being setup on each page is a good idea? (Code-behind has been keep to minimum, everything is client-side scripting if possible)
//on .ready()
$(function() {
//call web service to initialize page
$.ajax({
url: "myService.asmx/DoSomething",
dataType: 'json',
data: data,
success: function(message){
//render html page with jTemplates plugin
}
});
});
I’m in the middle of development using this architecture, and start to get concern because I’m new to this and I can’t be sure whether I’m doing the right thing..
Is this approach favourable than the other (Or this is definitely BAD)? Why and why not?
I’ve built an entire interactive Facebook game on JavaScript. I used an MVC framework for JavaScript(backbone) and the communication between front end and back end was purely rest calls requesting and submitting information, the back end was PHP we used the MVC, CodeIgniter framweork. It took a lot of planning but it was definitely do able.