I’ve been developing ‘traditional’ ASP.NET applications with server side ASP.NET controls and code behind files, etc. Now I’m exploring several JavaScript libraries like: jQuery, YUI, Ext Js, Prototype. (also it’s hard to pick one, but it’s another post). All these libraries make client to server communication a lot easier, but they also offer nice set of very sleek UI controls. And some controls are way sleeker than ASP.NET server side controls in my opinion.
But now I am questioning the traditional ASP.NET model. I am leaning towards all HTML/JS UI talking to the server (just a simple aspx page) via REST. What do you think? Have anyone used this approach? What are some drawbacks and gotchas? Also if you could comment on what JS Library/Framework you used and your experience with it, that would be great too.
Thanks
This is a very lengthy topic covered by numerous people, but at its core the difference is basically this:
For very form-heavy web applications, which maintain a great deal of state information; frequently stay on the same page and behave similarly to a desktop application, the traditional ASP.NET WebForms model provides a lot of the glue to hold all that together for you.
For everything else, the REST/MVC model works best.
This is a generalization and does not apply to every single situation, but on the whole it’s a good rule of thumb.
It’s also very important to point out that if you don’t have a captive audience (such as a corporate intranet, and sometimes even then) you should code your site, WebForms or REST, to work without JS. Then go back and add the sweet goodness for those who can support it.