Posted by Adrienne on 11/27/59 11:23
Gazing into my crystal ball I observed dingbat@codesmiths.com writing in
news:1123512657.044175.32080@g47g2000cwa.googlegroups.com:
>> no need for confusing response.writes:
>
> You've never had to performance tune an ASP site, have you ?
>
>
Yes, I have, and I find that interleaved text output is
A) Faster
B) Easier to debug
Consider the following:
<% option explicit
dim i
response.write "<table summary=""Sample Table"">"
response.write "<caption>Sample Table</caption>"
response.write "<thead>"
response.write "<tr>"
response.write "<th>Header1</th><th>Header2</th><th>
Header3</th>"
response.write "</tr>"
response.write "</thead>"
response.write "<tbody>"
for i = 1 to 10
response.write "<tr>"
response.write "<td>Column 1 - data" & i & "</td>"
response.write "<td>Column 2 - data" & i & "</td>"
response.write "td>Column 3 - data" & i & "</td>"
response.write "</tr>"
next
response.write "</tbody>"
response.write "</table>"
%>
I made an obvious error in the markup. It would be a lot easier to find
if the markup is interleaved with the ASP coding.
For that matter, it seems to me that just as one separates content from
presentation, one should separate markup from code.
Here's some interesting reading to support this:
<http://www.4guysfromrolla.com/webtech/021302-1.shtml>
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
[Back to original message]
|