This argumention is right and false - it depends on the way you implement your pages 
and is not .NET specific.

Sample:
You have a HTML Form with 20 kByte that uses Data of 1 kByte that is displayed and 
modified in 4 fields.

Case 1:
If you implement a server-site validation on every onchange-event the data is uploaded 
4 times to the server for validation and 4 times the whole Page with data comes back 
to the client.
The final submit only tranfers the data.
Sum: ~ 21 + 4*(1+21) + 1 = 110 kbyte (if no errors in input)

Case 2:
You implement a server-site validation when the form is submitted there is no 
up/download while the values in the fields are changed.
Sum: ~ 21 + 1 = 22 kbyte (if no errors in input)

Case 3:
Same as Case 2 but you ADD a client-site validation.
You only have to add some HTML+JScript code that's transfered to the client.
Sum: ~ 21 + 1 + 2 = 24 kbyte (even if some errors while editing input)

Case 4:
Server-site validation is done by calling a WebService. It is possible to use the IE 
as a direct client to a webservice and this enables a full featured validation 
including reference data-lookup.
Sum: ~ 21 + 1 + 4*1 + 2 = 28 kbyte (even if some errors while editing input)

Discuss:
All of these cases can be implemented on every server-plattform (.NET, ASP, JSP, 
PHP,...) so this is not .NET specific.
Some people use every new feature they can get; they should think about a <asp:label 
runat:server ...>. Programming the Case 1 is also done in some of the .NET Samples but 
showing the possibilities doesn't mean that you have to us them. Mixing HTML and 
ASP.NET objects also makes sense.

Case 4 is not suppored very well by the existing ASP.NET classes but calling 
webservices directly from the client enables a lot of features. We implement our 
solution this way.
 
----- Ursprüngliche Nachricht -----
    Von: "Steve Miller" <[EMAIL PROTECTED]>
    Ges.: 26.06.02 16:50:35
    An: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
    Betreff:      [DOTNET] Server side controls vs client side script.
    
    Some client-side code purist argue that ASP.NET's server side controls put
    to much of a load on the server and cause to many round trips to the
    server.  When you are pitching ASP.NET and run into these arguments how do
    you answer these criticisms of ASP.NET?
    
    Steve Miller
    
    You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
    subscribe to other DevelopMentor lists at http://discuss.develop.com.
    

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to