Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:53 AM
Bill S.
Guest
 
Posts: n/a
Default Tables - server-side vs. client-side?

I am starting to build quite a few pages that will have
tables of data from an SQL database.

I have been building the table rows on the server side
in VBScript, but I have been thinking about having the
VBScript code just build array variables in the <head>
section (or as local variables), and then have JavaScript
functions on the client side actually populate the tables
when the page loads.

I do plan to do other things like being able to sort the
tables in JavaScript code on the client, limit the tables
height and be able to scroll the rows, and click on a row
in the table, and have the values populate a form. I will
also need to be able to export/download/? some tables into
Excel.


In cases like this, which seems to work better - generating
tables on the server or client? I would really like to hear
opinions and experiences.

tia,
Bill
  #2  
Old July 19th, 2005, 09:53 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Tables - server-side vs. client-side?

> I have been building the table rows on the server side[color=blue]
> in VBScript, but I have been thinking about having the
> VBScript code just build array variables in the <head>
> section (or as local variables), and then have JavaScript
> functions on the client side actually populate the tables
> when the page loads.[/color]

This will not work very well at all when your datasets become large. IE on
the Mac chokes on very small scripts, IE on the PC will handle much larger
but there is still a limit.

As long as you're not buffering one big 800kb table, or using a single
variable to hold the entire response content, you will probably have much
better luck using many response.write commands than dynamically building
client-side arrays and doing it there.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


  #3  
Old July 19th, 2005, 09:54 AM
Peter Foti
Guest
 
Posts: n/a
Default Re: Tables - server-side vs. client-side?

"Bill S." <bill_sheets@hotmail.com> wrote in message
news:74600c03.0312020826.11e93510@posting.google.c om...[color=blue]
> I have been building the table rows on the server side
> in VBScript, but I have been thinking about having the
> VBScript code just build array variables in the <head>
> section (or as local variables), and then have JavaScript
> functions on the client side actually populate the tables
> when the page loads.[/color]

One important note... anyone who has JavaScript disabled will not be able to
see your content. IMHO, it's a bad idea to rely on the client side for any
content, so I would stick with the Server Side approach. But it also
depends on your environment (for example, you might be permitted to set
client side requirements for an Intranet app).

Regards,
Peter Foti


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles