client-side versus server-side code in ASP.NET

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

I guess the principal differences between client-side and server-side code
is that
client-side code is processed in web browser, and server-side code is
processed in web server. In ASP.NET web controls, since it has the attribute
runat="server", so the controls will be processed in web server?? Do you
think
the processing time will be slower than tradiational ASP applications??

I guess the fundamental question is when do we use client-side code? when
do we use server-side code??

please advise!
Thanks!
 
The advantage with server side technology is that you can finely control the
execution environment because you own it. It runs on your servers. The
client is just a window into the results of the execution. This is a good
model because the window (browser and desktop) can be any platform running
on any cpu. You shouldn't be concerned about this window normally.

When you start to execute code on the client you have to start taking all
these things into consideration because depending on the user settings,
desktop environment and cpu, you have to adjust your code.

A prudent mix of the two is normally a good way to go.

regards
 
Matt said:
I guess the principal differences between client-side and server-side
code is that
client-side code is processed in web browser, and server-side code is
processed in web server. In ASP.NET web controls, since it has the
attribute runat="server", so the controls will be processed in web
server?? Do you think
the processing time will be slower than tradiational ASP
applications??

I guess the fundamental question is when do we use client-side code?
when do we use server-side code??

Server-side is good for
- interfacing to other stuff on the server,
ie databases, mail or news servers, etc
- collaboration among users (forums, bulletin boards, blogs,
surveys, etc...)
- dynamically updating your site - adding "today's headlines" etc.
- keeping your proprietary source code secret

Server-side is bad for
- increasing the load on your server
- introducing security holes (when poorly written).

Client-side is good for
- making individual pages dynamic - image rollovers, form checking,
dropdown menus, processing cookies, etc

Client-side is bad for
- major incompatibilities between browser
object models makes cross-browser coding difficult.
- your source code is open to the public
 
Back
Top