Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC 3 and "Javascript-Disabled" browsers

I have a requirement to implement a web application using MVC 3, which works on browsers even if javascript is disabled. There are a lot of concepts in MVC 3 which rely on the use of jquery.

  1. What are the concepts which won't work in the case of "javascript-disabled" browsers?
  2. For those concepts which won't work, are there any alternative ways to implement those concepts in MVC 3?
  3. With these requirements, is it a good idea to implement such a website using MVC 3, or should it be implemented in asp.net (with every thing done on server side)?
like image 372
Hasan Fahim Avatar asked Dec 07 '22 20:12

Hasan Fahim


2 Answers

MVC 3 does NOT depend on jQuery to function properly

The beauty of MVC 3 is that it is pre-packaged with a jQuery plugin which provides unobtrusive form validation. Unobtrusive means that it will work even if Javascript is disabled. MVC 3 does NOT require jQuery nor Javascript to work as intended.

Take a moment to read this blog post. The author does a good job explaining how MVC 3 and jQuery work together.

http://www.matthidinger.com/archive/2011/02/22/Progressive-enhancement-tutorial-with-ASP-NET-MVC-3-and-jQuery.aspx

like image 158
jessegavin Avatar answered Dec 24 '22 04:12

jessegavin


MVC is very nicely set up for doing "progressive enhancement", which is to say getting an app to work first using server-side only and then enhancing with javascript. There is nothing I can think of in MVC (3 or otherwise) that inherently requires javascript, certainly no more so than ASP.NET WebForms. And the control that you have over just about every aspect of your application is far greater than in WebForms (at least by default; I am sure you can do anything you want in WebForms if you work hard enough at it).

like image 38
Matthew Nichols Avatar answered Dec 24 '22 04:12

Matthew Nichols