[thelist] Response.Write versus varHTML = varHTML & "..."

Anthony Baratta Anthony at Baratta.com
Fri Jan 11 11:52:00 CST 2002


At 09:39 AM 1/11/2002, Howard Cheng wrote:
>I'll have to concur with Joshua Olson in that it's usually easier to do 
>all your queries and server-side calculations before you output the HTML, 
>storing any results of said calculations into variables and just printing 
>those variables at the end. Or at least as much as possible at any rate. 
>Certainly sometimes you need dynamic branching in your HTML, but you can 
>always have the values ready ahead of time and do function calls with 
>those values.

This doesn't solve the problem with string concatenation/storage. Where do 
you store the HTML text before you get to the HTML?

My former format is not any different from Joshua's/your's. It's doing all 
the calc's up front too. I've just functionalized as much as I can and move 
the functions to the bottom, for code readability.

The whole point of my concern is that you have no control over the flow of 
the code any more. In order to avoid VB/VBS from carpet bombing your server 
performance you should be printing your HTML to the browser as quickly and 
often as possible.

This destroys the calc, store and output later method.

Maybe a C++ compiled COM Object would be able to help (Speed String 
certainly did not).
---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."





More information about the thelist mailing list