We are moving from WebForms to MVC and and using a lot of jQuery.
I appears we have a lot of jQuery/JavaScript in our Views, is this common and are there any concerns about security. The obvious step is to refactor into plugins and more generic UserControls etc, but this jQuery would still be “visible” by looking at js files etc.
We are validating everything on the server-side anyway but should we be concerned?
I agree with Patrick in regards to the security issues related to using more javascript. However another thing you might want to consider is to limit the amount of javascript that appears in your view vs in an include file. The more js in a view equals more data that needs to come across the wire and depending on the amount could slow down the load time of your page. At least if generic javascript functions are in include files they could be cached and help to minimize this issue.