Re: Server side controls vs client side script.
Matthias Hertel <[email protected]> Thu, 27 Jun 2002 08:21:31 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.general |
|---|---|
| Message-ID | <35E42ABE2AC11942B718D90FCCE112568333AA@KA_SRV_015.ap-ag.com> |
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 =3D 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 =3D 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 =3D 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 =3D 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.
=20
----- Urspr=FCngliche 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.
=20
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?
=20
Steve Miller
=20
You can read messages from the DOTNET archive, unsubscribe from =
DOTNET, or
subscribe to other DevelopMentor lists at =
http://discuss.develop.com.
=20
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.