Best practices for developing simple ASP.NET sites (built in controls or JQuery + scripts)
<p>I was recently reviewing some code written by two different contractors, both were basic ASP.NET management sites.  The sites allowed the user to view and edit data.  Pretty much simple CRUD gateways.</p>

<p>One group did their best to use built in ASP + AJAX Toolkit controls and did their best to use as many built in controls as possible.  It pretty much was in line with most of the asp dev i havhe seen.  I found the code much easier to read and maintain.</p>

<p>The other used jQuery and the code is heavily marked up with script blocks which are then used to build pages from javascript files.  </p>

<p>Example Script block:</p>

<pre><code>  &lt;script id="HRPanel" type="text/html"&gt;
   &lt;table cellpadding='0' cellspacing='0' class="atable"&gt;&lt;thead class="mHeader"&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Other&lt;/th&gt;&lt;/thead&gt;&lt;tbody&gt;
  &lt;# for(var i=0; i &lt; hrRows.length; i++) {         
      var r = HRRows[i]; #&gt;
        &lt;tr&gt;&lt;td&gt;&lt;#=r.Name#&gt;&lt;/td&gt;&lt;td&gt;&lt;#=r.Description#&gt;&lt;/td&gt;&lt;td class="taRight"&gt;&lt;#=r.Other#&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;#}#&gt;
   &lt;/tbody&gt;&lt;tfoot&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tfoot&gt;&lt;/table&gt;
    &lt;/script&gt;
</code></pre>

<p>Then in a separate location (js file) you would see something like this.</p>

<pre><code> $("#HRPanel").html($("#HRPanel").parseTemplate({ HRRows: response.something.bah.bah }));
</code></pre>

<p>And in the js files you will just a bunch of toggling and manipulating of html code.  There was no code in the aspx files except for  blocks containing html markup.</p>

<p>Which one is more common?  The one that basically leveraged embedded HTML markup in scripts controled by javascript files screams readability and maintenance issues? </p>

<p>Secondly what type of issues fall out of the second way?  Do people really use code like that in real production environments? Are there tools that help facilitate jQuery development with visual studio, and/or is this a practice that Microsoft is going to make more streamline in the future?</p>
